July 18, 2011

Automated test script review checklist

Reviews are a great way to find common problems with a number of test automation artifacts, such as automated test scripts like the ones that I wrote in my Selenium Python tutorials. By an automated test script, I mean script code implementing a test case's test steps and expected results e.g. the second script in my Selenium Python Tutorial 2. The automated test script may be written in any programming language or scripting language. It may be generated by a functional test automation tool or written by hand.

Here is a checklist that you can use to review your or others automated test scripts. You should customize the questions according to your specific needs. For practice, review the automated test script to answer a quiz automatically. Post your review comments below.

Inputs
1. Does the script implement each step of the test case?
2. Does the script implement each step in the correct order?
3. Does the script implement each validation given in the test case?
4. Does the script have each validation after the correct step?

Execution
5. Does the script logic call the correct functions? Are these functions called with the correct arguments?
6. Does the script take application input values from the correct input test data file(s)?
7. Does the script execute user operations against the correct objects?
8. Does the script give the application sufficient time to transition to the correct test state e.g. the correct screen?
9. Does the script validate application output values against the correct output test data file(s)?
10. Does the script validate the state of the correct objects?
11. Does the script load only the necessary objects in memory?
12. Is the script free from unnecessary delays?
13. Does the script handle application errors as designed?

Miscellaneous
14. Does the script have a unique identifier?
15. Is the script free of any magic numbers or magic strings?
16. Is the script commented at each appropriate place in it? Is each comment correct?
17. Is the script free from unnecessary or extra code?

Let me know if you find this checklist useful in your reviews.

2 comments:

  1. Hi Inder,

    I think the checklist that you mention covers almost everything thing but would like to add some more input in the Execution section.

    1)We also have to review that Does the script captured the output of the execution result's properly.

    2) Proper commenting has been done in the output result file if any Test case gets failed.

    3)We also have to review the framework structure. Whether the Scripts has been placed in the proper folders, the functions that has been created are kept in the appropriate libraries, the results files are being captured in correct place.

    Let me Know if you find these points Valid or Not.

    ReplyDelete
  2. Deepak,

    Reviewing the script output is indeed important. Moreover, the output logs and results should be consistent across scripts.

    Thanks for your comment.

    ReplyDelete

Note: Only a member of this blog may post a comment.