Tuesday, June 1, 2010

Designing a Test Case

Test cases should be designed and written by someone who understands the function or technology being tested. A test case should include the following information -
  • Purpose of the test
  • Software requirements and Hardware requirements (if any)
  • Specific setup or configuration requirements
  • Description on how to perform the test(s)
  • Expected results or success criteria for the test
Designing test cases can be time consuming in a testing schedule, but they are worth giving time because they can really avoid unnecessary retesting or debugging or at least lower it. Organizations can take the test cases approach in their own context and according to their own perspectives. Some follow a general step way approach while others may opt for a more detailed and complex approach. It is very important for you to decide between the two extremes and judge on what would work the best for you. Designing proper test cases is very vital for your software testing plans as a lot of bugs, ambiguities, inconsistencies and slip ups can be recovered in time as also it helps in saving your time on continuous debugging and re-testing test cases.

Test Case Structure

A formal written test case comprises of three parts -
  1. Information
    Information consists of general information about the test case. Information incorporates Identifier, test case creator, test case version, name of the test case, purpose or brief description and test case dependencies.
  2. Activity
    Activity consists of the actual test case activities. Activity contains information about the test case environment, activities to be done at test case initialization, activities to be done after test case is performed, step by step actions to be done while testing and the input data that is to be supplied for testing.
  3. Results
    Results are outcomes of a performed test case. Results data consist of information about expected results and the actual results.

Test Case

A test case is a set of conditions or variables and inputs that are developed for a particular goal or objective to be achieved on a certain application to judge its capabilities or features.
It might take more than one test case to determine the true functionality of the application being tested. Every requirement or objective to be achieved needs at least one test case. Some software development methodologies like Rational Unified Process (RUP) recommend creating at least two test cases for each requirement or objective; one for performing testing through positive perspective and the other through negative perspective.

Monday, May 31, 2010

Software Testing Life Cycle

Software testing life cycle identifies what test activities to carry out and when (what is the best time) to accomplish those test activities. Even though testing differs between organizations, there is a testing life cycle.
Software Testing Life Cycle consists of six (generic) phases:
  • Test Planning,
  • Test Analysis,
  • Test Design,
  • Construction and verification,
  • Testing Cycles,
  • Final Testing and Implementation and
  • Post Implementation. 
Software Testing Life Cycle
Phase Activities Outcome
Planning Create high level test plan Test plan, Refined Specification
Analysis
 
Create detailed test plan, Functional Validation Matrix, test cases Revised Test Plan, Functional validation matrix, test cases
Design
 
test cases are revised; select which test cases to automate revised test cases, test data sets, sets, risk assessment sheet
Construction
 
scripting of test cases to automate, test procedures/Scripts, Drivers, test results, Bugreports.
Testing cycles complete testing cycles Test results, Bug Reports
Final testing execute remaining stress and performance tests, complete documentation Test results and different metrics on test efforts
Post implementation Evaluate testing processes Plan for improvement of testing process