Generating html report in workspace with Taurus and Performance plugin in Jenkins - performance

I am using Taurus with Performance plugin to run my Jmeter tests in Jenkins. Although I get the Performance report in Jenkins but I am not getting an html file generated in the workspace which I can send in the email body as report. Currently in the email I am just sending a link to the report but I do not want users to click on the link to go to the Jenkins Performance report, I need the report in the email body.
Please let me know if there is any way to get the html report in the email body or convert aggregate_report.xml file to html in the workspace?
Thanks in Advance !

You can convert .xml result file into HTML using i.e. JMeter Ant Task
Configure your JMeter result file to end with .jtl rather than with .xml, i.e aggregate_report.jtl
Configure Jenkins to convert .jtl into .html using aforementioned Ant task by adding the next Jenkins pipeline step:
node {
dir('/path/to/jmeter/extras') {
bat "ant -Dtest=aggregate_report xslt-report"
step([$class: 'ArtifactArchiver', artifacts: 'aggregate_report.html', fingerprint: true])
}
}
More information: Running a JMeter Test via Jenkins Pipeline - A Tutorial

Related

JMeter Summary report shows subsamplers

When I run my test through JMeter Graphic User Interface, Summary report shows my steps, which are Transaction Controllers, just with parent sampler: which is OK for me. But, when I open log file (*.jtl) in Summary report after test run, I see all samplers - parent sampler with subsamplers: How I have to set configuration in such way that, when running test through CLI mode and open log file to see just parent samplers?
Thanks in advance.
It looks JMeter issue, it worth reporting it via JMeter Bugzilla.
In the meantime you can consider the following options:
Add the next line to user.properties file (lives in "bin" folder of your JMeter installation):
jmeter.save.saveservice.subresults=false
this way you will have only "top-level" SampleResults in the .csv file. See Results file configuration related properties to see what else you can amend.
Generate HTML Reporting Dashboard from the .csv file
jmeter -g /path/to/testresults.csv -o /path/to/dashboard
The dashboard will have the summary table without these extra subresults
Use JMeter Plugins Command Line Tool to generate the CSV form of the Summary Report in command-line without having to open JMeter GUI, add Listener, etc
./JMeterPluginsCMD.sh --generate-csv /path/to/summary.csv --input-jtl /path/to/testresults.csv --plugin-type SynthesisReport
in this case summary.csv will be in the format you're looking for.
Both JMeter Plugins Command Line Tool and Synthesis Report can be installed using JMeter Plugins Manager

How can I generate Aggregate Report. jtl and ResultsTable.csv by executing the existing JMeter script via Taurus

I know we have to run the command bzt xxxx.jmx to execute the existing JMeter script via Taurus and after few mins we will see the nice dashboard.
My question is after the test execution completed how can I generate and view the AggregateReport.jtl and ResultsTable.csv. We are using these 2 for our analysis and report.
How do I achieve this?
Please advise me!
Thanks,
Rajani
After test execution Taurus generates some artifacts including normal JMeter .jtl results file.
Open JMeter GUI. You can do it by appending -gui postfix to your Taurus execution command like:
bzt yourtest.yaml -gui
Add Aggregate Report Listener to your Test Plan
Click "Browse" button and locate kpi.jtl file inside Taurus artifacts folder.
References:
Taurus JMeter Executor
Navigating your First Steps Using Taurus

Failed to publish TestNG Report in Jenkins

I have used Maven project with Selenium & TestNG to create automated scripts which I want to execute from Jenkins. In Jenkins I have added the TestNG plugin to publish the TestNG report. But it is not getting displayed. I'm getting the below mentioned error.
Error:
TestNG Reports Processing: START
Looking for TestNG results report in workspace using pattern: /target/surefire-reports/testng-results.xml
Did not find any matching files.
Finished: SUCCESS
Actual path of the TestNG report file:
E:\STUDY_MATERIAL\JAVA\WORKSPACE\SeleneniumFrameWork\target\surefire-reports\testng-results.xml
I have tried the following options but didn't work out for me.
Tried giving the full path of the TestNG report. Forward ans backward slash in the pattern.
I have tried different other options by changing the TestNG result file path but it's working for me.
Please share some inputs on how to resolve this issue.
"testng-results.xml" file is available in workspace. But it's failed to display the report. I have attached screenshot of Jenkins workspace and Console Output.
Note: I am using Jenkins 2.7.0 in Windows 10.
Jenkins Workspace
I have attached the Job configuration details of Jenkins.
Job Configuration Details
Few checkpoints :
1. Check if testng is producing this file at the specified location : /target/surefire-reports/testng-results.xml
2. TestNG needs to be configured to generate xml report
If this file is there, pass path in file locator as :
target/surefire-reports/testng-results.xml
Hopefully, you will get results on jenkins if everything mentioned above is correct.

Bamboo Script Task using inline bat commands failing

Im new to Bamboo and just trying to run this two lines of code in the script task.
cd C:\apache-jmeter-2.11\bin\
jmeter-n.cmd Test.jmx​
It is failing and it is showing this message on the logs.
Failing task since return code of [c:\Program Files\Bamboo\temp\TEST-16-ScriptBuildTask-4637676047487491491.bat] was -1 while expected 0
Is path to JMeter correct?
Does Test.jmx script live in JMeter's bin directory
Do you have "java.exe" in your PATH environment variable? Does Bamboo pick it up?
Can you look into "C:\apache-jmeter-2.11\bin\Test.log" file to see whether they are errors there. If there is no such a file one of points 1-3 isn't met.
Are you aware of Bamboo JMeter Plugin?
By the way, Bamboo is capable of executing Ant or Maven tasks and JMeter test can be kicked off using these build systems as well.
References:
Automated Performance Testing using Maven and JMeter
JMeter Maven Plugin
5 Ways To Launch a JMeter Test without Using the JMeter GUI

Create multiple jmeter.log files

I am using Jmeter for performance testing and running our tests via Jenkins build server.
We have Jmeter installed on our jenkins box and I am using an Ant build file to launch the jmx file and create the jtl report; which is then evaluated via the Performance plugin in Jenkins.
My problem is that we only have one instance of Jmeter and as such it only creates one jmeter.log file in the /bin directory.
As we will have multiple jobs calling the one Jmeter installation I don't want it, potentially, writing to the same log.
Is there a way of specifying multiple jmeter.log files per plan/job or amending the location?
Thanks for your suggestions. Using a Jmeter Ant Task and have managed to place the log file into the workspace of the jenkins job by the following:
jmeterlogfile="${basedir}/jmeter.log"
This sits within the JMeter tags within the build file.
Without changing .properties file, running jmeter from Windows cmd, simply navigate to bin folder and pass the argument -j[yourLogFileName.log], if you want log entries in a different log file.
C:\apache-jmeter-2.11\bin>jmeter.bat -j myLog.log

Resources