Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
it-bott-integrasjoner
ubw-client
Commits
b8047180
Commit
b8047180
authored
Feb 09, 2021
by
Petr Kalashnikov
Browse files
Make locust waiting time adjustable
parent
b3736561
Pipeline
#53837
failed with stage
in 2 minutes and 5 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
config.example.yaml
View file @
b8047180
...
...
@@ -60,3 +60,7 @@ transaction_service:
#wsdl: https://agr-bott-utv02.sfso.no/AgrBOTT_Utv02_WS/service.svc?BatchInputService/BatchInput
# wsdl is file based for now, dfo is not able to deliver via api mannager
wsdl
:
wsdl/batchinputservice.wsdl
locust_waiting_time
:
min_time
:
5.1
max_time
:
7.5
locust_testing/stresstest.py
View file @
b8047180
...
...
@@ -7,7 +7,8 @@ logger = logging.getLogger(__name__)
ubw_config
=
bios
.
read
(
"config.yaml"
)
endpoints_list
=
ubw_config
[
"rest"
][
"endpoints"
]
headers
=
ubw_config
[
"rest"
][
"headers"
]
min_waiting_time
=
ubw_config
[
"locust_waiting_time"
][
"min_time"
]
max_waiting_time
=
ubw_config
[
"locust_waiting_time"
][
"max_time"
]
def
get_endpoint
(
endpoint
):
return
"/"
+
endpoints_list
[
endpoint
][
"url"
]
+
"/"
...
...
@@ -111,4 +112,4 @@ class WebsiteTasks(TaskSet):
class
WebsiteUser
(
HttpUser
):
tasks
=
[
WebsiteTasks
]
wait_time
=
between
(
5.100
,
7.500
)
# to adjust in prod
wait_time
=
between
(
min_waiting_time
,
max_waiting_time
)
ubw_client/models.py
View file @
b8047180
...
...
@@ -93,11 +93,17 @@ class UbwRestBase(BaseModel):
endpoints
:
UbwRestEndpoints
=
UbwRestEndpoints
()
class
LocustWaitingTime
(
BaseModel
):
min_time
:
float
max_time
:
float
class
UbwClientConfig
(
BaseModel
):
# Base config for rest endpoints
rest
:
typing
.
Optional
[
UbwRestBase
]
import_service
:
typing
.
Optional
[
UbwSoapService
]
transaction_service
:
typing
.
Optional
[
UbwSoapService
]
locust_waiting_time
:
typing
.
Optional
[
LocustWaitingTime
]
class
Begrep
(
BaseModel
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment