Some friends have read my blog and suggested that I should show some codes or sources, I can understand this suggestion so I will share some codes and sources, and at the same time I will continue my article about QTP auto testing. Thank you for your help and suggestions.
This blog is My way to start QTP auto testing---3 which will continue the My way to start QTP auto testing---2 and show some sub-steps under Step 4.
The third sub-step is that you should have a clear idea about the relations among test cases , test actions and reports.
Why ? I think that is important, because good relationship among them will make you more comfortable to maintain the QTP scripts . At the same time your script. will be quite flexible to use.
For example:
One of your test cases may include many steps or operations, if you just create one action to cover this case, you will find it more complicated to handle it. So what you have to do is to create a parant action and then make it have a few child actions.
Now you may be feel confused about my logic of this article. You may think of that in the Step 2 (My way to start QTP auto testing---1), I tell you create actions from you test cases. And what I want to say is that it is not contradictory. Because I think the parant action is the one associted with your test case.
So the structure of your actions by test case is below:
Then the problem is just how to create you reports. Some times one case just need one check point or verification. But the cases that contain a number of check poionts and verifications. That is the problem. Most time I will do it that way as below:
The logic of this table:
Child Actions | Check Points or Verifications | Reports Flag | Global Report Flag For Parent Action |
Child Action 1 | Check Point 1 | Internal Report Flag 1 | Environment(“Report Flag”) |
Child Action 2 | Check Point 2 | Internal Report Flag 2 |
………. | ………. | ………. |
Child Action n | Check Point n | Internal Report Flag n |
I know a lot of people have some other good ideas, I hope your sharings. That is all for the third sub-step in Step 4.More information please keep an eye on My way to start QTP auto testing---4.
Thank you for coming!