Professional Documents
Culture Documents
Test Case Design: Prepared by
Test Case Design: Prepared by
Test Case Design: Prepared by
OUTLINE
Introduction
Importance of Test Essential Test Case Development
Conclusion
INTRODUCTION(1)
Failure: A program behaves differently as required by the specification.
Error: The internal state of a program is invalid (e.g. a precondition, post condition, undefined pointers etc). Fault: A static cause which allows errors to occur (e.g. bugs, design faults, hardware or system faults).
INTRODUCTION(2)
Faults are
static and can lead to error states. observed by Black Box Test
Tests
try to detect failures. observe error states that are tracked down to faults
TEST METHODS
Risk-based testing Requirements-based Testing Use Case/UML Keyword or Action Based Test (ABT) methodology State Transition/ State Model Based Testing Exploratory and Effective Ad Hoc Testing Equivalence Class Partitioning and Boundary Value Analysis Regression testing Fault Injection/ Forced Error/ Negative Testing DAST- Diagnostic Approach to Software Testing Data Driven Testing
A more general approach than inside-out Its easier 3 kind of lists can be used
Quality Criteria Categories (capability, reliability,) Generic Risk List (complex, new, critical,) Risk catalogs
It helps to communicate and negotiate which components will get more effort.
Use Case(1)
A use case diagram shows the interaction between an actor and the system. In a use case diagram the system is viewed as
Input Output Functionality matter.
USE CASE(2)
USE CASE(4)
Email Regular Password Regular Search Regular Select first one Selection Add
Illegal
10 chars
Add to cart
51 chars
11 chars
201 chars
Use Case(5)
They are only useful for certain types of testing: User Acceptance Testing Positive business as usual Functional testing Manual black-box (some) Scripted automation -Automated testing
They could also help types of testing that overlap with positive functional testing: Smoke testing Sanity testing Regression testing Ad-hoc testing
Use Case(6)
What kind of bugs would not be discovered
System testing Integration testing Performance testing Load testing Software Compatibility testing Hardware Compatibility testing Exploratory testing
Analog
Stop
If the application is NOT running, the user cannot execute the Stop command. If the application is running, the user can execute the Stop command. After the Stop command executes, the application is not running.
Analog
If the application is NOT running, the user cannot execute the Analog command. If the application is running, the user can execute the Analog command. After the Analog command executes, the application is in Analog display mode.
Digital
If the application is NOT running, the user cannot execute the Digital command. If the application is running, the user can execute the Digital command. After the Digital command executes, the application is in Digital display mode.
Start
Running/ Analog
Stop
Start
Digital Analog
Running/ Digital
Stop
Analog
Digital
TEST_ORACLE FOR DIGITAL/ANALOG if (system_mode = RUNNING) then if ( WFndWnd("Clock") = 0 ) then print "Error: Clock should be Running" endif if ( (setting_mode = ANALOG) AND NOT WMenuChecked("Settings\Analog") ) then print "Error: Clock should be Analog mode" stop endif if ( (setting_mode = DIGITAL) AND NOT WMenuChecked("Settings\Digital") ) then
case "Start" run("C:\clock.exe) case "Analog" WMenuSelect("Settings\Analo g") case "Digital" WMenuSelect("Settings\Digital ") case "Stop" WMenuSelect(Close)
Test_oracle() wend
CONCLUSION
There are many test case design methods that can be used if suitable Some of these methods also helps to select the right data for test Selecting the right method makes it easier to detect faults Test cases should be defined before the program is executed
LINKS
http://www.cs.rit.edu/~afb/20012/cs4/slides/testing-03.html http://www.perl.com/pub/a/2005/07/14/bestpractices.html http://www.cs.bsu.edu/homepages/metrics/cs639d/CS639WWW/chapter78/tsld001.htm
http://www.satisfice.com/articles/hrbt.pdf
http://www.satisfice.com/articles/rbt-trouble.pdf http://www.testassured.com/docs/Dangers.htm http://www128.ibm.com/developerworks/rational/library/04/r3217http://www.geocities.com/model_based_testing/shoestring.htm http://people.bath.ac.uk/tjs20/introduction.htm (chinese psotman problem)