why automate testing code example

Example 1: when to automate testing

We can't and shouldn't automate every test case
I would choose automation over manual
-If it is repetitive like data driven
test cases that are supposed to be tested against
multiple test data.
-If the test cases are high priority test cases
-If the functionality is critical functionality
-If the test cases are too long and too difficult to execute.
-I would automate smoke test cases and also
-I would automate regression test cases as much as possible
based on the priority

Example 2: what not to automate in testing

Tests that should not be automated:

-Unstable test cases
-Tests that you will only run only once.
-The only exception to this rule is that
if you want to execute a test with a very large 
set of data, even if it’s only once,
then it makes sense to automate it.
-Unfinished functionality
-Visual test cases
-Also Tests that need to be run ASAP
which usually a new feature which is
developed requires a quick feedback
so testing it manually at first making sense.

Tags:

Misc Example