Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor edits #23

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@ jobs:
runs-on: ubuntu-latest
name: JMeter Test Execution
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Create reports directory
run: mkdir reports
- name: Create reports directory
run: mkdir reports

- name: Run JMeter Tests
uses: ./
with:
test-plan-path: ./TestPlans/S01_SimpleExample/S01_SimpleExample.jmx
args: "-e -o ./reports/html/"

- name: Run JMeter Tests
uses: ./
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
- name: Upload Results
uses: actions/upload-artifact@v3
with:
name: jmeter-results
path: result.jtl

- name: Upload Html Reports
uses: actions/upload-artifact@v3
with:
name: jmeter-reports
path: reports
- name: Upload HTML Reports
uses: actions/upload-artifact@v3
with:
name: jmeter-reports
path: reports
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ENV JMETER_BIN "${JMETER_HOME}/bin"
ENV PATH "$PATH:$JMETER_BIN"
ENV JMETER_CMD_RUNNER_VERSION "2.3"
ENV JMETER_PLUGIN_MANAGER_VERSION "1.9"
ENV JMETER_PLUGIN_INSTALL_LIST "jpgc-udp,jpgc-graphs-basic,jpgc-graphs-additional,jpgc-graphs-dist,jpgc-functions"
ENV JMETER_PLUGIN_INSTALL_LIST "jpgc-udp,jpgc-graphs-basic"

COPY entrypoint.sh /entrypoint.sh
COPY jmeter-plugin-install.sh /jmeter-plugin-install.sh
Expand Down
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# About PerfAction
# 🚀 PerfAction

[![](https://img.shields.io/badge/dev.to-Actions%20Hackathon-blue)](https://dev.to/qainsights/perfaction-run-jmeter-performance-tests-191)
[![saythanks](https://img.shields.io/badge/say-thanks-1EAEDB.svg)](https://saythanks.io/to/catch.nkn%40gmail.com)
Expand All @@ -8,13 +8,14 @@

This GitHub Action helps to automate performance testing using [Apache JMeter](https://jmeter.apache.org/) and its [plugins](https://jmeter-plugins.org/).

PerfAction also featured in LoadTestWorld 2021 conference.
PerfAction also featured in `LoadTestWorld 2021` conference.

![PerfAction for JMeter](./assets/Banner.jpg)

# How to use this GitHub Action?
# 🤔 How to use this GitHub Action?

## Prerequisites

Following are the prerequisites for this GitHub Action:

* `test-plan-path`
Expand All @@ -25,12 +26,13 @@ Following are the prerequisites for this GitHub Action:
* Additional arguments you can pass it to your test plan execution
* `test-results`
* Optional
* If you want your result to have a different extension than jtl such as .csv , default value result.jtl
## Usage
* If you want your result to have a different extension than jtl such as `.csv` default value `result.jtl`.

### Example #1 with no arguments
## 👇 Usage

```
### Example #1 with no arguments

```yaml
- name: JMeter Test
uses: QAInsights/[email protected]
with:
Expand All @@ -45,7 +47,7 @@ Following are the prerequisites for this GitHub Action:

### Example #2 with arguments

```
```yaml
- name: JMeter Test
uses: QAInsights/[email protected]
with:
Expand All @@ -60,9 +62,9 @@ Following are the prerequisites for this GitHub Action:
```
### Example #3 with arguments to Generate HTML Reports

make sure you create directory with the name where you want html report to be saved.
Please make sure that you create a directory where you want to generate HTML report.

```
```yaml
- name: Create reports directory
run: mkdir reports

Expand All @@ -83,10 +85,9 @@ make sure you create directory with the name where you want html report to be sa
with:
name: jmeter-html-reports
path: reports

```

## Download JMeter Test Results
## 📥 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.

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ branding:
inputs:
test-plan-path:
required: true
description: jmeter test plan to execute
description: JMeter test plan to execute
results-file:
required: false
description: Where to store the results e.g., result.csv
Expand Down
20 changes: 10 additions & 10 deletions jmeter-plugin-install.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#!/bin/sh
echo ${JMETER_HOME}
echo ${JMETER_CMD_RUNNER_VERSION}
echo ${JMETER_PLUGIN_MANAGER_VERSION}
echo ${JMETER_PLUGIN_INSTALL_LIST}
# Author: NaveenKumar Namachivayam
# Website: www.qainsights.com
# Purpose: Install JMeter Plugins

# Download CMDRunner
echo "Downloading CMDRunner"
curl -L http://search.maven.org/remotecontent?filepath=kg/apc/cmdrunner/${JMETER_CMD_RUNNER_VERSION}/cmdrunner-${JMETER_CMD_RUNNER_VERSION}.jar --output ${JMETER_HOME}/lib/cmdrunner-${JMETER_CMD_RUNNER_VERSION}.jar

# Download Plugin Manager
echo "Downloading Plugin Manager"
curl -L https://jmeter-plugins.org/get/ --output ${JMETER_HOME}/lib/ext/jmeter-plugins-manager-${JMETER_PLUGIN_MANAGER_VERSION}.jar

# Install Plugin Manager
java -cp /opt/apache/apache-jmeter-${JMETER_VERSION}/lib/ext/jmeter-plugins-manager-${JMETER_PLUGIN_MANAGER_VERSION}.jar org.jmeterplugins.repository.PluginManagerCMDInstaller

# Install JMeter plugins
cd /opt/apache/apache-jmeter-${JMETER_VERSION}/bin/
java -jar ${JMETER_HOME}/lib/cmdrunner-${JMETER_CMD_RUNNER_VERSION}.jar --tool org.jmeterplugins.repository.PluginManagerCMD install ${JMETER_PLUGIN_INSTALL_LIST}

chmod a+x ${JMETER_HOME}/bin/*.sh

pwd

ls -l ${JMETER_HOME}/bin/*.sh

# Set execute permissions for JMeter shell scripts
chmod a+x ${JMETER_HOME}/bin/*.sh