P. 1
Handout Software Testing v1.0

Handout Software Testing v1.0

|Views: 274|Likes:
Published by Prabhavith Reddy

More info:

Published by: Prabhavith Reddy on Sep 01, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less






  • Introduction
  • About this Module
  • Target Audience
  • Module Objectives
  • Pre-requisite
  • Chapter 1: Introduction to Testing
  • Learning Objectives
  • What is Software Testing
  • Testing Life Cycle
  • Broad Categories of Testing
  • The Testing Techniques
  • Types of Testing
  • Test your Understanding
  • Chapter 2: Black Box Vs. White Box Testing
  • Learning Objective:
  • Introduction to Black Box and White Box testing
  • Black box testing
  • Black box testing - without user involvement
  • Black box testing - with user involvement
  • White Box Testing
  • Black Box (Vs) White Box
  • Chapter 3: Other Testing Types
  • Learning Objective
  • What is GUI Testing?
  • Regression Testing
  • Integration Testing
  • Acceptance Testing
  • Configuration Testing & Installation Testing
  • Alpha testing and Beta testing
  • Chapter 4: Levels of Testing
  • Unit Testing
  • System Testing
  • Chapter 5: JUnit Testing
  • JUNIT Testing - Introduction
  • Simple Test Case
  • Fixture
  • Test Case
  • Suite
  • TestRunner
  • Chapter 6: Testing Artifacts
  • Test Strategy and Test Plan
  • Test Plan
  • Chapter 7: Defect Management
  • What is a Defect?
  • Defect Lifecycle
  • Defect Reporting and Tracking
  • Chapter 8: Automation
  • What is Automation?
  • Automation Benefits
  • Automation Life Cycle
  • Test Environment Setup
  • Other Phases in Automation
  • Automation Methods
  • Automation tool comparison
  • Chapter 9: Sample Test Automation Tool
  • Sample Test Automation Tool
  • Rational Suite of tools
  • Rational Administrator
  • Rational Administrator
  • Rational Robot
  • Rational Test Manager
  • Supported environments
  • Chapter 10: Performance Testing
  • What is Performance testing?
  • Performance Testing Requirements
  • Performance Testing Process
  • Performance Testing Tools
  • Volume and Stress Testing
  • Chapter 11: Test Case Point
  • What is a Test Case Point (TCP)?
  • Test Case Point Analysis

How do you write testing code?

The simplest way is as an expression in a debugger. You can change debug expressions without
recompiling, and you can wait to decide what to write until you have seen the running objects.

You can also write test expressions as statements which print to the standard output stream. Both
styles of tests are limited because they require human judgment to analyze their results. Also, they
don't compose nicely- you can only execute one debug expression at a time and a program with
too many print statements causes the dreaded "Scroll Blindness".

JUnit tests do not require human judgment to interpret, and it is easy to run many of them at the
same time. When you need to test something, here is what you do:

Create an instance of Test Case:

Create a constructor which accepts a String as a parameter and passes it to the

Override the method runTest()

When you want to check a value, call assertTrue() and pass a boolean that is true if
the test succeeds

For example, to test that the sum of two Moneys with the same currency contains a value which is
the sum of the values of the two Moneys, write:

public void testSimpleAdd()

Money m12CHF= new Money(12, "CHF");
Money m14CHF= new Money(14, "CHF");

Handout – Software Testing

Page 66

©Copyright 2007, Cognizant Technology Solutions, All Rights Reserved
C3: Protected

Money expected= new Money(26, "CHF");
Money result= m12CHF.add(m14CHF);


If you want to write a test similar to one you have already written, write a Fixture instead. When
you want to run more than one test, create a Suite.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->