-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsuite.js
More file actions
52 lines (45 loc) · 1.32 KB
/
Copy pathsuite.js
File metadata and controls
52 lines (45 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import { group } from "k6";
import { htmlReport } from 'https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js';
import updateActivity from '../tests/activities/put-activities.test.js';
import sendAuthor from '../tests/authors/post-author.test.js';
/**
IMPORTANT!
If you want to control the Load through the suite.js, you have to unconsider the options defined in the individual test files.
*/
export let options = {
scenarios: {
createActivity: {
executor: 'constant-arrival-rate',
rate: 5,
timeUnit: '1s',
duration: '30s',
preAllocatedVUs: 5,
maxVUs: 10,
stages: [{ target: 10, duration: '30s' }, { target: 0, duration: '10s' }]
}
},
createAuthor: {
executor: 'constant-arrival-rate',
rate: 5,
timeUnit: '1s',
duration: '30s',
preAllocatedVUs: 5,
maxVUs: 10,
stages: [{ target: 10, duration: '30s' }, { target: 0, duration: '10s' }]
}
};
export function createActivity() {
group('Create Activity', () => {
updateActivity();
});
}
export function createAuthor() {
group('Create Author', () => {
sendAuthor();
});
}
export function handleSummary(data) {
return {
'relatorio.html': htmlReport(data)
};
}