-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsuite.ts
More file actions
56 lines (49 loc) · 1.52 KB
/
suite.ts
File metadata and controls
56 lines (49 loc) · 1.52 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
53
54
55
56
import { group } from "k6";
import { htmlReport } from 'https://raw.githubusercontent.com/benc-uk/k6-reporter/main/dist/bundle.js';
import createAuthor from './authors/post-author.test.ts';
import createActivity from "./activities/post-activities.test.ts";
/**
**IMPORTANT**
If you want to control the Load through the suite.ts, you have to unconsider the options defined in the individual test files.
*/
export let options = {
scenarios: {
createActivity: {
executor: 'ramping-arrival-rate',
exec: 'createActivitySuite',
timeUnit: '1s',
preAllocatedVUs: 5,
maxVUs: 10,
stages: [
{ target: 10, duration: '15s' },
{ target: 5, duration: '10s' }
],
},
createAuthor: {
executor: 'ramping-arrival-rate',
exec: 'createAuthorSuite',
timeUnit: '1s',
preAllocatedVUs: 5,
maxVUs: 10,
stages: [
{ target: 10, duration: '15s' },
{ target: 5, duration: '10s' }
],
},
},
};
export function createActivitySuite(): void {
group('Create Activity', () => {
createActivity();
});
}
export function createAuthorSuite(): void {
group('Create Author', () => {
createAuthor();
});
}
export function handleSummary(data: any): Record<string, string> {
return {
'relatorio.html': htmlReport(data)
};
}