02-21-2011, 04:50 PM
Is there a way to define time interval for each step, meaning that the step should not take more than a certain amount of time and if does either skip the step or fail the test.
Step time interval
|
02-21-2011, 04:50 PM
Is there a way to define time interval for each step, meaning that the step should not take more than a certain amount of time and if does either skip the step or fail the test.
02-21-2011, 07:41 PM
Hi,
Check for "Object synchronization timeout" under File-->Settings-->Run You can specify a value in second and QTP will wait for that amount of time for every object to be in a specific state. If the time exceeds the specified synchronization timeout, the step will fail.
02-21-2011, 08:04 PM
But what if the current step is taking too much time and I want to terminate it if it exceeds a certain amount of time?
A simple example, saving a file and the save process takes a lot of time, I want to terminate this step and go to the next step or even fail the whole test. Not sure if my question is clear enough!
02-22-2011, 12:49 PM
for doing this you have two options 1) insert wait statement before the step or you can create dynamic synchronization point in the script
02-22-2011, 07:39 PM
Try with Wait() function
Ok, i got you. Even i have implemented scenarios like this. But this can be solved by creating your own situational based solutions. As far as i know, QTP directly will not help you on this occasion.
In one my projects, the situation was like there was an object which could be at different statuses at different times (one status at a time). The staus used to change after some event occurs to that object. So after making an event happen on that object, the testing need was to wait till the status changes (say from "AAA" to "BBB") or wait for max 5 minutes and if the status doesn't change within 5 mins, make that step fail and proceed next. I followed the approach below: ----code for necessary event to change the status Code: tCounter = 0 \\ Set a time counter to 0 Hope you will get an idea now to design your own approach!
02-23-2011, 04:25 PM
How QTP works is this. it executes the instruction given on the line and then moves on to the next step.
You can use , wait or waitproperty() to make it wait after executing some step. If you invoke a command line , then again you have a parameter to make QTP wait till the command in the command prompt is executed completely. There are ways how we can increase the time of execution of each step. Tools->option -> Run -> Normal display execution( you can customize the delay there) , but this is for all the steps and not for one particular step. You can choose one out of these. |
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
QTP does not record the first step of open filight reservation application. | Blossoms | 9 | 17,768 |
07-20-2015, 05:50 PM Last Post: AJAJ |
|
step by step report | shipu | 0 | 2,161 |
08-06-2014, 02:21 AM Last Post: shipu |
|
which is the final step of automation in QTP? | Ramadas | 6 | 3,935 |
10-29-2013, 04:31 PM Last Post: Sathiya |
|
QTP is not recording the first step of opening Flight reservation app | srinanduri | 2 | 3,176 |
08-06-2013, 09:59 PM Last Post: srinanduri |
|
How to continue test after it fails a step | sqadri | 4 | 4,572 |
01-20-2012, 10:02 PM Last Post: sqadri |