Alejandro21
11 years agoOccasional Contributor
Generating the request values at runtime..
Hi all,
I have a test case with 3 test steps that basically do these:
Step 1: Groovy script that uses XmlHolder to generate the request step 2 will send using a specified business logic
Step 2: Soap Request
Step 3: Groovy script that analyzes and stores the values received by step 2 request.
I've notice that step 1 takes more time to execute than the one I would expect. I have two questions that might help me improve the step performance
1) Because every time the case runs the request is based on the request generated the last time the case was executed,step 1 has to add/delete nodes according to the established business logic. I guess this nodes content analysis is what makes the step slow. Is there a way I can erase all the node values at the start of the script? I guess it would be faster to start generating the node values while working with a "clean" xml every time.
2) In the end, I'll create a load test based on this test case and I want that every time the case runs, the majority of the time is being spent in step 2. I was wondering if there is a way that, instead of using XmlHolder+logic, I could store all the different xmls the load test will send in a Data Source (DB) and have a simpler groovy script that only reads the xml from the data source and replaces the request xml. Is this even possible? If positive, does anybody have a starting point to share?
Any other suggestions of how I can do this are more than welcomed!
Regards,
Alejandro
I have a test case with 3 test steps that basically do these:
Step 1: Groovy script that uses XmlHolder to generate the request step 2 will send using a specified business logic
Step 2: Soap Request
Step 3: Groovy script that analyzes and stores the values received by step 2 request.
I've notice that step 1 takes more time to execute than the one I would expect. I have two questions that might help me improve the step performance
1) Because every time the case runs the request is based on the request generated the last time the case was executed,step 1 has to add/delete nodes according to the established business logic. I guess this nodes content analysis is what makes the step slow. Is there a way I can erase all the node values at the start of the script? I guess it would be faster to start generating the node values while working with a "clean" xml every time.
2) In the end, I'll create a load test based on this test case and I want that every time the case runs, the majority of the time is being spent in step 2. I was wondering if there is a way that, instead of using XmlHolder+logic, I could store all the different xmls the load test will send in a Data Source (DB) and have a simpler groovy script that only reads the xml from the data source and replaces the request xml. Is this even possible? If positive, does anybody have a starting point to share?
Any other suggestions of how I can do this are more than welcomed!
Regards,
Alejandro