Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #4

Merged
merged 1 commit into from
Apr 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 27 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,30 @@ Install with [`pip`](https://pypi.org/project/bloodaxe/)
---
```toml
[configs]
number_of_concurrent_flows = 10
duration = 60
number_of_concurrent_flows = 10 # Number of concurrent coroutines flows
duration = 60 # Stressing duration

[[api]]
[[api]] # Api context
name = "user_api"
base_url = "http://127.0.0.1:8080"
[api.envvars]
client_id = "CLIENT_ID"
base_url = "http://127.0.0.1:8080" # Base url at the moment, is the unique parameter in api section.
[api.envvars] # Environment variables for given api
client_id = "CLIENT_ID" # Envvars names
client_secret = "CLIENT_SECRET"

[[api]]
name = "any_api"
base_url = "http://127.0.0.1:1010"

[[request]]
name = "get_token"
url = "{{ user_api.base_url }}/token/"
[[request]] # Request context
name = "get_token"
url = "{{ user_api.base_url }}/token/" # Use user_api context to get the base_url
method = "POST"
timeout = 60
save_result = true
[request.data]
client_id = "{{ user_api.client_id }}"
timeout = 60 # The bloodaxe default timeout value is 10 secs, but it's possible override the default value
save_result = true # Save request result in request name context, default value is false
[request.data] # Request data section
client_id = "{{ user_api.client_id }}" # templating syntax is allowed in request.data
client_secret = "{{ user_api.client_secret }}"
[request.headers]
[request.headers] # Request header section
Content-Type = 'application/x-www-form-urlencoded'

[[request]]
Expand All @@ -68,16 +68,16 @@ method = "GET"
timeout = 60
save_result = true
[request.headers]
Authorization = "{{ get_token.access_token}}"
Authorization = "{{ get_token.access_token}}" # templating syntax is allowed in request.headers

[[request]]
name ="get_user_with_params"
url = "{{ user_api.base_url }}/users/"
method = "GET"
timeout = 60
save_result = false
[request.params]
name = "{{ get_user.name }}"
[request.params] # Request params section
name = "{{ get_user.name }}" # templating syntax is allowed in request.params/querystring
[request.headers]
Authorization = "{{ get_token.access_token}}"

Expand All @@ -86,18 +86,24 @@ name = "create_new_user"
url = "{{ user_api.base_url }}/users/"
method = "POST"
[request.data]
firstname = "{{ get_user.firstname }} teste"
lastname = "{{ get_user.Lastname }} teste"
status = "{{ get_user.status }} teste"
firstname = "{{ get_user.firstname }} test"
lastname = "{{ get_user.Lastname }} test"
status = "{{ get_user.status }} test"
[request.headers]
Authorization = "{{ get_token.access_token}}"
[request.response_check] # response_check feature checking response data and status_code
status_code = 201
[request.response_check.data]
firstname = "{{ get_user.firstname }} test" # templating syntax is allowed in response data checks
lastname = "{{ get_user.Lastname }} test"
status = "{{ get_user.status }} test"

[[request]]
name = "create_new_user_with_from_file"
url = "{{ user_api.base_url }}/users/"
method = "PATCH"
[request.data]
from_file = "user.json"
from_file = "user.json" # from_file help you configure request.data
[request.headers]
Authorization = "{{ get_token.access_token}}"
```
Expand Down