-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.yaml
110 lines (107 loc) · 3.32 KB
/
config.yaml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
log_level: "Trace"
parallel: 1
runner:
target_rps: 3
duration: 2s
batch_size: "Auto"
# batch_size: 2
base_url: "http://localhost:8081"
global:
scripts: |
def COUNTER = 0
def IMSI = 11000
requests:
- name: chargingDataCreate
method: POST
path: "/nchf-convergedcharging/v2/chargingdata"
headers:
- content-type: "application/json"
body: |
{
"notifyUri": "http://chf/callback/notify",
"oneTimeEvent": true,
"invocationSequenceNumber": ${COUNTER},
"invocationTimeStamp": "${now}",
"subscriberIdentifier": "imsi-${imsi}",
"nfConsumerIdentification": {
"nFIPv6Address": "2001:db8:85a3::8a2e:370:7334",
"nFIPv4Address": "198.51.100.1",
"nFName": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"nodeFunctionality": "SMF",
"nFPLMNID": {
"mnc": "${random}",
"mcc": "${random}"
}
}
}
timeout: 3s
before:
scripts: |
def now = now()
def random = random(100,999)
def IMSI = IMSI + 1
def imsi = IMSI
after:
scripts: |
assert responseStatus == 201
assert responseHeaders['content-type'][0] == 'application/json'
assert response['invocationSequenceNumber'] == #notnull
#
def COUNTER = COUNTER + 1
def locations = responseHeaders['location']
def location = locations[0]
def index = location.lastIndexOf('/')
def index = index + 1
def chargingDataRef = location.substring(index)
- name: chargingDataUpdate
method: POST
path: "/nchf-convergedcharging/v2/chargingdata/${chargingDataRef}/update"
headers:
- content-type: "application/json"
body: |
{
"invocationSequenceNumber": ${COUNTER},
"invocationTimeStamp": "${now}",
"subscriberIdentifier": "imsi-${imsi}",
"nfConsumerIdentification": {
"nFIPv6Address": "2001:db8:85a3::8a2e:370:7334",
"nFIPv4Address": "198.51.100.1",
"nFName": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"nodeFunctionality": "SMF",
"nFPLMNID": {
"mnc": "${random}",
"mcc": "${random}"
}
}
}
timeout: 3s
after:
scripts: |
assert responseStatus == 200
def COUNTER = COUNTER + 1
- name: chargingDataRelease
method: POST
path: "/nchf-convergedcharging/v2/chargingdata/${chargingDataRef}/release"
headers:
- content-type: "application/json"
body: |
{
"invocationSequenceNumber": ${COUNTER},
"invocationTimeStamp": "${now}",
"subscriberIdentifier": "imsi-${imsi}",
"nfConsumerIdentification": {
"nFIPv6Address": "2001:db8:85a3::8a2e:370:7334",
"nFIPv4Address": "198.51.100.1",
"nFName": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"nodeFunctionality": "SMF",
"nFPLMNID": {
"mnc": "${random}",
"mcc": "${random}"
}
}
}
timeout: 3s
after:
scripts: |
assert responseStatus == 204
def COUNTER = COUNTER + 1