smicyk / groovy-jmeter

A Groovy-based DSL for building and running JMeter test plans from command line and more.
Apache License 2.0
13 stars 1 forks source link

Failures running myscript #52

Closed AntonioSun closed 2 years ago

AntonioSun commented 2 years ago

https://github.com/smicyk/groovy-jmeter/blob/8e22a6230524704da27dae5aca5ebf686166ddf9/examples/docker/run.sh#L8

Both the above and README suggest running my scripts should be as simple as that. However this is what I get when tried:

$ docker run --rm -u groovy -v "$(pwd)":"/home/groovy" -v "grapes-cache":"/home/groovy/.groovy/grapes" groovy:3.0.7-jdk11 groovy myscript.groovy 
Caught: java.io.FileNotFoundException: /tmp/hsperfdata_groovy/myscript.groovy (/tmp/hsperfdata_groovy/myscript.groovy)
java.io.FileNotFoundException: /tmp/hsperfdata_groovy/myscript.groovy (/tmp/hsperfdata_groovy/myscript.groovy)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Something has change since the doc and README were written?

AntonioSun commented 2 years ago

Eventually I can start with groovy /home/groovy/myscript.groovy, so I'm just wondering if the run.sh and README should be updated or I'm doing something wrong.

AntonioSun commented 2 years ago

Eventually I can start with groovy /home/groovy/myscript.groovy

However, it didn't go very far. This is what I'm getting afterwards:

$ docker run --rm -u groovy -v "$(pwd)":"/home/groovy" -v "grapes-cache":"/home/groovy/.groovy/grapes" groovy:3.0.7-jdk11 groovy /home/groovy/myscript.groovy 
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Conflicting module versions. Module [groovy-xml is loaded in version 3.0.7 and you are trying to load version 2.5.9

groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-xml is loaded in version 3.0.7 and you are trying to load version 2.5.9
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:510)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerExtensionModuleFromProperties(MetaClassRegistryImpl.java:168)
        at groovy.grape.GrapeIvy.processCategoryMethods(GrapeIvy.groovy:310)
        at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:264)
        at groovy.grape.Grape$1.run(Grape.java:174)
        at groovy.grape.Grape$1.run(Grape.java:160)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at groovy.grape.Grape.grab(Grape.java:160)
        at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:377)
        at org.codehaus.groovy.transform.ASTTransformationVisitor.lambda$addPhaseOperationsForGlobalTransforms$4(ASTTransformationVisitor.java:337)
        at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:901)
        at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:671)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:635)
        at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389)
        at groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332)
        at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
        at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
        at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330)
        at groovy.lang.GroovyShell.parseClass(GroovyShell.java:526)
        at groovy.lang.GroovyShell.run(GroovyShell.java:359)
        at groovy.lang.GroovyShell.run(GroovyShell.java:349)
        at groovy.ui.GroovyMain.processOnce(GroovyMain.java:652)
        at groovy.ui.GroovyMain.run(GroovyMain.java:398)
        at groovy.ui.GroovyMain.access$1400(GroovyMain.java:68)
        at groovy.ui.GroovyMain$GroovyCommand.process(GroovyMain.java:322)
        at groovy.ui.GroovyMain.processArgs(GroovyMain.java:142)
        at groovy.ui.GroovyMain.main(GroovyMain.java:115)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:111)
        at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:129)

1 error

Where is the groovy-xml trying to be loaded as version 2.5.9?

This is exactly the problem I was trying to avoid when choosing to run it within a docker image, in which everything should be aligned perfectly. Because in my host I have an entirely different system:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.10
Release: 21.10
Codename:       impish

$ apt-cache policy groovy gradle
groovy:
  Installed: 2.4.21-1
  Candidate: 2.4.21-1
  Version table:
 *** 2.4.21-1 500
        500 http://archive.ubuntu.com/ubuntu impish/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu impish/universe i386 Packages
        100 /var/lib/dpkg/status
gradle:
  Installed: 4.4.1-13
  Candidate: 4.4.1-13
  Version table:
 *** 4.4.1-13 500
        500 http://archive.ubuntu.com/ubuntu impish/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu impish/universe i386 Packages
        100 /var/lib/dpkg/status
AntonioSun commented 2 years ago

Just to rule out the possibility that the problem is caused by -v "grapes-cache":"/home/groovy/.groovy/grapes", I've just tried without it:

