Use LoadRunner to test webProgramUsually, Ajax or ActiveX functions include many client functions (usually JavaScript ). What should we do? If you consider this problem from the perspective of function implementation, it will go into a dead end, because LoadRunner is powerless to JavaScript. If we start from the nature of LoadRunner, this problem can be solved. Because LoadRunner is tested based on the protocol, no matter how much Ajax or ActiveX does on the client, as long as it finally sends requests through the HTTP protocol, we can simulate this request to complete the test. Next, we will analyze how to deal with such problems. Taking the BS version of electronic medical records as an example (ActiveX and Ajax technologies are used for medical order input ).
1. Recording script and analyzing script.
2. debug the script.The script can be played back successfully, but the data is not submitted. In this case, we need to check what the HTTP request is during recording.
3. Modify the script.In the scriptWeb_custom_request ()Added before FunctionWeb_add_header ("X-ajaxpro-method", "saveorder ");When we play back the data again, the data can be written.
In fact, when we use LoadRunner for testing, we need to consider more issues from the Protocol perspective, not the programming perspective.