rbhadti94/apache-jmeter-action

Support for plugins

Closed this issue · 5 comments

I tried to use this action, but our team uses custom plugins and I don't think I can get that to work with this action. I added the jar file with our plugins to the classpath using:

      - name: Run JMeter Action
        uses: rbhadti94/apache-jmeter-action@v0.3.2
        with:
          testFilePath: test.jmx
          outputReportsFolder: reports/
          args: -Duser.classpath=customplugin.jar

However, when I run jmeter, I get the following error:

Uncaught Exception java.lang.NoClassDefFoundError: kg/apc/jmeter/JMeterPluginsUtils in thread Thread[StandardJMeterEngine,5,main]. See log file for details

When I googled it, it looks like it's because the plugin manager isn't properly setup. Details here:

Would it be possible to add support for plugins?

Let me take a look at this :)

@mrmeyers99 - Please can you tell me how you are trying to use this? - i.e.

I've raised a pull request here: Can you take a look at this and let me know if this will work? - #19

@mrmeyers99 - Please can you tell me how you are trying to use this? - i.e.

I've raised a pull request here: Can you take a look at this and let me know if this will work? - #19

This is a custom plugin.

I tried it out and it still failed with the NoClassDefFoundError

Run rbhadti94/apache-jmeter-action@feature/GH-18-jmeter-plugins
  with:
    testFilePath: test.jmx
    outputReportsFolder: reports/
    args: -Duser.classpath=./jmeter_plugin.jar
/usr/local/bin/docker run --name e226604296fdcb2d4622ae3028609e1ad3e4_b0f4b8 --label 60e226 --workdir /github/workspace --rm -e INPUT_TESTFILEPATH -e INPUT_OUTPUTREPORTSFOLDER -e INPUT_ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/runner/_work/_temp/_github_home":"/github/home" -v "/runner/_work/_temp/_github_workflow":"/github/workflow" -v "/runner/_work/_temp/_runner_file_commands":"/github/file_commands" -v "/runner/_work/test":"/github/workspace" 60e226:604296fdcb2d4622ae3028609e1ad3e4  "-n" "-t" "test.jmx" "-l" "jmeter_log.log" "-e" "-f" "-o" "reports/" "-Duser.classpath=./jmeter_plugin.jar"
Jul 30, 2021 12:46:44 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Creating summariser <summary>
Created the tree successfully using test.jmx
Starting standalone test @ Fri Jul 30 00:46:48 GMT 2021 (1627606008008)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
Uncaught Exception java.lang.NoClassDefFoundError: kg/apc/jmeter/JMeterPluginsUtils in thread Thread[StandardJMeterEngine,5,main]. See log file for details.

Another thing to note is that even though that uncaught exception was there, that step did not report a failure.