Reputation: 161
Finished my performance test and need to make visible those test reports in my JIRA cases. Is there any efficient way to verify my JMeter test results in JIRA ? Please add some screenshots for my reference if there is any methods to be followed to achieve this requirement.
Thanks in advance
Upvotes: 0
Views: 2284
Reputation: 167992
As far as I'm aware JIRA has a set of REST APIs and looking into How to add an attachment to a JIRA issue using REST API article you should be able to upload JMeter test result into JIRA using the following command:
curl -D- -u {username}:{password} -X POST -H "X-Atlassian-Token: nocheck" -F "file=@{path/to/file}" http://{base-url}/rest/api/2/issue/{issue-key}/attachments
You can upload results file even from JMeter test itself, i.e.
Add the next line to user.properties file
jmeter.save.saveservice.autoflush=true
Add tearDown Thread Group to your Test Plan
Add HTTP Authorization Manager to the tear Down Thread Group and put your JIRA credentials there
Add HTTP Header Manager and configure it to send X-Atlassian-Token
header with the value of nocheck
Add HTTP Request sampler and configure it as follows:
https
POST
/rest/api/2/issue/issue-key/attachments
Use multipart/form-data for POST
boxIn the "File Upload" tab provide full or relative path to your .jtl results file and its MIME type. Keep "Parameter Name" value as file
See Performance Testing: Upload and Download Scenarios with Apache JMeter article for more information on performing file uploads using JMeter.
Upvotes: 1