PRAKASH RAMANATHAN
PRAKASH RAMANATHAN

Reputation: 161

Is there any option to see my JMeter reports in JIRA?

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

Answers (1)

Dmitri T
Dmitri T

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.

  1. Add the next line to user.properties file

    jmeter.save.saveservice.autoflush=true
    
  2. Add tearDown Thread Group to your Test Plan

  3. Add HTTP Authorization Manager to the tear Down Thread Group and put your JIRA credentials there

    JIRA Authr Manager

  4. Add HTTP Header Manager and configure it to send X-Atlassian-Token header with the value of nocheck

    JMeter HTTP Header Manager

  5. Add HTTP Request sampler and configure it as follows:

    • Protocol: your JIRA installation protocol, most likely https
    • Host: your JIRA installation IP address or hostname
    • Method: POST
    • Path: /rest/api/2/issue/issue-key/attachments
    • Tick Use multipart/form-data for POST box
    • In the "File Upload" tab provide full or relative path to your .jtl results file and its MIME type. Keep "Parameter Name" value as file

      JMeter JIRA Upload File

See Performance Testing: Upload and Download Scenarios with Apache JMeter article for more information on performing file uploads using JMeter.

Upvotes: 1

Related Questions