2017-09-25 2 views
1

J'utilise JMeter 3.3, j'ai ouvert le Helper Fonction et essayé la nouvelle fonction __RandomDate, cliquez sur Générer et obtenu une erreur (d'autres fonctions travaillent)JMeter 3.3 __RandomDate sans paramètre génère une exception dans la fonction Aide Dialog

Lorsque vous appelez dans le plan d'essai ${__RandomDate(,2017-01-01,2018-01-01,,)} cela fonctionne, mais dans Helper fonction lorsque vous cliquez sur Générer il ignore le champ de saisie et d'utiliser la fonction sans valeurs

2017-09-25 08:44:30,112 ERROR o.a.j.f.RandomDate: Failed to parse the date '' to shift with formatter 'Value(YearOfEra,4,19,EXCEEDS_PAD)'-'Value(MonthOfYear,2)'-'Value(DayOfMonth,2)[email protected]68[email protected]4b466[email protected]108462fd' 
java.time.format.DateTimeParseException: Text '' could not be parsed at index 0 
    at java.time.format.DateTimeFormatter.parseResolved0(Unknown Source) ~[?:1.8.0_144] 
    at java.time.format.DateTimeFormatter.parse(Unknown Source) ~[?:1.8.0_144] 
    at java.time.LocalDate.parse(Unknown Source) ~[?:1.8.0_144] 
    at org.apache.jmeter.functions.RandomDate.execute(RandomDate.java:189) [ApacheJMeter_functions.jar:3.3 r1808647] 
    at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:137) [ApacheJMeter_core.jar:3.3 r1808647] 
    at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:112) [ApacheJMeter_core.jar:3.3 r1808647] 
    at org.apache.jmeter.functions.gui.FunctionHelper.actionPerformed(FunctionHelper.java:181) [ApacheJMeter_core.jar:3.3 r1808647] 
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) [?:1.8.0_144] 
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) [?:1.8.0_144] 
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) [?:1.8.0_144] 
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source) [?:1.8.0_144] 
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) [?:1.8.0_144] 
    at java.awt.Component.processMouseEvent(Unknown Source) [?:1.8.0_144] 
    at javax.swing.JComponent.processMouseEvent(Unknown Source) [?:1.8.0_144] 
    at java.awt.Component.processEvent(Unknown Source) [?:1.8.0_144] 
    at java.awt.Container.processEvent(Unknown Source) [?:1.8.0_144] 
    at java.awt.Component.dispatchEventImpl(Unknown Source) [?:1.8.0_144] 
    at java.awt.Container.dispatchEventImpl(Unknown Source) [?:1.8.0_144] 
    at java.awt.Component.dispatchEvent(Unknown Source) [?:1.8.0_144] 
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) [?:1.8.0_144] 
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) [?:1.8.0_144] 
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) [?:1.8.0_144] 
    at java.awt.Container.dispatchEventImpl(Unknown Source) [?:1.8.0_144] 
    at java.awt.Window.dispatchEventImpl(Unknown Source) [?:1.8.0_144] 
    at java.awt.Component.dispatchEvent(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventQueue.access$500(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventQueue$3.run(Unknown Source) [?:1.8.0_144] 
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_144] 
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_144] 
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventQueue$4.run(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventQueue$4.run(Unknown Source) [?:1.8.0_144] 
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_144] 
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventQueue.dispatchEvent(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_144] 
2017-09-25 08:44:30,113 ERROR o.a.j.JMeter: Uncaught exception: 
java.lang.IllegalArgumentException: bound must be greater than origin 
    at java.util.concurrent.ThreadLocalRandom.nextLong(Unknown Source) ~[?:1.8.0_144] 
    at org.apache.jmeter.functions.RandomDate.execute(RandomDate.java:196) ~[ApacheJMeter_functions.jar:3.3 r1808647] 
    at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:137) ~[ApacheJMeter_core.jar:3.3 r1808647] 
    at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:112) ~[ApacheJMeter_core.jar:3.3 r1808647] 
    at org.apache.jmeter.functions.gui.FunctionHelper.actionPerformed(FunctionHelper.java:181) ~[ApacheJMeter_core.jar:3.3 r1808647] 
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) ~[?:1.8.0_144] 
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) ~[?:1.8.0_144] 
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) ~[?:1.8.0_144] 
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source) ~[?:1.8.0_144] 
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.Component.processMouseEvent(Unknown Source) ~[?:1.8.0_144] 
    at javax.swing.JComponent.processMouseEvent(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.Component.processEvent(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.Container.processEvent(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.Component.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.Window.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.Component.dispatchEvent(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.EventQueue.access$500(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.EventQueue$3.run(Unknown Source) ~[?:1.8.0_144] 
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_144] 
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_144] 
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.EventQueue$4.run(Unknown Source) ~[?:1.8.0_144] 
    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_144] 
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) [?:1.8.0_144] 
    at java.awt.EventDispatchThread.run(Unknown Source) [?:1.8.0_144] 

EDIT

Ouvert un bug.

+1

JMeter bug tracker est ici: http://jmeter.apache.org/issues.html –

+0

a ouvert un bug https://bz.apache.org/bugzilla/show_bug.cgi?id=61561 – user7294900

Répondre

1

Vous obtenez une erreur car «Date de fin» est obligatoire.

Depuis 3.3, Générez fait une autre chose qui doit montrer le résultat de l'appel de fonction. Mais comme vous ne remplissez pas la date de fin, cela échoue avec le message d'erreur que vous avez mentionné.

Remplissez les paramètres requis et il fonctionne comme l'indique:

Comme vous pouvez le voir Date de fin est nécessaire

enter image description here

+0

Lorsque vous cliquez sur Générer des appels sans aucun paramètre (ignorer le champ de saisie), d'autres fonctions avec des champs obligatoires "fonctionne" ou non renvoie les erreurs comme $ {__ property (,,)} – user7294900

+0

Il est juste que les autres fonctions échouent silencieusement lorsque les paramètres sont manquants, typiquement __property est dans ce cas –