QAInsights / PerfAction

GitHub Action to run performance tests using Apache JMeter and its plugins.
MIT License
49 stars 68 forks source link
apache docker github-actions jmeter jmeter-plugins linux performance performance-testing

🚀 PerfAction

saythanks

This GitHub Action helps to automate performance testing using Apache JMeter and its plugins.

PerfAction also featured in LoadTestWorld 2021 conference.

PerfAction for JMeter

🤔 How to use this GitHub Action?

Prerequisites

Following are the prerequisites for this GitHub Action:

👇 Usage

Example #1 with no arguments

- name: JMeter Test
  uses: QAInsights/PerfAction@v5.6.2
  with:
    test-plan-path: ./TestPlans/S01_SimpleExample/S01_SimpleExample.jmx
    args: ""
- name: Upload Results
  uses: actions/upload-artifact@v3
  with:
    name: jmeter-results
    path: result.jtl
    if-no-files-found: error

Example #2 with arguments

- name: JMeter Test
  uses: QAInsights/PerfAction@v5.6.2
  with:
    test-plan-path: ./TestPlans/S01_SimpleExample/S01_SimpleExample.jmx
    args: "-H my.proxy.server -P 8000"

- name: Upload Results
  uses: actions/upload-artifact@v3
  with:
    name: jmeter-results
    path: result.jtl
    if-no-files-found: error

Example #3 with arguments to Generate HTML Reports

Please make sure that you create a directory where you want to generate HTML report.

- name: Create reports directory
  run: mkdir reports

- name: JMeter Test
  uses: QAInsights/PerfAction@v5.6.2
  with:
    test-plan-path: ./TestPlans/S01_SimpleExample/S01_SimpleExample.jmx
    args: "-e -o ./reports/html/"

- name: Upload Results
  uses: actions/upload-artifact@v3
  with:
    name: jmeter-results
    path: result.jtl
    if-no-files-found: error

- name: Upload HTML Reports
  uses: actions/upload-artifact@v3
  with:
    name: jmeter-html-reports
    path: reports
    if-no-files-found: error

📥 Download JMeter Test Results

By default, this GitHub Action will log the performance statistics under result.jtl. After the execution, it will be uploaded to the GitHub artifacts.

To download the JMeter results, go to your Actions and then click on the executed workflow, then click on jmeter-results link which will download the zip file.

Download-JMeter-Results