abstracta / jmeter-java-dsl

Simple JMeter performance tests API
https://abstracta.github.io/jmeter-java-dsl/
Apache License 2.0
477 stars 59 forks source link

Throwing an error while converting the file from jmx to dsl #126

Closed sangamthakur-sec closed 2 years ago

sangamthakur-sec commented 2 years ago

WARN us.abstracta.jmeter.javadsl.codegeneration.MethodCallContext - Could not build code for class org.apache.jmeter.threads.ThreadGroup(Thread Group). Using unsupported() as parent for children's conversions and ease manual code completion. java.lang.NumberFormatException: For input string: "${groovy((new org.apache.jmeter.engine.util.CompoundVariable('0'.replace('#'\,'$')).execute() as int) - (new org.apache.jmeter.engine.util.CompoundVariable('#{P(rampup)}'.replace('#'\,'$')).execute() as int))}" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?] at java.lang.Long.parseLong(Long.java:697) ~[?:?] at java.lang.Long.parseLong(Long.java:834) ~[?:?] at us.abstracta.jmeter.javadsl.codegeneration.params.DurationParam.lambda$new$0(DurationParam.java:16) ~[jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.codegeneration.params.FixedParam.(FixedParam.java:20) ~[jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.codegeneration.params.DurationParam.(DurationParam.java:16) ~[jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.core.threadgroups.defaultthreadgroup.SimpleThreadGroupHelper$CodeBuilder.buildDurationParam(SimpleThreadGroupHelper.java:191) ~[jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.core.threadgroups.defaultthreadgroup.SimpleThreadGroupHelper$CodeBuilder.buildMethodCall(SimpleThreadGroupHelper.java:166) ~[jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.core.threadgroups.DslDefaultThreadGroup$CodeBuilder.buildMethodCall(DslDefaultThreadGroup.java:417) ~[jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.codegeneration.MethodCallContext.lambda$buildMethodCall$0(MethodCallContext.java:149) ~[jmx2dsl.jar:0.62] at java.util.Optional.map(Optional.java:260) ~[?:?] at us.abstracta.jmeter.javadsl.codegeneration.MethodCallContext.buildMethodCall(MethodCallContext.java:149) ~[jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.codegeneration.MethodCallContext.lambda$buildChildrenMethodCalls$4(MethodCallContext.java:178) ~[jmx2dsl.jar:0.62] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) [?:?] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) [?:?] at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) [?:?] at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) [?:?] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) [?:?] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) [?:?] at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) [?:?] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) [?:?] at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) [?:?] at us.abstracta.jmeter.javadsl.codegeneration.MethodCallContext.buildChildrenMethodCalls(MethodCallContext.java:179) [jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.codegeneration.MethodCallContext.addChildrenTo(MethodCallContext.java:166) [jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.codegeneration.MethodCallContext.buildMethodCall(MethodCallContext.java:155) [jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.codegeneration.DslCodeGenerator.buildMethodCallFromJmxFile(DslCodeGenerator.java:157) [jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.codegeneration.DslCodeGenerator.generateCodeFromJmx(DslCodeGenerator.java:148) [jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.jmx2dsl.Jmx2Dsl.call(Jmx2Dsl.java:44) [jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.jmx2dsl.Jmx2Dsl.call(Jmx2Dsl.java:17) [jmx2dsl.jar:0.62] at picocli.CommandLine.executeUserObject(CommandLine.java:1953) [jmx2dsl.jar:0.62] at picocli.CommandLine.access$1300(CommandLine.java:145) [jmx2dsl.jar:0.62] at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) [jmx2dsl.jar:0.62] at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) [jmx2dsl.jar:0.62] at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) [jmx2dsl.jar:0.62] at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) [jmx2dsl.jar:0.62] at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) [jmx2dsl.jar:0.62] at picocli.CommandLine.execute(CommandLine.java:2078) [jmx2dsl.jar:0.62] at us.abstracta.jmeter.javadsl.jmx2dsl.Jmx2Dsl.main(Jmx2Dsl.java:56) [jmx2dsl.jar:0.62]

Nevertheless it does convert some of the things it is not able to convert the httpsampler.

rabelenda commented 2 years ago

Hello, we have just triggered a release which fixes this: 0.62.1.

Thank you for reporting it!

sangamthakur-sec commented 2 years ago

Thanks..