软件测试技术软件测试技术与质量保障培训课程(编辑修改稿)内容摘要:
nsition testing In state transition testing the test object can be a plete system with different system states, as well as a class in an objectoriented system with different states. Further test cases for the stack example Test case 1: initialize [empty], push [filled], push, push, push [full]. Test case 2: initialize [empty], push [filled], top, pop [empty], delete. From a finite state machine to a transition tree (1) The initial or start state is the root of the tree. For every possible transition from the initial state to a following state in the state transition diagram, the transition tree receives a branch from its root to a node, representing this next state. From a finite state machine to a transition tree (2) The process for step 2 is repeated for every leaf in the tree (every newly added node) until one of the following two endconditions is fulfilled: – The corresponding state is already included in the tree on the way from the root to the node. This end condition corresponds to one pass of a cycle in the transition diagram. – The corresponding state is a final state, and therefore has no further transitions to be considered. Wrong usage of the functions In addition to this, the reaction of the state machine for wrong usage must be checked, which means that functions are called in states in which they are not supposed to be called This is a test of robustness to verify how the test object reacts upon incorrect use. State transition testing for system testing State transition testing is also a good technique for system testing. The Graphical User Interface can be modeled as a finite state machine. Appropriate test cases and the test coverage can be identified by the technique of state transition testing given above. Test case (1) For a plete definition of a statebased test case the following information is necessary: – The initial state of the test object (ponent or system) – The inputs to the test object – The expected oute or expected behavior – The expected final state Test case (2) Further, for each expected transition of the test case the following aspects must be defined: – The state before the transition – The initiating event that triggers the transition – The expected reaction triggered by the transition – The next expected state Definition of the test pletion criteria Every state has been reached at least once Every transition has been executed at least once Every transition violating the specification has been checked Higher – level criteria All bination of transitions All transitions in any order with all possible states, including multiple instances in succession The value of the technique State transition testing should be applied where states are important and where the functionality is influenced by the state of the test object. State transition testing is of greater importance for objectoriented testing because it takes into account the special aspects of the object orientation. Electronic clock example A simple electronic clock has four modes, display time, change time, display date and change date The change mode button switches between display time and display date The reset button switches from display time to adjust time or display date to adjust date The set button returns from adjust time to display time or adjust date to display date Use case testing There exist quite a number of (research) results and approaches to directly derive test cases from UML diagrams and to generate these tests mo。软件测试技术软件测试技术与质量保障培训课程(编辑修改稿)
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。
用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。