Skip to content

Commit

Permalink
(enhancement) Updating load test to run a scenario fetching the test …
Browse files Browse the repository at this point in the history
…run and the summary
  • Loading branch information
craigatk committed Mar 31, 2020
1 parent b290443 commit 1617df4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
18 changes: 0 additions & 18 deletions server/test/load-test/getResults.js

This file was deleted.

24 changes: 24 additions & 0 deletions server/test/load-test/getRun.js
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);
})
};

0 comments on commit 1617df4

Please sign in to comment.