Model–driven system testing service oriented systems

33
M.RIFAD. PRIYANKA PERERA. Model–driven System Testing of Service Oriented Systems.

description

With the increasing number of service oriented system implementations, new challenges concerning their developmentand testing are emerging. This paper presents an approach for model–driven system testing of service oriented systems. The approach offers a systematic testing methodology and it is based on tightly integrated system and test models with a formal metamodel. The test code generation itself is supported by automatic consistency and coverage checks and has a flexiblen adapter concept that allows different target technologies to be integrated

Transcript of Model–driven system testing service oriented systems

Page 1: Model–driven system testing service oriented systems

M.RIFAD.PRIYANKA PERERA.

Model–driven System Testing

of Service Oriented Systems.

Page 2: Model–driven system testing service oriented systems

Outline

IntroductionBasic concepts.Testing Methodology.Test Meta Model.Test code generation.

Page 3: Model–driven system testing service oriented systems

Introduction

This paper presents an approach for model–driven system testing of service oriented systems.

presents test model transformation and adapter concept.

Testmodels can be statically checked and directly transformed into executable test code via a metamodel.

Page 4: Model–driven system testing service oriented systems

The connection to the system services under test is established via flexible adapters that can be automatically generated in many cases.

This flexible adapter concept allows for defining executable test–model integrated with the requirements specification in a very early stage of the system development process.

Page 5: Model–driven system testing service oriented systems

Basic concepts

Basic structure of the TTS artifacts.

Page 6: Model–driven system testing service oriented systems

The system model: Describes the system requirements at business level.

The system implementation: Also called the system under test (SUT) provides services callable by the test implementation.

The test model: Contains the test case specifications developed in an incremental process. Test stories can be seen as high level descriptions of the test requirements.

Page 7: Model–driven system testing service oriented systems

The test implementation: Generated by a compiler which transforms test story files into source code files, so called test code, of the execution language. Service adapters make the abstract service calls. Will be discussed in more detail.

Page 8: Model–driven system testing service oriented systems

Testing Methodology

Page 9: Model–driven system testing service oriented systems

The first step in the development process is the iterative design of a test and a system model.

Adapters will be generated.

Test code generation and test execution by test engine .

Page 10: Model–driven system testing service oriented systems

Platform Independent model.

Page 11: Model–driven system testing service oriented systems

META MODEL

The metamodel for system and test modeling of service oriented systems has been defined as UML profile.

a) System Metamodel.b) Test meta model.

Page 12: Model–driven system testing service oriented systems

System meta model

Page 13: Model–driven system testing service oriented systems

The System stereotype represents the whole test system including services and actors.

The abstract stereotype Service generalizes System Service-service with a business functionality.

Configuration Service-Need for testing purposes.

Page 14: Model–driven system testing service oriented systems

The stereotype Actor represents the roles which can invoke a service.

The abstract stereotype Parameter generalizes the stereotypes for input and output parameters.

Page 15: Model–driven system testing service oriented systems

Sample Booking system.

Page 16: Model–driven system testing service oriented systems

Test Meta model

Page 17: Model–driven system testing service oriented systems

The stereotype Servicecall refers to a service invoked by an actor instance of type Caller with concrete input and output values of type Value. It also has a timeout after which it is canceled.

The stereotype Reference refers to other stories which can be called within a test story

Page 18: Model–driven system testing service oriented systems

The stereotype Assertion allows for defining assertions for computing the test verdict.

The stereotype ParallelTask allows for executing the same flow a specific number of times (tasknumber) in parallel.

Page 19: Model–driven system testing service oriented systems

Sample Test story

Page 20: Model–driven system testing service oriented systems

Test-code generation• Consistency and coverage checks

• Adapter

• Code generation

• Test execution

• Architecture

Page 21: Model–driven system testing service oriented systems

Consistency and coverage checks

• Schema for test model defined in the meta-model.

• Consistency and coverage rules are part of the schema.

• TSChecker component performs the validation.

• Checks are coded in OCL.

Page 22: Model–driven system testing service oriented systems

Consistency and coverage checks contd.

• Coverage rules – e.g.: compare the scenarios covered in the test model wrt system model.

• Consistency rules – e.g.:

Page 23: Model–driven system testing service oriented systems

Adapter• Adapter invokes the services in SUT.

• Test runner passes the arguments and calls the generated Adapter.

Page 24: Model–driven system testing service oriented systems

Adapter contd.

• Each service call in invoked asynchronously in a separate thread.

• Invoke() call in the abstract adapter is a wrapper around the private adapter methods in the concrete implementations.

• Service proxies may be generated using WSDL

Page 25: Model–driven system testing service oriented systems

Adapter contd.

Page 26: Model–driven system testing service oriented systems

Code generation• Test-model to test-code transformation.

• Nodes in the test-model are visited and generates code based on details present in the nodes, parameters and connections.

• TSCompiler translates test stories defined in the model to test code.

Page 27: Model–driven system testing service oriented systems

Test execution• Test runner parses the TestSequence in the

test-model invokes the test stories in order.

Page 28: Model–driven system testing service oriented systems

Test execution contd.• TestData stored in a repository.

• Test-model or test runner should reference the repository.

Page 29: Model–driven system testing service oriented systems

Architecture

Page 30: Model–driven system testing service oriented systems

Architecture contd. • TSChecker

Validates the test-model and system-model against meta-model and each other.

• TSCompiler Transform test model into programming

language code• TSTestCotroller

Test executing life cycle handler.

Page 31: Model–driven system testing service oriented systems

Architecture contd. • TestSequence

– Execution order of the test stories.

• TestLog

– Logging API

• TestReport

– Result reporting framework

Page 32: Model–driven system testing service oriented systems

Discussion

Authors plan to automate test data generation. Test mode may be made to generate from the

system model ? Integration with IDEs and test and logging and

reporting frameworks ?

Page 33: Model–driven system testing service oriented systems

Thank you