質問

I am using jmeter to run load tests using command line and then trying to generate aggregate report and then display graph based on the generated report. I am using the following powershell script to do so.

#!/bin/bash

cd Z:\TestPlansUsingJmeter\apache-jmeter-2.9\bin

# Run Test
.\jmeter -n -t Z:\TestPlansUsingJmeter\GetAvailability.jmx -l    Z:\TestPlansUsingJmeter\Results\results.jtl

# Generate PNG File using plugin
java -jar Z:\TestPlansUsingJmeter\apache-jmeter-2.9\lib\ext\CMDRunner.jar --tool Reporter --generate-png Z:\TestPlansUsingJmeter\graphs\test.png --input-jtl    Z:\TestPlansUsingJmeter\Results\results.jtl --plugin-type ResponseTimesOverTime --width 800 --height 600

Please guide what I am doing wrong as keep getting the following error after executing this:-

.\jmeter : Uncaught Exception java.lang.NullPointerException. See log file for details.
At line:6 char:1
+ .\jmeter -n -t Z:\TestPlansUsingJmeter\GetAvailability.jmx -l Z:\T ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (Uncaught Except...le for details.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

java : java.lang.Throwable: Could not access Z:\TestPlansUsingJmeter\apache-jmeter-2.9\lib\ext\lib
At line:9 char:1
+ java -jar Z:\TestPlansUsingJmeter\apache-jmeter-2.9\lib\ext\CMDRunner.jar --tool ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 + CategoryInfo          : NotSpecified: (java.lang.Throw...2.9\lib\ext\lib:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

at kg.apc.cmd.UniversalRunner.buildUpdatedClassPath(UniversalRunner.java:109)
at kg.apc.cmd.UniversalRunner.<clinit>(UniversalRunner.java:55)
役に立ちましたか?

解決 2

Seems like a bug in it. As script has some disabled tests added with same name. Removing them from the test fixed the problem. Looks like they cause no problem when executed via GUI but when executed using non GUI mode creates an exception.

他のヒント

That's a Java exception, not a PowerShell exception (i.e. it can't be caught in PowerShell), and the error message is rather self-explanatory:

Could not access Z:\TestPlansUsingJmeter\apache-jmeter-2.9\lib\ext\lib

Check if the folder exists and if the user running jmeter has access to it.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top