ad161a4cbc85bb9357c5d5bad1636c69.ppt
- Количество слайдов: 21
Applying Model Based Testing in Different Contexts Alexander Petrenko Victor Kuliamin ISP RAS, Moscow
Introduction n MBT application success depends on the context of the project ¨ Staff ¨ Organization ¨ Development culture, paradigms, and stereotypes n Can we modify technical aspects of MBT method used to fit the context more? Yes! (at least sometimes…)
Outline Introduction n Examples n ¨ Software component testing – Uni. Tes. K ¨ Formal language processor testing – OTK
The Origin n 1994 – 1996 ISP RAS – Nortel Networks project on functional test suite development for Switch Operating System kernel ¨ A lot of bugs found in the OS kernel, which had been in use for 10 years Several of them cause cold restart ¨ About 600 K lines of code tested by 2000
Proposed Solutions n n Software contract specifications for functionality Pre- and postconditions of operations Invariants of data types Test adequacy criteria based on coverage of specifications Transformation of pre- and postconditions into (IO)FSM, traversal of which guarantees the required coverage level On-the-fly test generation – construction of a transition tour of the (IO)FSM or other paths
Ch@se Tool
The Whole Picture System under Test Behavior Model Testing Model Coverage Model Single Input Checking Test Input Generation
Tools J@T (with C++ Link) Java (C++) / Net. Beans, Eclipse n CTes. K C / Visual Studio 6. 0, gcc n Ch@se C# / Visual Studio. NET 7. 1 n
Applications n IPv 6 implementations - 2001 -2003 ¨ Microsoft Research ¨ Mobile IPv 6 (in Windows CE 4. 1) ¨ Oktet n n Web-based banking client management system Enterprise application development framework Billing system Components of Tiny. OS http: //www. unitesk. com
Application Success Prerequisites n Knowledge source on actual functionality Documents ¨ Domain experts ¨ Developers, architects ¨ n Direct access to the interface under test Tester SUT
Outline Introduction n Examples n ¨ Software component testing – Uni. Tes. K ¨ Formal language processor testing – OTK
The Origin n 2001 – 2003 ISP RAS – Intel project on testing correctness of set of optimizers ¨ Several dozens of bugs found
Restrictions n No access to actual functionality – only general processing algorithm descriptions n No access to unit interface – only external compiler interface Tester SUT
Proposed Solutions n n Program structure (abstracted of irrelevant elements) considered as test data model Structured set of data generators Checking optimizer correctness by comparison with nonoptimized program Coverage goals ¨ Processing algorithm is taken into account by model ¨ Heuristics
Example: Simple Expressions Test stmts 1. . * Statement var 1 xi = Expr expr 1 Expression Variable id : string xi Constant value : int 17 Binary. Expr op : {+, -, *, /} Expr 1 + Expr 2 left 1 right 1
OTK Tool
Test Data Generation Processing Algorithm Basic Blocks and Connectors Combination Iterator Language Basic Blocks Mapping Test Data (Programs) if(…)…else … for(…; …; …)
Optimizer Correctness Checking Test Program Compiler Optimizer ? == Compiler
Further Work n The whole compiler testing ¨ Syntax checker ¨ Static semantics checker ¨ Back-end n n In work ? Formal semantics description needed Tools integration
References 1. 2. 3. 4. 5. V. Kuliamin, A. Petrenko, I. Bourdonov, and A. Kossatchev. Uni. Tes. K Test Suite Architecture. Proc. of FME 2002. LNCS 2391, pp. 77 -88, Springer-Verlag, 2002. V. Kuliamin, A. Petrenko, N. Pakoulin, I. Bourdonov, and A. Kossatchev. Integration of Functional and Timed Testing of Real-time and Concurrent Systems. Proc. of PSI 2003. LNCS 2890, pp. 450 -461, Springer-Verlag, 2003. A. Kossatchev, A. Petrenko, S. Zelenova. Using Model-Based Approach for Automated Testing of Optimizing Compilers. Proc. Intl. Workshop on Program Undestanding, Gorno-Altaisk, 2003. V. Kuliamin, A. Petrenko, A. Kossatchev, and I. Burdonov. The Uni. Tes. K Approach to Designing Test Suites. Programming and Computer Software, Vol. 29, No. 6 , 2003, pp. 310 -322. (Translation from Russian) S. Zelenov, S. Zelenova, A. Kossatchev, A. Petrenko. Test Generation for Compilers and Other Formal Text Processors. Programming and Computer Software, Vol. 29, No. 2 , 2003, pp. 104 -111. (Translation from Russian)
Contacts Alexander K. Petrenko Victor V. Kuliamin petrenko@ispras. ru kuliamin@ispras. ru 109004, B. Kommunisticheskaya, 25 Moscow, Russia Web: http: //www. ispras. ru/groups/rv/rv. html Phone: +7 -095 -9125317 Fax: +7 -095 -9121524
ad161a4cbc85bb9357c5d5bad1636c69.ppt