JMeter + Jenkins - How to view Response Data/Assert Failed Results using Performance Plugin in Jenkins - jenkins

I am integrating JMeter to Jenkins and displaying the result/report using the Performance Plugin and so far it is working fine when the the report shows the Info about if the request is successful or failed, how much time does it take, percentage of error...
I would like to display here more Info if the request is failed, such as Response Data, or in case if it is failed because of an assertion, it should display the message here. Saying in other words, these approaches should act same as View Results Tree Listener in JMeter GUI but I do not know how to attach it to the Performance Plugin in Jenkins.
Does anyone have an idea how to achieve it? Thank you in advanced!

What you can do it add to your plan a View Results Tree and:
fill in file name property.
Click on Configure and check everything except CSV Column Names
Set Errors only
This way, when an error occurs, you'll have all details in this XML file which you can load in JMeter after test to analyze errors.

Related

Add detailed failed tests information to email sent from jenkins

I had successfully configured jenkins build jobs send emails out with basic information in. The content is defined as:
Check console output at $BUILD_URL to view the results.
${FAILED_TESTS}
However, the ${FAILED_TESTS} only return the top-level information, e.g.
1 tests failed. FAILED: XXXMainTest.test Error Message: expected: but was: Stack Trace: java.lang.AssertionError: expected: but was: at test.XXXXTest.test(MainTest.java:27)
If I want to see detailed information thrown from the failed test, I need to click the link and click through each test suite until seeing the test failure information at every end.
Do you have any advice to add detailed tests information to email? Thanks.
I think you will find some help with this plugin:
EMail-ext Plugin
New to version 2.15 is the ability to add attachments using the Ant pattern matching syntax used in many places in Jenkins. You can set a maximum total attachment size in the global configuration page, or it will be unlimited.

Log build file size using Jenkins and display results

This is a broad question, so any answers are deeply appreciated. I need to continually log the size of several build files (in this case some CSS and JS files), preserve this log and ideally show it as a dashboard in Jenkins.
I know that I can setup a cron job and execute a bash script to grab the files and log their size, but I'm not sure where this file would live and how to display it. Ideally the result would be a dashboard plot or bar graph over time.
Thanks.
P.S. I'm open to other logging suggestions, but Jenkins seems like the appropriate system to do this in.
Update: this isn't perfect but it works. Google Spreadsheets has a simple API for posting data, so this can work as an endpoint for any script you want to write that logs your data.
It's not a Jenkins solution, but gets the job done.
In my search leading up to this, I did come across JMeter, and the Performance Plugin for Jenkins, which were contenders for a possible solution.

Is it possible to publish arbitrary JUnit results to SonarQube?

I am running sitespeed.io tests in Jenkins, and have configured it to output junit format test results.
I'd now like to publish those test results to SonarQube (I realise I can publish them in Jenkins, but I have a requirement to keep everything in one place as much as possible).
However, when I add the test results file into the Sonar analysis (using sonar.junit.reportsPath=/path/to/sitespeed-results, having named my results file TESTS-sitespeed.xml) SonarQube doesn't seem to show any results on its dashboard.
I understand that SonarQube also has a setting to configure the location of test files, and this is often cited as a reason for test results not being ingested correctly, and that leads me to wonder whether what I'm trying to do is possible.
Any help would be greatly appreciated.
Thanks,
Jez
the property sonar.junit.reportsPath will read and parse the report but will only save the information if the class name indicated by the report can be mapped back to a java resource of the project.
I have no idea about the output of your test in surefire format but I sense the classname won't match any resource of your project and so your report is parsed but data is ignored.

Dataflow job fails, but the step still shows successful

Our pipeline failed, but the graph in the developers console still shows it as been successful. However, the results were not written to BigQuery, and the job log clearly shows it failed.
Shouldn't the graph show it as failed too?
Another example:
Another example:
This was a bug with the handling of BigQuery outputs that was fixed in a release of the Dataflow service. Thank you for your patience.

Is it possible to configure CruiseControl.net to display task exit codes in results?

My company is developing a web application that builds in ant. I've been tasked with getting CruiseControl.net to differentiate between a build failure and a unit test failure, which it can't do natively. ( It currently lumps both together but doesn't help developers understand what's broken )
I have CC.net call a script that returns specific exit codes depending on the nature of an ant task failure. I'd like these exit codes to be reflected in the CC.net failure report / dashboard but am having some trouble finding resources on how this might be done.
Any suggestions?
Not directly. All the reports and display works from information in the logs which are XML files. The display and reports work by applying XSLT to these XML files.
Take a look at your build logs and unit test logs, to see if each of those process write the failure information to their respective log files.
If they do, you should be able to write a custom XSLT or modify the existing XSLT to display that information.
Edit:
A different approach based on your comment. You could probably redirect the ANT error code to a file. Then you could have a seperate ccnet task that takes the error code from that file and re-format and display it (depending on how/where you want it displayed)

Resources