I am using Jmeter for functional testing and not just for load testing. All the examples that I see for reports are for load testing, and I do not see how it is effective for functional, I do not care speed of response latency and so on. I care about sampler response, is http get 200 OK, is the assertion succeed or not the response message that I write, the JDBC response with my response message. Is their a way to use Jmeter reports to see al that? I have a test plan with 50 tests, is their any example of how it should look like in reports? Once again not care for this test from performance or load at all, just functional, Is their any guide since all the info I see its about performance and not functional
3 Answers
You should look into Jmeter+ant integration. You can run .jmx files using Ant and generate HTML report. The HTML report gives the success and failure rate and response message as well.
Steps to run JMeter .jmx with Ant:
- Install Apache Ant and the installation should be in your path.
- Copy your .jmx file into your apache JMeter's /extras folder and replace existing Test.jmx file your own.
- Type the command
ant
. - Ant will generate the .jtl and .html file with the same name as your .jmx file.
If you want to run the tests using continuous integration and Jenkins. Please follow the below nice blog.
You should check the
for example for each listener you can click Configure
and choose Save Configuration, in your case you can check only
Save Success
- if it succeeded or failedSave Field Names (CSV) - header line
Save Label - to know which request succeeded or failed
if no checkbox is checked you will get an empty lines for each sampler
You will get results as
label,success
HTTP Request,true
HTTP Request,true
HTTP Request2,false
HTTP Request2,false
You can precisely control what is being saved into .jtl results file by using dedicated JMeter Properties which names start from jmeter.save.saveservice
Example configuration will look like
jmeter.save.saveservice.output_format=xml
jmeter.save.saveservice.response_data=true
jmeter.save.saveservice.response_data.on_error=true
jmeter.save.saveservice.bytes=true
#etc.
This way you will get a .jtl results file in .XML format which can be examined using View Results Tree listener.
You can also view this .jtl file directly in browser, however you will need to add one line to it in order to specify the desired XSL stylesheet to it like:
<?xml-stylesheet type="text/xsl" href="C:\apache-jmeter-3.3\extras\jmeter-results-report_21.xsl"?>
More information: Visualizing JMeter .jtl Files Viewed as An .xsl Stylesheet