Forum Discussion
AlexKaras
14 years agoChampion Level 3
Hi Sri,
It would help if you define more precisely what do you mean as "export report" and what is the expected/measured time.
HTTP Load Testing in TestComplete is a functionality that sends requests to the server and processes responses. Not more not less. Requests and responses have no idea what data they are transferring. From their point of view they are just transferring a sequences of bytes and it is up to the server or client to consider these data as a report export, quote posting or something else. Usually the client sends request to the server and waits for the response. The time interval between request and response includes time to deliver request to the server, delay on the server before request is processed, time to process the request, time to generate the response, time to deliver response to the client, etc.
It is obvious from the above that the time interval between the request and corresponding response includes the actual processing time to generate the response as well as additional time penalties like queuing, transmission delays, etc.
If you need to measure the actual time to generate a report, then you should use some profiling tool (e.g. AQTime by AutomatedQA) that will connect to the server and measure the time it takes the code on the server to generate the report. The trigger that starts report generation is irrelevant in this case and may be triggered either via HTTP (like the Load Testing does) or by some test driver application or by some other means.
If you would like to measure the time that user of your web application should wait for the report, then you should record an HTTP Load Testing task in TestComplete that triggers report generation. In the recorded task you should find the request that requests server for the report and find the response that contains report sent from the server. Then you should create the handlers for the OnLoadTestingRequest and OnLoadTestingResponse events. The code in the OnLoadTestingRequest handler should save somewhere the current time. The code in the OnLoadTestingResponse should subtract the saved time from the current one. This will give you the time it took to send request to the server and get back the response. Note, that it can take additional time before the user sees the report on the screen as additional time may be needed on the client to process the raw data received from the server.
If you need to measure the time that it takes on the client to click some button to ask for the report and see the report on the screen, then again you either need a profiler (running on the client in this case) or you can use ordinary functional testing in TestComplete (if you do not need precise timing) and measure time between button click and report appearence on the screen.
It would help if you define more precisely what do you mean as "export report" and what is the expected/measured time.
HTTP Load Testing in TestComplete is a functionality that sends requests to the server and processes responses. Not more not less. Requests and responses have no idea what data they are transferring. From their point of view they are just transferring a sequences of bytes and it is up to the server or client to consider these data as a report export, quote posting or something else. Usually the client sends request to the server and waits for the response. The time interval between request and response includes time to deliver request to the server, delay on the server before request is processed, time to process the request, time to generate the response, time to deliver response to the client, etc.
It is obvious from the above that the time interval between the request and corresponding response includes the actual processing time to generate the response as well as additional time penalties like queuing, transmission delays, etc.
If you need to measure the actual time to generate a report, then you should use some profiling tool (e.g. AQTime by AutomatedQA) that will connect to the server and measure the time it takes the code on the server to generate the report. The trigger that starts report generation is irrelevant in this case and may be triggered either via HTTP (like the Load Testing does) or by some test driver application or by some other means.
If you would like to measure the time that user of your web application should wait for the report, then you should record an HTTP Load Testing task in TestComplete that triggers report generation. In the recorded task you should find the request that requests server for the report and find the response that contains report sent from the server. Then you should create the handlers for the OnLoadTestingRequest and OnLoadTestingResponse events. The code in the OnLoadTestingRequest handler should save somewhere the current time. The code in the OnLoadTestingResponse should subtract the saved time from the current one. This will give you the time it took to send request to the server and get back the response. Note, that it can take additional time before the user sees the report on the screen as additional time may be needed on the client to process the raw data received from the server.
If you need to measure the time that it takes on the client to click some button to ask for the report and see the report on the screen, then again you either need a profiler (running on the client in this case) or you can use ordinary functional testing in TestComplete (if you do not need precise timing) and measure time between button click and report appearence on the screen.
Related Content
Recent Discussions
- 2 hours agoSubhraDas
- 21 hours agotramuntana