词条 | Draft:Object state testing | ||||||||||||||||||||||
释义 |
Object state testing is a formal white-box software test design method testing object state behavior. State testing is complementary to local error detection of functional and structural testing. Interaction of class member functions are tested through object state transitions..[1] An object behavior is state based arranged due to method invocation sequence, which behavior is established due to parameter values and state, providing successor and return value. The ranges of values of a subset of member data of the object defines a state of an object. State transitions are deterministic finite due to the conditional execution of member functions. Object state tests can be determined from the source code (white-box) or from the specifications (black-box). Requirements
DefectsTo ensure robustness, all void and valid method sequence invocation combinations need to be tested using state test cases[2]. Testing the object state brings out below defects.
Object StatesThe behavior of a class object is definable characterized on inhabited data member values. The run time execution path is determined due to evaluating member and parameter values in decisions (condition), effecting the class object behavior. Object states are segmented in independent domain member data interval combinations leading towards different execution paths. State characterization
CoverageThe amount of states and paths are circumscribing test state coverage. Due to possible infinite cyclic path sequences the path length needs limitation. The amount of methods is a minimum criterion of path length for permutations of method sequences . Instead of limiting method permutation sequences an acyclic spanning tree is addressing systematically path length including negative and positive path combinations through a state space. ExampleA soda machine requires two 50c coins for a soda. It provides five methods and three class member variables. The variable tmp holds temporary coins till a customer withdraws a soda[3] State DefinitionThe class contains the conditions: The two conditions are segmenting the class member variable values into four states :
State transition spanning treeSee also
References1. ^{{cite book |last1=Kung |first1=D. C. |first2=N. |last2=Suchak |first3=J. |last3=Gao and |first4=P. |last4=Hsia |first5=Y. |last5=Toyoshima|first6=C. |last6=Chen |chapter=On Object State Testing |chapterurl=|title=Proceedings of Computer Software and Applications Conference |year=1994 |pages=222--227 |publisher=IEEE Computer Society Press}} 2. ^Tilo Linz (2014). Testing in Scrum, p. 51, Rocky Nook Inc., Santa Barbara. {{ISBN|978-1-937538-39-2}} 3. ^https://github.com/jbloemendal/SodaMachine J. Bloemendal (2018), Test Case Design |
||||||||||||||||||||||
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。