Requirements:
- Eclipse 3.4
- CubicTest 1.9.2 (installed as a plug-in)
- Java JDK 1.5
Downloading the CubicEx project:
- In Eclipse choose File -> Import...
- Choose SVN -> Checkout Projects from SVN and click on Next
- Choose Create a new repository location and click on Next
- Enter the following URL https://cubicex.googlecode.com/svn/trunk and click on Next
- Choose the folder CubicEx and click on Next
- Choose Check out as a project configured using the New Project Wizard
- Choose Check out HEAD revision
- Choose Finish
Now the New Project wizard should pop-up.
- Choose Java Project and click on Next
- In the Project Name field type in CubicEx
- Choose a JDK 1.5 version.
- Choose Create seperate folders for sources and class files
- Click on Next
- Click in the Libraries tab on the Add Library... button.
- Select the CubicTest Selenium library and click on NExt and then Finish
- Click on Finish
Now that the library has been added we only need to set the Java compliance setting.
- Select the CubicEx project in the Package Explorer and choose Project -> Properties...
- Click in the left side on Java Compiler
- If the Compiler compliance level is not 5.0 change it to 5.0.
If you now compile the project it means that everything is ok.
Happy coding!!
Downloading the CubicExTest project:
Before you can download and setup the CubicExTest project you must first have completed this for the CubicEx project.
- In Eclipse choose File -> Import...
- Choose SVN -> Checkout Projects from SVN and click on Next
- Choose the existing repository location that was created with the CubicEx project.
- Choose the folder CubicExText and click on Next
- Choose Check out as a project configured using the New Project Wizard
- Choose Check out HEAD revision
- Choose Finish
Now the New Project wizard should pop-up.
- Choose Java Project and click on Next
- In the Project Name field type in CubicExTest
- Choose a JDK 1.5 version.
- Choose Create seperate folders for sources and class files
- Click on Next
- In the Projects tab click on the Add... button and select the CubicEx project click on OK
- Click in the Libraries tab on the Add Library... button.
- Select the CubicTest Selenium library and click on Next and then Finish
- Click on Finish
Now we need to add the commands folder of the CubicEx project into this project, to prevent that we constantly need to copy this folder we will create a linked folder.
- Select The CubicExTest project in the Package Explorer
- New choose File -> New -> Folder in the menu.
- In the Folder Name field type in commands
- Click on Advanced
- Choose Link to folder in the file system
- Now click on the Variables button to create a new variable.
- Click on New
- In the Name field type in CUBIC_EX_COMMANDS
- Click on the Folder button to browse and select the commands folder in your CubicEx project.
- Click on OK
- Make sure the newly created variable is selected.
- Click on OK
- Click on Finish
Finally we need to set the source path correctly:
- Select The CubicExTest project in the Package Explorer
- Choose Project -> Properties
- In the left part select Java Build Path
- Select the Source tab
- Click on the CubicExTest/src entry en click on Remove
- Now click on Add Folder...
- Choose the CubicExtTest -> src -> test -> java folder and click on OK
- Click on OK
Now you're project is ready, the only thing now is that you need to have an HTTP web server which can server two HTML pages which are used by the test cases. In my situation i run my pages on my development machine on port 80.
Running the CubicExTest samples:
The CubicExTest project contains a server folder which has two ways of starting up a simple HTTP server with the web pages that are necessary for the samples.
When working on Linux you can start ./start.sh, however make sure you have root rights to start the server otherwise the allocation of a port number fails.
When working on Windows you can start start.bat, you need to do this from the command prompt otherwise it will not work (and type the complete name including .bat otherwise it will only start a new command line process.
Then go to your Eclipse and open the folder CubicExTest/tests, now open a sample test and right click in the diagram view. Now choose Run As -> Run CubicTest with Selenium, now the test should start to run.
Hi, Eclipse prompts for authentication credentials when prefixing URL with "https" (step 4). I was able to download the project fine when going through "http" instead.
Best Regards, Jorge
All tests fail with a NotFoundException? such as:
org.cubictest.export.exceptions.ExporterException?: java.lang.ClassNotFoundException?: nl.sodeso.cubicex.command.storage.StoreConstant
until I Add JAR /CubicEx?/target/CubicEx?.jar as a Library in the Build Path! Then everything works fine.
How do I rebuild the CubicEx?.jar file? The custom command FireLinkEvent does not work and I presume the problem is in CubicEx? itself since I can write my own .custom and .java file calling selenium.open() and that works fine. However, I could not follow the instructions above exactly because my Eclipse does not talk to SVN repos. So I used wget to get everything over http and then put it in a CVS repo. Now I would like to rebuild the CubicEx?.jar file from source but when I choose Project/Clean and then Project/Build Project nothing happens! Even when I manually remove the .jar file (as Clean fails to do that which makes me think that my installation is broken) then Build still does nothing. I'm a java newbie so am now stuck...