-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(enhancement) Updating load test to run a scenario fetching the test …
…run and the summary
- Loading branch information
Showing
2 changed files
with
24 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import http from 'k6/http'; | ||
import { check, group } from "k6"; | ||
|
||
export let options = { | ||
stages: [ | ||
{ duration: "120s", target: 50 } | ||
] | ||
}; | ||
|
||
export default function () { | ||
const publicId = "IPJKBPXBKY8B"; | ||
|
||
const statusCheck200 = { | ||
"status is 200": (r) => r.status === 200 | ||
} | ||
|
||
group('fetch test run details', () => { | ||
const testRunResponse = http.get(`http://localhost:8080/run/${publicId}`); | ||
check(testRunResponse, statusCheck200); | ||
|
||
const testRunSummaryResponse = http.get(`http://localhost:8080/run/${publicId}/summary`); | ||
check(testRunSummaryResponse, statusCheck200); | ||
}) | ||
}; |