Presentation is loading. Please wait.

Presentation is loading. Please wait.

Software test automation with UML2.0 TestingProfile & TTCN-3 Maili Markvardt.

Similar presentations


Presentation on theme: "Software test automation with UML2.0 TestingProfile & TTCN-3 Maili Markvardt."— Presentation transcript:

1 Software test automation with UML2.0 TestingProfile & TTCN-3 Maili Markvardt

2 Topics for Master’s thesis! Topics for master’s thesis in the Institute of Computer Science are introduced Februrary 21st at 13.30 in VI-224

3 We will learn.. Introduction to software test automation What is UML 2.0 testing profile What is TTCN-3 – brief overview UML2TP and TTCN-3 tools

4 Introduction Manual testing – human tester conducts testing activities Automated tests – tests are “written” in a (test) programming language and are conducted by special test automation tools Automating must be carefully considered, because it can in some cases be less effective than manual testing

5 Test automation tools Many different tools for functional and performance testing Jmeter, Fitnesse, Mercury tools, Rational tools … XUnit = unit testing tools for different languages UML2.0 Testing Profile – language for modeling testing TTCN-3 – language for automating testing

6 Why UML2.0 TP and TTCN-3? UML – de facto standard in software engineering UML is a LANGUAGE, not a method or a tool! Besides that, UML is a very powerful language TTCN-3 and UML2.0 TP - created to support each other, but They don’t require each other – separate usage is possible

7 UML and profiles Profiles are meant for tailoring UML for specific application domains, for example Profile for CORBA Profile for QoS and Fault tolerance Profile for Scedulability, Performance and Time (Real-Time Profile) UML Testing profile – since autumn 2005

8 UML2.0 Testing Profile A language for designing, visualising, specifying, analysing and documenting artifacts concernging testing systems Test architecture Test dynamics Test data Test timing Once more: UML TP is a language, not an method. It provides a notation rather than specifying the usage!

9 Meta model?! Meta model is a language (set of rules) for describing models of some language Example: book meta model

10 1 2 3 4 5 6 7 8 9 11 10

11 Test data = stimuli + observations OCL-> ? ->* ->

12 Test timing Timer start(expires: Time) Stop() Read(): Time isRunning: Boolean TimeOut() : TimeOutMessage Timezone GetTimeZone SetTimeZone Start(..)Stop()timeOut

13 Diagram types Package, class, component diagrams for specifying the test system structure Sequence and state machine diagrams for specifying the test system behaviour

14 Bank exampe – unit, integration and system tests in UML TP

15 Unit test Verify, that SUT (system under test) properly calculates the amount of money added by the user

16 Unit test – Test Case

17 The same unit test in JUnit public class MoneyTest extends TestCase { public void addSameMoney { Money money1 = new Money(20, “USD”)); Money money2 = new Money(50, “USD”)); money1.add(money2); } assertTrue(money1.equals(new Money(70, “USD”)) }

18 Integration test example

19 Integration test example (2)

20 Integration test example (3)

21 Integration test example (4) Testi konfiguratsioon

22 Integration test example (5)

23 Integration test example (6)

24 System test example

25 System test example (2)

26 System test example (3)

27 System test example (4)

28 System test example (5)

29 System test example (6)

30 System test example (7)

31 System test example (8)

32 Mappings UML TP -> TTCN-3 Black/grey box unit, integration and system tests Concepts used in UML TP and TTCN-3 are practically the same UML TP -> JUnit Only black box unit tests Partial support of UML TP concepts in JUnit

33 TTCN-3: The Testing and Test Control Notation Jet another test programming language? For functional, interoperability, regression, unit, integration and system testing in reactive (feedback- enabled) systems and distributed systems Telecom, mobile, internet ja CORBA-based systems Almost full support of UML TP concepts Founder: European Telecommunications Standards Institute (ETSI) 1999 – 2001, latest version from 2007 TTCN-3 originates from Tree And Tabular Combined Notation (TTCN-1 ja TTCN-2)

34 TTCN-3 Presentation formats: Core language, Graphical representation (MSC), Table representation, + Possibility to define your own presentation formats Graphical Format Tabular Format TTCN-3 Core Notation Presentation Format n

35 Example of a function function invalidPIN_hwe(integer invalidPIN) runs on HWEmulator { activate(HWEmulator_classifierdefault()); hwCom.call(storeCardData:{current},nowait); t1.start(2.0); hwCom.getreply(display_:{"Enter PIN"}); t1.stop; hwCom.call(isPinCorrect:{invalidPIN},3.0) { [] hwCom.getreply(isPinCorrect:{?} value false) {} } hwCom.getreply(display_:{"Invalid PIN"}); hwCom.getreply(display_:{"Enter PIN again"}); arbiter.send(pass_); // local verdict to the arbiter }

36 Example of a Default altstep HWEmulator_classifierdefault()runs on HWEmulator_CType { var charstring s; [] t1.timeout {arbiter.send(fail_);} [] hwCom.getcall(ejectCard:{}) {arbiter.send(fail_);} [] hwCom.getcall(display_:{?}) -> param (s) { if (s == "Connection lost") { arbiter.send(inconc_) } else {arbiter.send(fail_)} } }

37 Tools UML TP SparxSystems Enterprise Architect 6.0 Eclipse Hyades Project CASE tool Theoretically possible to use any CASE tool providing stereotyping (?) TTCN-3 Elvior’s MessageMagic (commercial) Eclipse Framework plug-ins - TTCN-3 core laguage editor and compiler (commercial) OpenTTCN Tester for TTCN-3 (commercial) Conformiq QTronic – TTCN-3 test generator (from UML models)

38 Further reading 1. TTCN-3 Home Page [ www.ttcn3.org]www.ttcn3.org 2. www.fokus.fraunhofer.de/u2tp www.fokus.fraunhofer.de/u2tp 3. OMG Unified Modeling Language [ http://www.uml.org ] – UML 2.0 Testing Profile Specification http://www.uml.org 4. Schieferdecker, Grabowski, Rennoch. 2003. The UML 2.0 Testing Profile and its relation to TTCN-3 [ http://www.swe.informatik.uni- goettingen.de/publications/IS_ZD_JG_AR/TestCom 2003_UTP_Final.pdf ] http://www.swe.informatik.uni- goettingen.de/publications/IS_ZD_JG_AR/TestCom 2003_UTP_Final.pdf


Download ppt "Software test automation with UML2.0 TestingProfile & TTCN-3 Maili Markvardt."

Similar presentations


Ads by Google