applying model based testing in different contexts
DESCRIPTION
Applying Model Based Testing in Different Contexts. Alexander Petrenko Victor Kuliamin ISP RAS, Moscow. Introduction. MBT application success depends on the context of the project Staff Organization Development culture, paradigms, and stereotypes - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/1.jpg)
Applying Model Based Testing inDifferent Contexts
Alexander PetrenkoVictor KuliaminISP RAS, Moscow
![Page 2: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/2.jpg)
Introduction
MBT application success depends on the context of the project Staff Organization Development culture, paradigms, and stereotypes
Can we modify technical aspects of MBT method used to fit the context more?
Yes! (at least sometimes…)
![Page 3: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/3.jpg)
Outline
Introduction Examples
Software component testing – UniTesK Formal language processor testing – OTK
![Page 4: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/4.jpg)
The Origin
1994 – 1996ISP RAS – Nortel Networks project onfunctional test suite development for Switch Operating System kernel A lot of bugs found in the OS kernel, which had
been in use for 10 yearsSeveral of them cause cold restart
About 600K lines of code tested by 2000
![Page 5: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/5.jpg)
Proposed Solutions
Software contract specifications for functionality Pre- and postconditions of operationsInvariants 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
![Page 6: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/6.jpg)
Ch@se Tool
![Page 7: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/7.jpg)
The Whole Picture
System under TestBehavior Model Testing Model
Coverage Model
Test Input GenerationSingle Input Checking
![Page 8: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/8.jpg)
Tools
J@T (with C++ Link)Java (C++) / NetBeans, Eclipse
CTesKC / Visual Studio 6.0, gcc
Ch@seC# / Visual Studio .NET 7.1
![Page 9: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/9.jpg)
Applications
IPv6 implementations - 2001-2003 Microsoft Research Mobile IPv6 (in Windows CE 4.1) Oktet
Web-based banking client management system Enterprise application development framework Billing system Components of TinyOS
http://www.unitesk.com
![Page 10: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/10.jpg)
Tester
Application Success Prerequisites
Knowledge source on actual functionality Documents Domain experts Developers, architects
Direct access to the interface under test SUT
![Page 11: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/11.jpg)
Outline
Introduction Examples
Software component testing – UniTesK Formal language processor testing – OTK
![Page 12: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/12.jpg)
The Origin
2001 – 2003ISP RAS – Intel project ontesting correctness of set of optimizers Several dozens of bugs found
![Page 13: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/13.jpg)
Restrictions
No access to actual functionality – only general processing algorithm descriptions
No access to unit interface –only external compiler interface
Tester SUT
![Page 14: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/14.jpg)
Proposed Solutions
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
![Page 15: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/15.jpg)
Example: Simple Expressions
Test
Expression
BinaryExpr
op : {+,-,*,/}
Variable
id : string
Constant
value : int
stmts1..*
left 1
right 1
Statement
var 1
expr1
xi = Expr
xi 17 Expr1 + Expr2
![Page 16: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/16.jpg)
OTK Tool
![Page 17: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/17.jpg)
Test Data Generation
Processing Algorithm
Basic Blocks and Connectors
Test Data (Programs)
Combination Iterator
Basic Blocks Mapping
if(…)…else …
for(…;…;…)
Language
![Page 18: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/18.jpg)
Optimizer Correctness Checking
Test Program
CompilerOptimizer
Compiler
==?
![Page 19: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/19.jpg)
Further Work
The whole compiler testingSyntax checkerStatic semantics checkerBack-end
Formal semantics description needed
Tools integration
In work
?
![Page 20: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/20.jpg)
References
1. V. Kuliamin, A. Petrenko, I. Bourdonov, and A. Kossatchev. UniTesK Test Suite Architecture. Proc. of FME 2002. LNCS 2391, pp. 77-88, Springer-Verlag, 2002.
2. 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.
3. A. Kossatchev, A. Petrenko, S. Zelenov, S. Zelenova. Using Model-Based Approach for Automated Testing of Optimizing Compilers. Proc. Intl. Workshop on Program Undestanding, Gorno-Altaisk, 2003.
4. V. Kuliamin, A. Petrenko, A. Kossatchev, and I. Burdonov. The UniTesK Approach to Designing Test Suites. Programming and Computer Software, Vol. 29, No. 6 , 2003, pp. 310-322. (Translation from Russian)
5. 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)
![Page 21: Applying Model Based Testing in Different Contexts](https://reader035.vdocuments.net/reader035/viewer/2022062409/568145fd550346895db30c1d/html5/thumbnails/21.jpg)
Contacts
Alexander K. Petrenko Victor V. Kuliamin
[email protected] [email protected]
109004, B. Kommunisticheskaya, 25
Moscow, Russia
Web: http://www.ispras.ru/groups/rv/rv.html
Phone: +7-095-9125317
Fax: +7-095-9121524