divine
QA Testing
2 Test Case Design Methods 2.1
Introduction A rich variety of test case design methods have evolved for software. These methods provide the developer with a systematic approach to testing more important, method provide a mechanism that can help to ensure the completeness of tests and provide the highest likelihood for uncovering errors in software. Any engineered product can be tested in one of the two ways: (1) Knowing the specified function that a product has been designed to perform,tests can be condcuted that demonstrated each function is fully opertational while at the same time searching for errors in each function; (2)Knowing the internal workings of aproduct tests can be condcuted to ensure that " all gears mesh",that is internal operations are performed accrosding to specifications and all internal components hav been adquetaely excersied .the first test approach is called black box testing and the second white box testing . Black box tests are conducted at the software interface level.Although they are designed to unc over errors,black boc tests are used to demonstrated that software functions are operational, that input is properly accepted and output is correctly produced and the integrity of external information is maintained.A black box test examines some fundamaental aspect of a system with little regard for the internal logic structure of the software.Black box testing is also called behavioural testing .It foucses on the functional requirements of the software.White box testing of software involves close examination of procedural detail.logical paths through the software are tested by providing test cases that exercise specific sets of conditions and for loops.The "status of the program" may be examined at various points to determine if the expected or asserted status corresponds to the actual status. The attribuets of both black box and white box testing can be combined to provide an approach that validates the software interface and selectively ensures that the internal workings of the software are correct.
2.2
Test Specifications Test designs specifications defines the approach for testing, test techniques to be used, test case design methods to be used, test environment, etc. Test specifications are documented in the test plan. A test suite is a framework that provides for a way of grouping test cases. A test suite may consist of test cases to test a specific functionality. For instance a test case for testing a specific user interface (or web page) can be grouped together to form a test suite. Each test suite and its test cases should be uniquely identifiable.
Page 1 of 13
divine
QA Testing A test case contains a description of the test that needs to be conducted on a system. A test case is reusable and may be included in one or more test suites. Test case description typically includes the following: Test case identifier: A unique name or number Purpose: What features, path etc are being tested? Reference: Reference to specifications and design documents should be provided Input: Input consists of input data and/or input actions. Input data may include or data items to be entered online or data records in a file or database to be set up or data items to be input from the interface of some other software systems. Input actions include keyboard or mouse actions/commands for navigation and control necessary for online interaction. Output: Output consists of output data and/or outcome. Output data consists of messages, reports, etc., that would be output on completion of the test case. Outcome describes reaching a specific state, for instance successful completion of a transaction. Environment: List specific hardware, software and network configuration that needs to be set up for the test. Procedure: Test procedure describe the steps for the test setup, test starting, test executions, results logging, recording measurements, test stopping, and contingency (what to do when it all goes wrong). Test steps may also describe how and where to restart a test after a shut down. Constraints: Any constraints on performing the test cases. Dependencies: What tests have to be executed before this on and what if the program fails them? Feature pass/Fail: A criteria that describes under what circumstances a feature can be considered as "passed"(Test has failed) or "failed"(Test has succeeded) some tines we may describe a "partial pass" criteria also. Depending on the complexity of the software system and the level of testing (Unit, Integration, System and Acceptance) some or all of the items stated above could be included in a test case template for recording test case design.
2.3
Test Case Template Depending on testing requirement and the level of testing (Unit, Integration, System and Acceptance) one of the following test case templates may be used for the test case design.
Page 2 of 13
divine
QA Testing Type 1: Test case Name: Test Id: Test suite Id: Feature: Priority: Environment: Duration: Effort: Set up: Test step:
Feature Pass/Fail:
Type 2: Test case Name: Test case Id: Test suite Id: Purpose: Priority: Input: Output: Environment: Procedure: Constraints: Dependencies: Type 3: Test case Id: Test suite Id: Purpose: Priority: Input: Output: Test step: Constraints:
Mnemonic identifier Numeric identifier Test suite(s) identifier (numeric) System/application feature being tested Priority assigned to the test Hardware and software required Test schedule Person hours List steps needed to set up test Test steps and sub test steps for starting; conducting and stopping the test. For each test step the following items shall be defined < Step description > < Input/Input action>