| || |
- 1 Post By Irsath
Server Response XML elements differs in sequence during recording and validation
We are trying to test the performance for GWT web-based application using Neoload 4.1 trial edition. We found a inconsistent sequence issue ie., the server response xml elements differs in sequence during recording and validation. We have parametrized a server response XML element and replaced in the following requests due to this sequence issue the parametrized variable takes some other element value and ends in the error. Please refer the below XML Server Response.
Server Response during recording
Server Response during validation
<String>1005200</String> // Sequence Issue
Parametrized the value 1005200 as /rowData/String
Value during recording - 1005200
Value during validation- 100
Please anyone help me to resolve this issue.
I can think couple of solutions for this.
1. During correlation, u might need to set the correct occurance. Check what have you defined.
2. You can try the Xpath extraction for correlation. Say, give the starts with and ends with...i think these will be unique in XML or give a unique start and end strings. While u do this, u can check the values that will be extracted during the run in the bottom of variable extractor dialg
Last edited by Irsath; 08-30-2013 at 06:09 AM.
Irsath thanks for your reply
1. I have tried your first solution already, when the above issue occurs on day1 changed the xpath expression from "/rowData/String" to "/rowData/String" for the value 1005200. The script executed successfully with no issue. On day2 again executed the same script now the recorded and validation server response XML are same(no sequence issue) since we have change the xpath expression ("String to String") on day1 again this execution fails so need to change the correct occurrence again. Is there any permanent fix to resolve this issue?
2. Also i tried your second solution but unable to find the unique start and end text since all element in the above server response XML contains the element in <String> tag with no unique identifier for the value 1005200
It seems a bit unusual that the application is returning the content in a different sequence. Has the application changed since the recording was performed? Is the "new" sequence constant now? If the latter, you could build your extraction (as Irsath has indiciated) using the correct occurrence. Or perhaps use the variable extractor to customize the size of value to be extracted? I.e. if the value is always to be 7 digits (e.g. 1005200), you could use a regular expression to define that pattern......