130 likes | 217 Views
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.
E N D
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 • FileManager – case study • ReproToolanditsouptuts • Scenarios
Filemanager • Case study ofcomponent-basedapplication • Java, OSGi, SpringDM
File manager - communication • Methodcalls • Filemanipulation • Openingwindows • Events • Windowcontrol • Finishedtask
Filemanager – FTP client • Comparisonof performance • Java-based FTP client • Ownimplementationof FTP • Marek Paška • Formalcheckingof FSM
Reprotool • Toolforcreatingandtaggingusecases • Outputsshouldbeused as a basis forautomatedscenarioncreating • Still not finished – versionavailable in therepositorycannotbe run
Usecases • Description in naturallanguage UseCase: Listing of directory Primary Actor: User Main success scenario specification 1. User select a directory from an available list and confirm his selection 2. System obtains representation of directory 3. Systems notifies the GUI that directory representation is available 4. GUI updates window with new content of directory Extensions: 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 moment 2a1. Warning for user is displayed 2a2. System tries to update list of files in current directory - continues from point 2 with current directory 2a2a. Current directory is not available 2a2a1. System continues from point 1a1
Usecase – Reprotool - description <primaryActorhref="SampleSoftwareProject.xmi#//@actors.0"/> <mainScenario> <steps> <textNodescontent="User selects a directoryfroman available list andconfirms his selection "lemmaForm="User selectdirectoryfromavailable list andconfirmselection" posTag=""/> <extensions> <steps> <textNodescontent="Systemselects user's root directory"/> <actionxsi:type="action:Internal" actionName="…steps.0/@textNodes.0"/> </steps> <preconditions> <textNodescontent="There is no available list of directories (there is unvalid default directory in the configuration)"/> </preconditions> </extensions> …
Usecase – Reprotool - LTS <lts:StateMachinexmi:version="2.0" initialState="//@allStates.0" abortState="//@allStates.1"> <allTransitionsxsi:type="lts:ActionTransition" source="//@allStates.0" target="//@allStates.2"> <sentencexsi:type="usecase:UseCaseStep" href="uc1.usecase#//@mainScenario/@steps.0"/> </allTransitions> <allTransitionsxsi:type="lts:ActionTransition“ source="//@allStates.2" target="//@allStates.3"> <sentencexsi:type="usecase:UseCaseStep" href="uc1.usecase#//@mainScenario/@steps.0/@extensions.0/@steps.0"/> </allTransitions> <allTransitionsxsi:type="lts:ActionTransition" source="//@allStates.2" target="//@allStates.4"> <sentencexsi:type="usecase:UseCaseStep" href="uc1.usecase#//@mainScenario/@steps.1"/> </allTransitions> …
Usecases – basis forscenarios • Scenarioshouldcoverallbranchesdescribed in lts • Problemwithidentificationofactors • Depends on descriptionofusecasesandReprotool – Reprotoolcontainsdictionaryofactors • Problemwithidentificationofactions • Desriptionofusecasesisusually not exactenough • Insteadofusingnaturallanguagedenotemethodsandinterfaces?
Scenarios • Description in XML • Initialstateofthesimulation • Descriptionofrandomnumbersgenerators • Simulatedevents • Nameofinvokedmethod • List ofparameters
Thank you Questions?