Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML report, jmeter-report error #45

Open
staleks opened this issue Apr 10, 2015 · 6 comments
Open

HTML report, jmeter-report error #45

staleks opened this issue Apr 10, 2015 · 6 comments

Comments

@staleks
Copy link

staleks commented Apr 10, 2015

Hi,

I've added simple JMeter test (Testing 200 HTTP Status Code check on Google page).

Test is executed, I have xml as report
1428666959184,194,HTTP Request,200,OK,Thread Group 1-1,text,true,18786,1,1,176

But just before finishing Gradle task there is an error that I can see:

:jmeterRun
file:///home/astoisavljevic/work-home/gradle-jmeter/workspace/gradle-jmeter/build/jmeter-report/google-homepage.jmx-20150410-1355.xml; Line #1; Column #1; Content is not allowed in prolog.

BUILD SUCCESSFUL

Total time: 9.054 secs

When I try to examine file:
google-homepage.jmx-20150410-1355-report.html

it is empty.

Can you please put some light on this problem?

Maybe I am doing something wrong?

Thnx

@foragerr
Copy link
Contributor

Can you show your results xml file please? is it in XML format?

@staleks
Copy link
Author

staleks commented Apr 10, 2015

You might be right, it can be the problem.

Here is the content of "XML file"

1428666959184,194,HTTP Request,200,OK,Thread Group 1-1,text,true,18786,1,1,176

As you can see it is CSV :)

Further more, I've put this project in GitHub, so you can also see for yourself:
https://github.com/staleks/gradle-jmeter-example

@foragerr
Copy link
Contributor

https://github.com/staleks/gradle-jmeter-example/blob/master/src/test/jmeter/google-homepage.jmx#L77

Check the "save as xml" checkbox in your listener configuration.

@staleks
Copy link
Author

staleks commented Apr 10, 2015

I've changed that checkbox as you stated, but problem still persists:

astoisavljevic@astoisavljevic-laptop:~/work-home/gradle-jmeter/workspace/gradle-jmeter$ ./gradlew jmeterRun
> Building 0% > :jmeterRunCreating summariser <summary>
Created the tree successfully using /home/astoisavljevic/work-home/gradle-jmeter/workspace/gradle-jmeter/src/test/jmeter/google-homepage.jmx
Starting the test @ Fri Apr 10 20:29:35 CEST 2015 (1428690575612)
Waiting for possible shutdown message on port 4445
summary =      1 in     1s =    1.7/s Avg:   234 Min:   234 Max:   234 Err:     0 (0.00%)
Tidying up ...    @ Fri Apr 10 20:29:36 CEST 2015 (1428690576893)
... end of run
:jmeterRun
file:///home/astoisavljevic/work-home/gradle-jmeter/workspace/gradle-jmeter/build/jmeter-report/google-homepage.jmx-20150410-2029.xml; Line #1; Column #1; Content is not allowed in prolog.

BUILD SUCCESSFUL

Total time: 7.634 secs
astoisavljevic@astoisavljevic-laptop:~/work-home/gradle-jmeter/workspace/gradle-jmeter$ 

Check test now in master branch :(

@foragerr
Copy link
Contributor

Hmm, seems to be a defect in the plugin. I cant find where log format is being set to CSV, because jmeter default is XML. If you need a workaround, add this line to your jmeter.properties:

jmeter.save.saveservice.output_format=xml

@staleks
Copy link
Author

staleks commented Apr 12, 2015

Yes.

I've tried this solution and it works.

You may close this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants