Powered By Blogger

Wednesday, January 4, 2012

Format of test case and how to write a good test case


Few things need to be considered for writing good test case.

  1. Test Case ID - Unique Number, simple to use and follow. Break scenario in sessions and use id like 1.1, 1.2 etc to track specific sessions.
  2. Objective of Test case - Should be clear and should convey what exactly is expected out of it. Avoid using negative sentences in objective. Try to make it easy but grammatically correct in order to convey the similar message to all.
  3. Prerequisite -Minimum requirement that should facilitate execution of test case. E.g. Login is  not possible if users do not exist or user has not signed up for application.
  4. Steps - Steps needed to execute that test case. It should be exact clear and should also include observations, executions.
  5. Expected result- What you are expecting after the execution of the test case. Should be part of or elaboration of the objective, use "Should" word in the sentences.
  6. Actual Result - PASS - write same as expected, FAIL- give exact description.
  7. Issue ID - If there is variation from expected behavior then write its Defect id i.e. the unique number generated by bug tracking tool or manual.
Remember :
Good test case should lead to bug and should be easy to execute.

Monday, December 20, 2010

Testing Models

Waterfall Model





















The testing starts only after the build is ready. If business logic is not fulfilled by the system, then whole process need to be repeated again.
  • It is time consuming
  •  Overhead in error correction 
  • Heavy cost of fixing defects
  • Mistakes in any of the stages result in restart of Project


V-Model





















Testing starts from Requirement phase of development only and carried out along with the progress of the Project.
  • Require less time
  • Defect are tracked early
  • Reduce cost of fixing defects   


Iterative Model













Iterative Model so called because various stages are repeated(iterated) number of times in this model. In Iterative model, application development progresses in phases. Each phase add new functionality to the System. During each phase various stage of development along with testing. are covered for the functionality to be added.

  • Fast process for development
  • Fixing cost is reduced
  • Diversion from actual requirement is detected early
 
Visit guru99 for video tutorial.

Software testing

A process used to identify the correctness, completeness and quality of developed software, with thought in mind that testing can never completely establish the correctness of the software.

Objectives:
1. Executing a program with intent of finding error.
2. A good test case is one that has high probability of finding a yet uncovered error.
3. A successful test is one that uncovers an undiscovered error.

Testing Principles

1. Exhaustive testing is not possible.
2. Defect Clustering: small number of the module contains most of the defects detected.
3. Pesticide Paradox: if same test cases are repeated, will no longer find new bugs.
4. Testing shows the presence of defect.
5. Absence of error is a fallacy.
6. Early testing.
7. Testing is context dependent.

Rules for testing

  1. Write the test cases first.
  2. Never write test case that succeed the first time.
  3. Start with null case or something that doesn’t work.
  4. Don’t be afraid of doing something trivial to make the test work.
  5. Loose coupling & testability go in hand. 
  6. Use mock Object