testing of component-based application

13
Testing of component- based application Richard Lipka Department of Computer Science and Engineering Faculty of Applied Sciences University of West Bohemia, Pilsen, Czech Republic 1

Upload: valin

Post on 08-Feb-2016

34 views

Category:

Documents


0 download

DESCRIPTION

Testing of component-based application. Richard Lipka Department of Computer Science and Engineering Faculty of Applied Sciences University of West Bohemia, Pilsen , Czech Republic. Agenda. File Manager – case study ReproTool and its ouptuts Scenarios. File manager. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Testing of component-based application

Testing of component-based applicationRichard LipkaDepartment of Computer Science and EngineeringFaculty of Applied SciencesUniversity of West Bohemia, Pilsen, Czech Republic 1

Page 2: Testing of component-based application

2

Agenda

>File Manager – case study>ReproTool and its ouptuts>Scenarios

Page 3: Testing of component-based application

3

File manager

> Case study of component-based application

> Java, OSGi, Spring DM

Page 4: Testing of component-based application

4

File manager - communication

> Method calls>File manipulation>Opening windows

> Events>Window control>Finished task

Page 5: Testing of component-based application

5

File manager – FTP client

>Comparison of performance> Java-based FTP client>Own implementation of FTP

>Marek Paška>Formal checking of FSM

Page 6: Testing of component-based application

6

Reprotool

>Tool for creating and tagging usecases>Outputs should be used as a basis for automated

scenarion creating>Still not finished – version available in the

repository cannot be run

Page 7: Testing of component-based application

7

Usecases

>Description in natural languageUseCase: Listing of directoryPrimary Actor: UserMain success scenario specification1. User select a directory from an available list and confirm his selection2. System obtains representation of directory3. Systems notifies the GUI that directory representation is available4. GUI updates window with new content of directoryExtensions:1a. There is no available list of directories (there is unvalid default directory in the configuration)1a1. System selects user's root directory.1a2. Execution continues from point 2 with root directory 2a. Selected directory is not available at the moment2a1. Warning for user is displayed2a2. System tries to update list of files in current directory - continues from point 2 with current directory2a2a. Current directory is not available2a2a1. System continues from point 1a1

Page 8: Testing of component-based application

8

Usecase – Reprotool - description<primaryActor href="SampleSoftwareProject.xmi#//@actors.0"/> <mainScenario> <steps> <textNodes content="User selects a directory from an available list and confirms his selection "lemmaForm="User select directory from available list and confirm selection" posTag=""/> <extensions> <steps> <textNodes content="System selects user's root directory"/> <action xsi:type="action:Internal" actionName="…steps.0/@textNodes.0"/> </steps> <preconditions> <textNodes content="There is no available list of directories (there is unvalid default directory in the configuration)"/> </preconditions> </extensions> …

Page 9: Testing of component-based application

9

Usecase – Reprotool - LTS<lts:StateMachine xmi:version="2.0" initialState="//@allStates.0" abortState="//@allStates.1"> <allTransitions xsi:type="lts:ActionTransition" source="//@allStates.0" target="//@allStates.2"> <sentence xsi:type="usecase:UseCaseStep" href="uc1.usecase#//@mainScenario/@steps.0"/> </allTransitions> <allTransitions xsi:type="lts:ActionTransition“ source="//@allStates.2" target="//@allStates.3"> <sentence xsi:type="usecase:UseCaseStep" href="uc1.usecase#//@mainScenario/@steps.0/@extensions.0/@steps.0"/> </allTransitions> <allTransitions xsi:type="lts:ActionTransition" source="//@allStates.2" target="//@allStates.4"> <sentence xsi:type="usecase:UseCaseStep" href="uc1.usecase#//@mainScenario/@steps.1"/> </allTransitions>…

Page 10: Testing of component-based application

10

Usecase – Reprotool - LTS

Page 11: Testing of component-based application

11

Usecases – basis for scenarios

>Scenario should cover all branches described in lts>Problem with identification of actors

>Depends on description of usecases and Reprotool – Reprotool contains dictionary of actors

>Problem with identification of actions>Desription of usecases is usually not exact enough > Instead of using natural language denote methods and interfaces?

Page 12: Testing of component-based application

12

Scenarios

>Description in XML> Initial state of the simulation>Description of random numbers generators >Simulated events

>Name of invoked method> List of parameters

Page 13: Testing of component-based application

13

Thank youQuestions?