Thursday, December 3, 2009

SWTBot test for RCP application, through command line

We are going to execute same test application (SWTBot test package for RCP application in Eclipse,Create simple eclipse RCP) through command line.

INPUT POSTS(Create simple eclipse RCP,SWTBot test package for RCP application in Eclipse)

Requirement:: headless version of SWTBot for Eclipse 3.5 Galileo
for the installation of SWTBot you can refer (http://www.eclipse.org/swtbot/downloads.php ->http://www.eclipse.org/downloads/download.php?file=/technology/swtbot/galileo/dev-build/org.eclipse.swtbot.eclipse.test-2.0.0.433-dev-e35.zip).

Steps:
Select File -> Export -> Deployable plug-ins and fragment and click next.

Browse directory and set it to your eclipse plug in directory for example C:\Data\SampleExamples\setup\eclipse\plugins and click Finish.


This will create a deployable jar in eclipse plug in directory like com.sam.rcp.client.example_1.0.0.xxxxxxx.jar.


Install Ant: (http://ant.apache.org/bindownload.cgi)


Create ant build file for exported project (com.sam.rcp.client.example)


Note: Right click and open in new tab/window


Open a command window and run test case. Go to directory where build file is for example

(example:C:\Data\SampleExamples\setup\build\SWTBotBuild) and run ant build.


This will launch a eclipse RCP and perform all operations similar as running from eclipse.


Note: Right click and open in new tab/window


Please follow posts for more advance example.



No comments:

Post a Comment