Rathu
Rathu

Reputation: 11

org.apache.jmeter.report.dashboard.GenerationException: Cannot create temporary directory "temp"

I have a test plan with a thread group and a HttpRequest . The test runs successfully creating a .csv file with the results. When i try to generate reports using jmeter dashboard report generation with the command jmeter -g .csv file -o outputfile , I get the below exception.

ERROR - jmeter.report.dashboard.ReportGenerator: Cannot create temporary directory "temp".

FATAL - jmeter.JMeter: An error occurred:  org.apache.jmeter
.report.dashboard.GenerationException: Cannot create temporary directory "temp".

        at org.apache.jmeter.report.dashboard.ReportGenerator.createTempDir(Repo
rtGenerator.java:287)
        at org.apache.jmeter.report.dashboard.ReportGenerator.generate(ReportGen
erator.java:203)
        at org.apache.jmeter.JMeter.start(JMeter.java:478)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.jmeter.NewDriver.main(NewDriver.java:259)

An error occurred: Cannot create temporary directory "temp".
errorlevel=

1

Upvotes: 0

Views: 2538

Answers (3)

nibty
nibty

Reputation: 359

You need to provide a writable location for the temp directory.

https://jmeter.apache.org/usermanual/properties_reference.html

jmeter.reportgenerator.temp_dir

Sets the temporary directory used by the generation process if it needs file I/O operations. Defaults to: temp

Upvotes: 1

Atul Kumar
Atul Kumar

Reputation: 73

Try the following command:

jmeter -g <.jtl file location> -o <Path to output folder>

or

jmeter -n -t <test JMX file> -l <test log file> -e -o <Path to output folder>

Also, Ensure JMeter has the rights to create and write in the folder "temp"(output directory).

Upvotes: -1

Naveen Kumar R B
Naveen Kumar R B

Reputation: 6398

Following is the syntax to generate Dashboard report from existing csv file:

jmeter -g <log file> -o <Path to output folder>

here,

-g log file name (can be absolute file path also)
-o output folder but not file name (can be absolute folder path)

Note: If you give absolute paths and if it contains spaces in the path, then keep the absolute path in double quotes.

eg:

jmeter -g sample.csv "D:/temp folder/"

here, the assumption is that sample.csv is present in bin directory of JMeter. (same directory as jmeter.bat)

Upvotes: 1

Related Questions