Recently added the blazemeter sense uploader plugin for reporting purposes and it is really nice. Post running the script, you get a sense.jtl file and a url to view the reports on the browser with valid authentication. Please suggest how to view the blazemeter sense report when I run the jmx script via the terminal or Jenkins?
1 Answer
If you're running Linux you can use grep command to fetch the URL from jmeter.log file like:
grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*/gui/[0-9]*/" jmeter.log | head -1
As a result it will produce URL to the results page like:
https://sense.blazemeter.com/gui/123456/
Which can be used for publishing as a build artifact in a form of HTML page, from Jenkins pipeline perspective it would be something like:
sh "cat > sense.html <<'EOF'\n" +
"<html>" +
"<body>\n" +
"<a href="https://sense.blazemeter.com/gui/123456/">https://sense.blazemeter.com/gui/123456/</a>\n" +
"</body>\n" +
" </html>"
And then publish the generated HTML file to the Jenkins dashboard like:
step([$class: 'ArtifactArchiver', allowEmptyArchive: true, artifacts: 'sense.html', fingerprint: true, latestOnly: true])