$ docker run --rm -u groovy -v "$(pwd)":"/home/groovy" groovy:3.0.7-jdk11 groovy /home/groovy/myscript.groovy 
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Conflicting module versions. Module [groovy-xml is loaded in version 3.0.7 and you are trying to load version 2.5.9
. . .
AntonioSun commented 2 years ago

Tried with groovy:2.5.9-jdk11 has no luck either 😢😢:

$ docker run --rm -u groovy -v "$(pwd)":"/home/groovy" groovy:2.5.9-jdk11 groovy /home/groovy/myscript.groovy 
Unable to find image 'groovy:2.5.9-jdk11' locally
2.5.9-jdk11: Pulling from library/groovy
5c939e3a4d10: Pull complete 
c63719cdbe7a: Pull complete 
19a861ea6baf: Pull complete 
651c9d2d6c4f: Pull complete 
86e1a6e1ff3c: Pull complete 
193adb2bcec5: Pull complete 
7bffdfff98c6: Pull complete 
03fd25208fd2: Pull complete 
97d3da86def3: Pull complete 
8f0cd522940c: Pull complete 
Digest: sha256:1a03353d158b98acc224e14e015623e1d00dec18f4d73f5e6beb784140630307
Status: Downloaded newer image for groovy:2.5.9-jdk11
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/opt/groovy/lib/groovy-2.5.9.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Caught: java.nio.file.AccessDeniedException: jmeter.properties
java.nio.file.AccessDeniedException: jmeter.properties
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at net.simonix.dsl.jmeter.TestScriptBase$_updateJMeterPropertiesLocation_closure6.doCall(TestScriptBase.groovy:106)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at net.simonix.dsl.jmeter.TestScriptBase.updateJMeterPropertiesLocation(TestScriptBase.groovy:105)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at net.simonix.dsl.jmeter.TestScriptBase.start(TestScriptBase.groovy:44)
        at net.simonix.dsl.jmeter.TestScriptBase$start$0.callCurrent(Unknown Source)
        at net.simonix.dsl.jmeter.TestScriptBase.start(TestScriptBase.groovy:40)
        at net.simonix.dsl.jmeter.TestScriptBase$start.callCurrent(Unknown Source)
        at httpbin.executeScript(httpbin.groovy:8)
        at net.simonix.dsl.jmeter.TestScript.run(TestScript.groovy:86)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

please help.

AntonioSun commented 2 years ago

please help

The more I tried, the more I think it is impossible --

$ docker run --rm -u groovy -v "$(pwd)":"/home/groovy" -v "grapes-cache":"/home/groovy/.groovy/grapes" groovy:3.0.7-jdk11 groovy /home/groovy/myscript.groovy 
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Conflicting module versions. Module [groovy-xml is loaded in version 3.0.7 and you are trying to load version 2.5.9

groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-xml is loaded in version 3.0.7 and you are trying to load version 2.5.9
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:510)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)
. . .

