Parameterized Test
Parameterizing a test involves defining sets of data that can modify the behavior of the test based on the given parameters. This method is highly beneficial for conducting robust testing across different scenarios using the same test.
Example 1
parameterized-test
params:
- name: morpheus
location: France
- name: tesla
location: USA
tasks:
- action: actions.sampleHttpGetRequest
actions.sampleHttpGetRequest
method: GET
baseUrl: https://example.com
body: |
{
"name": "${{params.name}}",
"location": "${{params.location}}"
}
Example 2
parameterized-test
params:
- workspaceId: 1
- workspaceId: 2
tasks:
- action: |-
import tesmon_utils.selenium as tm
driver = tm.create_driver(1211, 944)
driver.get("https://app.tesmon.io/workspaces/${{params.workspaceId}}")