Skip to content

Commit

Permalink
Update server api running ip
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <[email protected]>
  • Loading branch information
VietND96 committed Nov 21, 2024
1 parent 0a3d008 commit 7d38066
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/run-jmeter-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ jobs:
run: |
npm install
npm start &
echo "SERVER_IP=$(hostname -I | awk '{print $1}')" >> $GITHUB_ENV
- name: Run JMeter Tests
uses: QAInsights/PerfAction@master
with:
test-plan-path: jmeter-files/test-plan.jmx
args: "-Jdomain=localhost -Jport=6060 -Jnum_threads=3000 -e -f -o reports"
args: "-Jdomain=${{ env.SERVER_IP }} -Jport=6060 -Jnum_threads=3000 -e -f -o reports"
- name: Upload Results
uses: actions/upload-artifact@main
with:
name: jmeter-results
path: reports,result.jtl
path: |
reports
result.jtl
- name: Publish Results with Latency Lingo
uses: latency-lingo/github-action@main
with:
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,21 @@ npm install
npm start &
```

Sample API server will be available at `http://localhost:6060`.

2. Run tests

```bash
jmeter -n -t jmeter-files/test-plan.jmx -Jdomain=localhost -Jport=6060 -Jnum_threads=3000 -e -f -l reports/result.jtl -o reports
```
jmeter -n -t jmeter-files/test-plan.jmx \
-Jdomain=localhost -Jport=6060 -Jnum_threads=3000 \
-e -f -l reports/result.jtl -o reports
```

3. Upload JMeter result to [Latency Lingo](https://latencylingo.com/dashboard)

```bash
JTL_RESULT_FILE=result.jtl LATENCY_LINGO_API_KEY=$LATENCY_LINGO_API_KEY \
./scripts/publish_to_latency_lingo.sh
```

Get the `LATENCY_LINGO_API_KEY` from [API Access](https://latencylingo.com/account/api-access) and export to environment.
1 change: 1 addition & 0 deletions scripts/publish_to_latency_lingo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# This script is used to publish the test results to Latency Lingo.

# Install Latency Lingo
cd reports
curl -L https://github.com/latency-lingo/cli/releases/latest/download/latency-lingo-cli_darwin_amd64.tar.gz | tar -xz

# Invoke the CLI with our results file
Expand Down

0 comments on commit 7d38066

Please sign in to comment.