Skip to main content
Jump to: navigation, search


1) Introduction

This page provides information and links related to Test Automation of COSMOS junits.

2) Test Automation Overview

The COSMOS build is based on Eclipse PDE (Plug-in Development Environment) and it runs in the eclipse server. Currently the candidate drivers at the end of an iteration are manually tested by the respective component teams. This initiative is to define the process of testing and automate junit execution as part of the build. By automating and integrating with the build, testing can be done more often and bugs will be discovered early on.

The test cases are available in CVS at the following location:
Cosmos cvs.jpg

Go to HEAD -> org.eclipse.cosmos -> tests

3) Test Details

The following table briefly explains the different contacts for the test cases as well as the pre reqs and test setup needed to execute it.

Sl No Component Test Project Contact Person Dependencies Test Setup Test Automation Whitemanorg.eclipse.cosmos.common.testsThe directory in testTempDirectory in will be created. This will need to be changed from the default for Linux testing.Done, only normal junits, no plugin junits
2data-collectionorg.eclipse.cosmos.dc.framework.test???Execution works fine, but all the test cases fails, need this to be deployed http://localhost:8080/cosmos/services
3data-collectionorg.eclipse.cosmos.dc.tests???The project cannot be compiled due to following dependency errors:

missing required Java projects:
1) org.apache.ibatis
2) org.eclipse.cosmos.dc.common
3) org.eclipse.cosmos.dc.local.registry
4) org.eclipse.cosmos.dc.remote.wsdm
5) org.eclipse.cosmos.dc.spec

4data-collectionorg.eclipse.cosmos.example.mdr.registration.testsAli MehreganiCOSMOS environmentThis test requires the COSMOS environment to be running before the test is executed. It's meant to perform functional testing on the registration service. It's probably unrealistic to run this plug-in against each build. I would exclude this test from your test automation framework
1data-reportingorg.eclipse.cosmos.dr.tests.drs.service.handlerSheldon Lee-LoyThe COSMOS End 2 End should be deployed on http://localhost:8080The project cannot be compiled due to following dependency errors:

1) missing required Java project: 'org.eclipse.cosmos.dr.drs.service.handler'
2) Target runtime Apache Tomcat v5.5 is not defined

2data-reportingorg.eclipse.cosmos.dr.tests.drs.service.handler.tptpSheldon Lee-Loyorg.eclipse.cosmos.dr.tests.drs.service.handlerThe COSMOS End 2 End should be deployed on http://localhost:8080The project was not built since it depends on org.eclipse.cosmos.dr.tests.drs.service.handler, which has build path errors Whitemanorg.eclipse.cosmos.common.tests, Webtools platformOne manual test in addition to a plugin test.InactiveProcessException while executing testcase

The project cannot be compiled due to following dependency errors:
missing required Java projects:
1) org.apache.axis2.jaxws.api
2) org.apache.axis2.jws.api

1resource-modelingorg.eclipse.cosmos.rm.repository.testsDavid Whitemanorg.eclipse.cosmos.common.testsSee org.eclipse.cosmos.rm.repository.tests/src/org/eclipse/cosmos/rm/repository/tests/common/ and org.eclipse.cosmos.rm.repository.tests/src/META-INFDone, only normal juints, no plugin junits. Configuration reqd as mentioned.
2resource-modelingorg.eclipse.cosmos.rm.smlif.testsDavid Whitemanorg.eclipse.cosmos.common.testsConfigure artifacts in org.eclipse.cosmos.rm.smlif.tests/test-resources. Open the TPTP artifacts to see documentation on what is required.Partially done, AllTests.testsuite works. Error while executing TPTP plugin junits - junit.framework.AssertionFailedError: The project P/org.eclipse.cosmos.rm.example.datacenter does not exist in the test workspace at E:/Bobz/workarea/COSMOS/TestAuto/tmp/test-workspace
3resource-modelingorg.eclipse.cosmos.rm.validation.testsDavid Whitemanorg.eclipse.cosmos.common.testsSee org.eclipse.cosmos.rm.validation.tests/src/org/eclipse/cosmos/rm/validation/internal/common/ Also need to configure artifacts in org.eclipse.cosmos.rm.validation.tests/test-resources for plugin tests (open the artifacts to read documentation on doing this).Done, both normal and plugin junits work.

We will try to automate as much as possible from the above list using the TPTP Test Automation Framework.

4) Test Automation Setup

Please check "/org.eclipse.cosmos/releng/org.eclipse.cosmos.releng.builder/test-automation" cvs structure for the files refer in following instructions.

1) To create proper automation directory structure please checkout 
and run "create-test-structure.bat" as follows : 

    create-test-structure.bat D:\COSMOS\test-automation 

This will create following directory structure in test automation directory.
2) Install apache-ant-1.7.0-bin to "artifacts\ant" location.
3) Copy cvs.exe to "artifacts\cvs" location. 
   Download this from file contains cvs.exe.
4) Copy following zip files to "artifacts\tptp45" location.   
   These files can be found at TPTP 4.5 download page.
   (For axis check apache web page) 

5) Copy following zip files to "artifacts\tptp441" location and then unzip them.
   These files can be found at TPTP 4.4.1 download page. 

6) Copy following files to "artifacts\webapp" location.
7) Copy "run_testauto.bat" file to "bin" directory and then modify following
   variable in that batch file.
      set automation_home=D://COSMOS//test-automation
      set cvspath=D:\COSMOS\test-automation\artifacts\cvs
      set antpath=D:\COSMOS\test-automation\artifacts\ant\bin
   Make sure to use same file seperator character for variables as 
   given in batch file.
8) Copy "" file to "config" directory and then modify following
   variable in that file according to test machine environment.
      JAVA_HOME=C:/Program Files/IBM/Java50

   Provide your eclipse user and password information for scp related settings.   
9) Copy following files to "script" directory.
(10) To setup "lib" directory.
     Copy "ant-tptp.jar" to lib from 

     Copy "" to lib from

     Copy "org.eclipse.osgi_3.4.0.v20080605-1900.jar" to lib from

     Copy "jsch-0.1.29.jar" to lib. (This file used for ant scp task)
     Download this from group_id=64920&package_id=107616

     Checkout "test-automation/src" from cvs,create Jar out of it 
     and copy it to lib. Name of the jar file does not matter but 
     preferrably it can be named as "TestAuto.jar"
11) Run "bin/run_testauto.bat" to run the test-automation.

Back to the top