Download presentation
Presentation is loading. Please wait.
1
WRITING TEST CASES AND TEST DATA FOR IT
Gennadi Jakutin
2
General meaning of test case concept
A test case is a set of actions with the expected results based on requirements for the system Test cases have to provide full coverage of all technical (system) requirements for the product which is being tested Test cases should include a description of the functionality to be tested, and the preparation required to ensure that the test can be conducted. An effective test cases have to be developed from the position of “Constructive demolition”
3
Why do we need to test with strongly formalized but flexible test cases
The key of successful testing lies in efficiency of the selected Test Cases Better test cases have more reliable results as well as lower cost in three categories: Productivity Testability Scheduling reliability Certain determination Aims Expected results Prevention of ambiguity We should be able to easily transform test cases for: Reusing for maintenance releases Regression testing
4
Requirements to quality of Test Cases
Accurate Economical Repeatable and self standing Appropriate Traceable Self cleaning
5
The beginning of development of test cases The project
Set of documents which describes the plan of test operation. Test projecting and developing test cases Improving and debugging test cases
6
Structure of the test case
A test case specification shall have the following structure: Test case specification identifier Test items Input specifications Output specifications Environmental needs Special procedural requirements Intercase dependencies
7
Types of Test Cases Which one is the best one?
Step-by-step Scenario goes from screen to screen Many processing rules Matrix Many variations of filling in a form Same inputs, different configurations or platforms Automated scripts Long lifecycle of testing
8
Example Step-by-Step test cases
Action Expected result Pass/Fail 1 Click on element “Delivery cost” in Main Menu Delivery cost Menu displays on the screen P/F 2 Enter value “101” in the field of weight of cargo delivery “Weight of delivery is incorrect” error message appears 3 Enter value “0” in the field of weight of cargo delivery 4 Enter value “100” in the field of weight of cargo “Weight of delivery is 100 OZ” message appears
9
Example of matrix text case
Suppose that we have 4 Size fields which have same input requirements: Must be greater than 0, but less than 1000 Must be integer Value -1 1000 12.3 ABC %^$ 1 999 Expected Result Fail Pass Length P/F Height Width Weight
10
Example of Automated script
Case "TXT": # Edit Text # Parameters:Text Field Name, Value report_msg1("Setting the value in the textfield : "¶ms[1]&" as "¶ms[2],DEBUG); if(obj_exists(params[1],10) != E_OK) { FINAL_RESULT = "FAIL"; INTER_ACTION = "ERROR"; append(REMARKS_STRING,"Object : "¶ms[1]&" doesnot exist, so terminating the testcase."); desktop_capture_bitmap(MMName & "-" & TC_NUM ); } else ret = edit_set(params[1], params[2]); if(ret < 0) examine("edit_set",ret); append(REMARKS_STRING,“Text was inserted in“ ¶ms[1] &“text field”); break;
11
Developing data for test cases
Classes of equivalence. Oriented on lowering overall number of test cases Dividing input area of program into data classes Positive Negative Boundary values. Choosing elements on the borders of classes
12
Improving of test cases
Testability Controlling length Cumulative cases Productivity Templates Clones Test management software
13
References Rapid Testing First Edition Robert Culbertson, Chris Brown, Gary Cobb How to write better test cases Dianne Runnels ieeestd Test_documentation, IEEE
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.