Skip to content

Software automation best practices

Always in interview for software automation, first question asked is “Software automation best practices”

Well there are many of them, i have listed few.

Please feel free to comment on the same.

1. Faith & reliability

a. Automation should be reliable and people must have faith in it

b. ROI in long run

2. Reduction in manual efforts

a. Should be widely used during regression (to lower manual/functional team efforts)

b. Repeatability – tests can be repeated n times without much efforts

c. Wide test case coverage with updation in test case management tool (like QTP can update QC)

d. Anyone other than automation developer should be able to execute the scripts (we can say “1 Click automation”)

3. Documentation

a. Automation framework architecture document should be in place

b. Each script must have its design doc with entry, exit criteria specified

4. Maintenance

a. Framework should build for maintenance

b. Upgradation

i. Modifying the current framework should be possible without much efforts

ii. Apart from automation developer, others should also be able to add/modify/delete test cases from a particular test suite

iii. Less modification needed if UI changes

c. Regular code review should take place

d. Production and development environment should be different

e. Cross platform support

5. Reporting

a. Detailed result analysis and logging mechanism (which would help developers to debug issues)

Also test script executor need not worry why the test case is failing

b. Reporting in case of system crash

c. Any other things which are not handled by the script should be reported

6. Reusability

a. Other automation developer need not write same code again

7. Modular

a. All the common functions and files maintained in modular fashion

b. Well documented code

c. Easy accessible functions

d. Proper naming conventions

e. Avoid hard coded values and variables

8. Exception handling and recovery mechanism

a. Any other exception which is not excepted should be handled gracefully and reported

b. Script should be able to recover in case of system crash

9. Performance, load and stress testing

a. Apart from functional testing, automation can take care of others facet of testing

Thanks,

Yogesh K

Writing test scenarios and test cases

Last blog we have seen brief introduction to testing.
For different types of testing I would be uploading a pdf where you can learn types of testing, sample test plan and other theorotical details.

Here we will concentrate more on test scenario and test cases.

Test scenario:
—————-

A new product is under development, we as a testing team are given design docs to write test cases for each feature.

Before writing any test case, one should concentrate on various scenarios which the product will face when it will be at customers site.

By doing this you are sure that very obvious things are not missed.

Scenario writing should be given time, thorough review process should be followed. Because this would be forming the base for future test cases and testing.
Scenario should be one liner and less descriptive. The intention here is not to provide details, but the specific idea of testing a particular case.

For e.g. if we have to write testing scenarios for a Login Screen (this is just an example, it has username password and submit cancel button)
Various scenarios to test the Login screen can be:

1. Different combinations of username and passwords
2. User unable to log because of various reasons
3. Incorrect combination of username and password

Also, if a feature like Automatic Updates of a product is to be tested, the scenarios can be:

1. Check for manual updates option
2. Scheduling auto updates
3. Updates in slow bandwidth
4. Updates when network failure is intermettent/disconnected
5. Other updates are in progress
6. Pause/resume, stop/restart funtionality

Test cases:
————-

Once scenario writing is completed, test case writing process can be started, this process has to be inlined with scenarios written.

A single scenario can have multiple test cases. A test case is series of steps to be performed, which has expected output.

To write test cases for above scenarios, we can write as:
1. Different combinations of username and passwords
a. Username less than 4 characters
b. Passeord less than 4 characters
c. Username/password has various special characters

2. User unable to log because of various reasons
a. User is blocked
b. User is locked
c. Password is expired
d. Wrong password entered multiple times

3. Incorrect combination of username and password
a. Correct username and wrong password
b. Wrong username and correct password

so on and so forth
Likewise we can write different test scenarios and test cases.

Test case format:
———————

Their are various test case format, we will try to write more specific and standard format.

The format can be as follows:

Test case No.:
Test case summary:
Prerequisite:
Steps:
Expected result:
Actual result:

Thanks,
Yogesh Kulkarni
testityourself

Facebook

http://www.facebook.com/groups/198428193561634/

Welcome to TestItYourself blog

TestItYourself blog is being formed to discuss various software testing strategies, methodologies and approach to form an effective testing plan.

I would be writing a series of blogs on various software testing topics, which would help a user in understanding testing.

Here we would not concentrate more on definitions and theory but on practical scenarios, user level testing methods/test cases and risks involved.

Testing is very important phase of any product development. It requires lots of patience, aggressive attitude, bit of destructive tendency, pessimistic nature and work on zero assumptions.

That’s enough of theory, lets move forward.

One question I always ask to myself
Is testing really an easy task?
Well it depends on what you are testing.
For e.g.:

1.    A person is asked to test simple addition calculator

a + b = x
Then he will (should) try at least following things

a.  1 + 2 = 3

b.  (-10) + 3 = -7

c.  0 + 75 = 75 etc.

2.    The same person now is asked to test a complex mathematics formula

square root of

tan(x) + cosec(y)

————–                =     z

(x + y)

Now what things the person will try? BIG QUESTION?

He will search his 12th standard note books, search on internet try and learn what is tan, cosec or at least find tan (50) and so forth.

Now giving the above examples, the question should be answered although not completely but partially.

Being little bit clear on whether testing is difficult task or not, lets focus on what is testing, here we will concentrate only on software testing.
As the blog testityourself (Test It Your Self) focuses only on software testing.

Testing:
A process in which we find out whether a particular thing is working as per its specifications.

Whereas software testing can be termed as:
A process to find out whether a software is working as per its design documents. (software replaced by a thing and specification replaced by design documents).
Software testing is well thought process with the intent to find mistakes (bugs) in software program.

People start testing process by writing test plan documents, test strategies, scenarios and then test cases.
Sample test plan document can be easily found on internet, we would concentrate more on test scenarios, test cases and other practical implementation.

What is test scenario:
Different situations where a product will find itself in user environment is called as scenario.

Test case:
A series of steps to implement a particular scenario, which has expected and actually found output when the steps are applied on a product.

Bug:
Any deviation from expected and actually found output is termed as a bug.

Next post we would concentrate more on test scenario and test cases.

Thanks,
Yogesh Kulkarni
testityourself

Facebook

http://www.facebook.com/groups/198428193561634/

Create your own website, free on WordPress.com.Create your own website.
Start free