$ docker run --rm -u groovy -v "$(pwd)":"/home/groovy" groovy:2.5.9-jdk11 groovy /home/groovy/myscript.groovy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/opt/groovy/lib/groovy-2.5.9.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Conflicting module versions. Module [groovy-xml is loaded in version 2.5.9 and you are trying to load version 3.0.7

groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-xml is loaded in version 2.5.9 and you are trying to load version 3.0.7
        at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl$DefaultModuleListener.onModule(MetaClassRegistryImpl.java:524)
        at org.codehaus.groovy.runtime.m12n.ExtensionModuleScanner.scanExtensionModuleFromProperties(ExtensionModuleScanner.java:87)
smicyk commented 2 years ago

Hi, can you sent your sample script?

AntonioSun commented 2 years ago

https://gist.githubusercontent.com/AntonioSun/ab37d149f0ab60f62f06d26bb09d65d8/raw/5709050da505a55f83b636d72b8743c359d08d37/myscript.groovy

smicyk commented 2 years ago

You should use the latest version in your @Grab

@Grab('net.simonix.scripts:groovy-jmeter:0.15.0')

The 0.11.0 is pretty outdated and built with 2.5.9 so don't use it.

AntonioSun commented 2 years ago

I'm currently using @Grab('net.simonix.scripts:groovy-jmeter') (check the latest version of my script in the above url again). So you are saying @Grab('net.simonix.scripts:groovy-jmeter') is not the latest version of groovy-jmeter but a pretty outdated one?

AntonioSun commented 2 years ago

What's that 0.15.0 stands for? Goovy version? which exact docker image I should choose that goes with it?

smicyk commented 2 years ago

OK. So first version which you sent had 0.11.0 so I thought it might be the problem.

Yes, you can use

@Grab('net.simonix.scripts:groovy-jmeter')

without version and it should get the latest one.

As long as you didn't build local version (then it will use your local build).

The docker should use groovy:3.0.7-jdk11

smicyk commented 2 years ago

So I run the clean ubnuntu VM + pure docker installation on it. My steps to run your script was:

# this is need to cache grapes dependencies so each run of the script don't download it again
# without it each start of the script might takes quite long time
docker volume create --name grapes-cache
docker run --rm --name grapes-container -v "grapes-cache":"/home/gradle/.groovy/grapes" alpine /bin/sh -c "chown 1000:1000 /home/gradle/.groovy/grapes"

# this is script execution
docker run --rm -u groovy -v "$(pwd)":"/home/groovy" -v "grapes-cache":"/home/groovy/.groovy/grapes" groovy:3.0.7-jdk11 groovy script.groovy

And gets this as an output

 +      1 in 00:00:05 =    0.2/s Avg:  5135 Min:  5135 Max:  5135 Err:     1 (100.00%) Active: 1 Started: 1 Finished: 0                                                                       │
 +      5 in 00:00:25 =    0.2/s Avg:  5077 Min:  5075 Max:  5084 Err:     5 (100.00%) Active: 1 Started: 1 Finished: 0                                                                       │
 =      6 in 00:00:31 =    0.2/s Avg:  5087 Min:  5075 Max:  5135 Err:     6 (100.00%)                                                                                                        │
 +      6 in 00:00:31 =    0.2/s Avg:  5078 Min:  5074 Max:  5083 Err:     6 (100.00%) Active: 1 Started: 1 Finished: 0                                                                       │
 =     12 in 00:01:01 =    0.2/s Avg:  5083 Min:  5074 Max:  5135 Err:    12 (100.00%)                                                                                                        │
 +      6 in 00:00:31 =    0.2/s Avg:  5078 Min:  5075 Max:  5081 Err:     6 (100.00%) Active: 1 Started: 1 Finished: 0                                                                       │
 =     18 in 00:01:32 =    0.2/s Avg:  5081 Min:  5074 Max:  5135 Err:    18 (100.00%)                                                                                                        │
 +      2 in 00:00:10 =    0.2/s Avg:  5077 Min:  5076 Max:  5079 Err:     2 (100.00%) Active: 0 Started: 1 Finished: 1                                                                       │
 =     20 in 00:01:42 =    0.2/s Avg:  5081 Min:  5074 Max:  5135 Err:    20 (100.00%)

So it is working.

I would suggest to remove any docker container created for groovy-jmeter including volumes. Then try again with your current script version.

Please note, on the clean VM I didn't build groovy-jmeter from source so only version from mvn repository is used.

AntonioSun commented 2 years ago

I would suggest to remove any docker container created for groovy-jmeter including volumes. Then try again with your current script version.

OK. thanks for your helps.

This is my work log, please see if you can find where the problem is:

$ docker image ls | grep groovy
groovy                   3.0.7-jdk11      14bf98946eea   9 months ago    498MB
groovy                   2.5.9-jdk11      cc153e862a42   2 years ago     465MB

docker rmi 14bf98946eea cc153e862a42 -f
Untagged: groovy:3.0.7-jdk11
. . .

$ docker volume rm grapes-cache
grapes-cache

$ docker run --rm --name grapes-container -v "grapes-cache":"/home/gradle/.groovy/grapes" alpine /bin/sh -c "chown 1000:1000 /home/gradle/.groovy/grapes"
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
59bf1c3509f3: Already exists 
Digest: sha256:21a3deaa0d32a8057914f36584b5288d2e5ecc984380bc0118285c70fa8c9300
Status: Downloaded newer image for alpine:latest

$ docker run --rm -u groovy -v "$(pwd)":"/home/groovy" -v "grapes-cache":"/home/groovy/.groovy/grapes" groovy:3.0.7-jdk11 groovy myscript.groovy
Unable to find image 'groovy:3.0.7-jdk11' locally
3.0.7-jdk11: Pulling from library/groovy
a70d879fa598: Already exists 
c4394a92d1f8: Already exists 
10e6159c56c0: Already exists 
e04b772c31f7: Already exists 
829aace30071: Already exists 
333cd60290ce: Already exists 
beeec81b1ded: Already exists 
b6f6fa88bd57: Already exists 
d5ffffd333d6: Already exists 
Digest: sha256:63dd19a0a10f1ffd0911e38888ce608a065f5aea3a56b010f5c90cb4711a7ad9
Status: Downloaded newer image for groovy:3.0.7-jdk11
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v9.Java9 (file:/opt/groovy/lib/groovy-3.0.7.jar) to method sun.nio.fs.UnixFileSystem.getPath(java.lang.String,java.lang.String[])
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v9.Java9
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Caught: java.nio.file.AccessDeniedException: jmeter.properties
java.nio.file.AccessDeniedException: jmeter.properties
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at net.simonix.dsl.jmeter.TestScriptBase$_updateJMeterPropertiesLocation_closure7.doCall(TestScriptBase.groovy:123)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at net.simonix.dsl.jmeter.TestScriptBase.updateJMeterPropertiesLocation(TestScriptBase.groovy:122)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at net.simonix.dsl.jmeter.TestScriptBase.start(TestScriptBase.groovy:44)
        at net.simonix.dsl.jmeter.TestScriptBase$start$0.callCurrent(Unknown Source)
        at net.simonix.dsl.jmeter.TestScriptBase.start(TestScriptBase.groovy:40)
        at net.simonix.dsl.jmeter.TestScriptBase$start.callCurrent(Unknown Source)
        at myscript.executeScript(myscript.groovy:8)
        at net.simonix.dsl.jmeter.TestScript.run(TestScript.groovy:133)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

Where is this jmeter.properties? Is it under grapes-cache:/home/groovy/.groovy/grapes somewhere?

BTW did you have that WARNING: An illegal reflective access operation has occurred as well?

Thanks for helping.

smicyk commented 2 years ago

OK. So the jmeter.properties is automatically created if it doesn't exists and should be created in the same folder as your script.

It means that when you mount current directory to /home/groovy the container can't create the jmeter.properties in that mounted folder. This might be specific to your machine configuration or maybe some docker default configuration.

I would suggest to create separate folder and try to give all permission and mount that folder instead of current folder.

So instead of -v "$(pwd)":"/home/groovy" probably you should go with "/yourfolderpathwithfullpermissions":"/home/groovy"

I hope it shows where the problem is.

AntonioSun commented 2 years ago

Where is this jmeter.properties? Is it under grapes-cache:/home/groovy/.groovy/grapes somewhere?

Trying again without the chown:

$ docker volume rm grapes-cache
grapes-cache

$ docker volume create --name grapes-cache
grapes-cache

$ docker run --rm -u groovy -v "$(pwd)":"/home/groovy" -v "grapes-cache":"/home/groovy/.groovy/grapes" groovy:3.0.7-jdk11 groovy myscript.groovy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v9.Java9 (file:/opt/groovy/lib/groovy-3.0.7.jar) to method sun.nio.fs.UnixFileSystem.getPath(java.lang.String,java.lang.String[])
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v9.Java9
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Caught: java.nio.file.AccessDeniedException: jmeter.properties
java.nio.file.AccessDeniedException: jmeter.properties
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at net.simonix.dsl.jmeter.TestScriptBase$_updateJMeterPropertiesLocation_closure7.doCall(TestScriptBase.groovy:123)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at net.simonix.dsl.jmeter.TestScriptBase.updateJMeterPropertiesLocation(TestScriptBase.groovy:122)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at net.simonix.dsl.jmeter.TestScriptBase.start(TestScriptBase.groovy:44)
        at net.simonix.dsl.jmeter.TestScriptBase$start$0.callCurrent(Unknown Source)
        at net.simonix.dsl.jmeter.TestScriptBase.start(TestScriptBase.groovy:40)
        at net.simonix.dsl.jmeter.TestScriptBase$start.callCurrent(Unknown Source)
        at myscript.executeScript(myscript.groovy:8)
        at net.simonix.dsl.jmeter.TestScript.run(TestScript.groovy:133)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

So the jmeter.properties is automatically created if it doesn't exists and should be created in the same folder as your script.

Ah, got it.

Mine is working now as well.

Thanks a lot for your help!!!

smicyk commented 2 years ago

Sure no problem.

BTW did you have that WARNING: An illegal reflective access operation has occurred as well?

Yes, this must be fixed by groovy itself. So you don't have to worry about it.