Once the automated test case is executed, the result needs to be analyzed and application issues (if any) should be reported. QuickTest Professional (QTP) gives an excellent feature to view the results summary and ability to drilldown to the level of each object.
By default after every execution test results window gets opened and we can see the Test Results Summary. This window shows the following:
- Name of the test
- Time zone
- Run started time
- Run end time
- Status (Passed, Failed, Warnings)
In the previous post I have described how to record an end-to-end test scenario. Let us take the same example and try to run the test. When the execution is initialized (by either clicking Run or pressing F5), a popup comes and shows two options as in the below figure.
- New run results folder
- Temporary results folder
The first option creates a new folder for every run where the second one will write the results into a temporary folder, which gets overwritten next time. Usually, if we want to store the results then select the first option otherwise if you are executing the test for debugging purpose select the second one. If you are executing the test multiple times for debugging purpose, then it is better to select the second option, otherwise the QTP unnecessarily creates too many results folders.
Follow the below steps to arrive at the Test Results window:
- Open the test – InsertNewOrder (Recording the test is described in previous post)
- Click on Run or press F5
- Select the second option / Temporary run results folder
- Click OK
- QTP executes the test and opens the Results window by default.
- If Results window does not open then Go to Automation menu –> click Results option
- Go through the Test Results
- Below are the series of screenshots which describes the location of Results option
Analyzing the Test Results:
After the execution of any test scenario, a test automation engineer needs to know whether all the steps are passed. If any test step is failed then we can find out the action (i.e. click, select, navigation, etc) in Test Results tree.
Click the plus symbol (+) on the Test Results tree and drilldown to the level of object (i.e. button, edit box, dropdown, etc). For each action we can see the description such as Object, Time, Details, Result, etc.
This post gives a fair idea of how to view and analyze the results but there are many things which we learn with respect to Test Results and those will be discussed in the future posts.