====== User Installation Guide of Costo Test ====== ===== First step : Get Costo installed ===== Before testing Kmelia application we must first get COSTO installed. \\ For that just follow indications given on this link [[https://aelos.wiki.ls2n.fr/doku.php?id=costo:userguide:uginstall|Costo Installation Guide]] ===== Second step : Testing an Kmelia application example ===== After achieving success with the previous step, our goal in this section is to test an Kmelia application using COSTO Test plugins provided for this purpose. To do this we will download an Kmelia example application, learn a little more about its design, files that compose it and finally we will test itself. - Download the Project example archive {{:costo:test:userguide:casestudymodcompo14.zip|CaseStudyModCompo14}} - Test the example : They are two ways to do that step by step. \\ Follow Testing in flash tutorial version or Follow Testing in screenshots tutorial version. === Testing Example by following flash tutorial === ---- \\ - Download the {{:costo:test:userguide:stage_tuto1.zip| tutorial flash version archive}} - Unzip the archive file - Double-click on html file to see how to test Kmelia application === Testing Example by following Screenshots Tutorial === ---- \\ - Import the example project into eclispe \\ Click on File and Import. \\ When pop up dialog open choose "Existing Projects Into Workspace" et click on button Next. {{:costo:test:userguide:1.png?600&500|}} \\ {{:costo:test:userguide:2.png?600&500|}} - Browse the Kmelia example application directory by clicking on Browse button and select the archive file. \\ If this is done click on button Open and then click on Finish. {{:costo:test:userguide:3.png?600&500|}} {{:costo:test:userguide:4.png?600&500|}} {{:costo:test:userguide:5.png?600&500|}} {{:costo:test:userguide:6.png?600&500|}} \\ you can see above your project corretly imported into your eclispe workspace. - Unfold kmelia directory and double click on PlatoonSystem.kcp file to see its content. {{:costo:test:userguide:7.png?600&500|}} \\ PlatoonSystem is an Kmelia application about intelligent system embedded on new generation of vehicle. Here we similate an set of 3 vehicles. The driver, the mid and the last. \\ Application abstract: The first is control by pilot (a man) and the other two without pilot. they are connected to the first via an intelligent system which allows control of the over vehicles from the first. This system allows the driver to convey both vehicle without a pilot to an prefixed destination with maintaining a distance of safety calculated dynamically depending on the speed of the vehicle predecessor.\\ - Our aim is to test PlatoonSystem application. For that we need a test intention file which resume what we want to test, of course an service or component \\ Double-click on the PLatoonTestIntention.kcp file to explore its content. {{:costo:test:userguide:8.png?600&500|}}. \\ From this file click on "Generate TH" button on workbench (top-right). - A new window appears click on "Harness" and then click on "Select Target" menu item {{:costo:test:userguide:9.png?600&500|}} - Select PlatoonSystem.kcp and click on "Open" to load file. {{:costo:test:userguide:10.png?600&500|}} \\ An pop up windows appears , choose the service you want to test. In our example choose computeSpeed service and click ok.{{:costo:test:userguide:11.png?600&500|}} \\ - We get now a new windows resuming system under test and its configuration variables. {{:costo:test:userguide:12.png?600&500|}} \\ From here we will assign all required variables to each corresponding variables from our test intention in our to build test harness \\ Click on unassigned button on the same level with pvname {{:costo:test:userguide:17.png?nolink&300|}}label. Choose create "New Input Variable" from pop up dialog which appears and click OK. Give a name to this new variable ,for example "vehiculeName" and click OK. {{:costo:test:userguide:13.png?600&500|}} {{:costo:test:userguide:14.png?600&500|}} - Assign currentPos variable : \\ Click on unassigned button on the same level with currentPos label. Choose "lastpos" from pop-up dialog which appears and click OK. {{:costo:test:userguide:16.png?600&500|}} \\ Assign: currenSpeed to vspeed, safedistance to safedistance, and Result to speed. - Assign Required services: \\ Click on unassigned button on the same level with pilotpos.\\ Choose "IntegerMock" from pop-up dialog which appears and click OK {{:costo:test:userguide:17.png?600&500|}}. \\ A new IntegerMock tab is added. Go to this tab and click on unassigned button on the same level with value label. \\ Assign this variable to pilotpos. \\ {{:costo:test:userguide:1919.png?500&300}} - Do the same with pilotspeed and assign it to pilotspeed {{:costo:test:userguide:20.png?600&500|}} - Now click on "Generate" item form Harness menu to generate your test harness. {{:costo:test:userguide:22.png?600&500|}} \\ Two confirmation pop-up appears, click OK. \\ {{:costo:test:userguide:22.png?600&500|}} - Close this windows and return to your eclipse workbench. Refresh your project and unfold the new folder generated "PlatoonTestIntention folder" \\ Double click on test harness file "TH_PLatoonTestIntention.kcp". From this test click on "Launch TH" button. \\ A dialog bow appears, select the number of tests data you want to build. {{:costo:test:userguide:25.png?600&500|}} ===== Third step : Building Tests Data And launch Test process===== - Select three tests data configuration in pop-up box as specified in FIG Previous \\ an edition table opens, fill all the cells depending on the type of data. \\ {{:costo:test:userguide:26.png?600&500|}} {{:costo:test:userguide:27.png?600&500|}} \\ After that click on Submit button. - Once again close this windows and go to your eclipse workbench to refresh your project. Go to PlatoonTestIntention Data folder and double click on data.xml file to see your data generated. \\ {{:costo:test:userguide:28.png?600&500|}} - Go to src directory, unfold its and find LauncherTH_PlatoonTestIntention. Run it as Java Application and see the result in real-time. \\ {{:costo:test:userguide:29.png?600&5000|}} {{:costo:test:userguide:30.png?600&500|}} \\ The log of this test can be found in Data directory. his name is "data_res.xml". \\ {{:costo:test:userguide:31.png?600&500|}} **//Conclusion: we applied 3 configurations to our test harness. they are a true verdict (100% success), so we can deduce that the specification of our model is reliable//**