How to create variables at the test suite level while creating load test.
We need help to understand how to create variables at the test suite level while creating load test. For example, Please refer to the below steps:
- Perform ‘GET Test step’ at one test case where parameters for GET step are available at same test case another step.
- Perform ‘Delete Test step’ at another test case where resources for DELETE is ‘ID’ test property from STEP 1 ‘GET Test step’ JSON Response.
We are using the ‘get data’ functionality of READYAPI which works correctly in the case of functional testing.
But seems it does not work in load testing as intended and gives an error. Because it keeps on referring to ‘ID’ created in functional test.
We need to have ‘ID’ created dynamically to work the Load test correctly.
Please refer below details :
ID parameter created using get data :
Variable from one case to another for ID: “${#[Positive Scenarios_7.0_2022#Master Schedule#HTTP Request Section GETPATTERN_copy]#ResponseAsXml#//Response[1]/e[1]/id[1]}”
Variable within same case for ID: “${HTTP Request Section-GETPATTERN_copy#ResponseAsXml#//Response[1]/e[1]/id[1]}”
- I have tried using setPropertyValue along with groovy script which also works for functional test but failed to load with the same error.
- Please refer to attached my groovy script which gets executed before the delete action. It gets value from previous test case and stores the value to property “SectionID” at the Delete test case level (Delete Master Schedule as per below screenshot). While running delete action, it refers this “SectionID”.
- Can anyone try our scenario with any open API (e.g. Post & get in one test case and delete from another test case) at readyapi load and share results?