Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
… into main
  • Loading branch information
AhadAli01 committed Mar 3, 2024
2 parents a7c3e39 + bad03b8 commit a3ccbcc
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
29 changes: 29 additions & 0 deletions scripts/VUs/constantVUs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

import http from 'k6/http';
import { group, sleep } from 'k6';

const BASE_URL = `http://10.1.10.210:8080/tools.descartes.teastore.webui`;

const groupResponseTimes = {};

export const options = {
discardResponseBodies: true,
scenarios: {
blackTeaBrowse: {
executor: 'constant-vus',
vus: 109,
duration: '30s',
},
},
};

export default function () {
group('Black Tea Category Browse', () => {
const start = new Date();
http.get(`${BASE_URL}/category?category=2&page=1`);
const end = new Date();
const duration = end - start;
groupResponseTimes['Black Tea Category Browse'] = (groupResponseTimes['Black Tea Category Browse'] || 0) + duration;
sleep(1);
});
}
29 changes: 29 additions & 0 deletions scripts/constantVUs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

import http from 'k6/http';
import { group, sleep } from 'k6';

const BASE_URL = `http://10.1.10.210:8080/tools.descartes.teastore.webui`;

const groupResponseTimes = {};

export const options = {
discardResponseBodies: true,
scenarios: {
blackTeaBrowse: {
executor: 'constant-vus',
vus: 100,
duration: '30s',
},
},
};

export default function () {
group('Black Tea Category Browse', () => {
const start = new Date();
http.get(`${BASE_URL}/category?category=2&page=1`);
const end = new Date();
const duration = end - start;
groupResponseTimes['Black Tea Category Browse'] = (groupResponseTimes['Black Tea Category Browse'] || 0) + duration;
sleep(1);
});
}

0 comments on commit a3ccbcc

Please sign in to comment.