Any hints for running RCP plugin tests from ant ?

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

Any hints for running RCP plugin tests from ant ?

Postby jasonwang » Mon Jul 23, 2007 8:25 pm

I am trying to run the WindowTester tests from Ant. First I tried your WindowTesterExampleAnt sample which works properly. The guide says modification is required for running RCP application, so I tried to modify the sample script to run the RCP sample - rcpContactMngr.

What I did is:
1. Export the WindowTest sample rcpContactMngr as deployable plugin
2. Modify the script to bind the created plugin (rcpContactMngr)
3. Change the test.xml and test-macros.xml to lauch the RCP product.
Please see the following snippet
Code: Select all
--- test.xml ---
      <launch-eclipse target="Eclipse3.2"
                      testname="WindowTesterExampleRCP"
                      testplugin="rcpContactMngr"
                      testclass="AddContactTest" />
      <generate-summary />

--- test-macros.xml ---
         <!-- Launch eclipse and run the tests -->
         <exec executable="java" output="@{output}/test-out.txt">
            <arg value="-Xms64M" />
            <arg value="-Xmx256M" />
            <arg value="-cp" />
            <arg value="${@{target}}/startup.jar" />
            <arg value="org.eclipse.core.launcher.Main" />
            <arg value="-clean" />
            <arg value="-noupdate" />
            <arg value="-configuration" />
            <arg value="C:\Program Files\eclipse/.metadata/.plugins/org.eclipse.pde.core/pde-junit" />
            <arg value="-dev" />
            <arg value="bin" />
            
            
            <arg value="-product" />
            <arg value="rcpContactMngr.product" />
<!--            
            <arg value="-application" />
            <arg value="org.eclipse.test.uitestapplication" />
-->                              <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,@{output}/test-result.xml" />
            <arg value="-testPluginName" />
            <arg value="@{testplugin}" />
            <arg value="-classname" />
            <arg value="@{testclass}" />
            <arg value="-verbose" />
            <arg value="-consolelog" />
         </exec>


The application is launched properly, but the test class does not work. The test result shows no test was run. I could not find any error message as well. I am not sure what I did is correct. Could anyone give me some hints for this?
jasonwang
 
Posts: 11
Joined: Tue Jul 17, 2007 10:51 pm

Postby gnebling » Tue Jul 24, 2007 9:56 am

We are currently working on a sample Ant script for RCP applications and hope to get it done this week or next week.
gnebling
Moderator
 
Posts: 243
Joined: Tue Aug 22, 2006 7:49 am

Postby gnebling » Thu Aug 02, 2007 12:17 pm

We now have an example for running WindowTester tests on a RCP Application from Ant. Please see this page for more information on where to download and how to run the script:

http://downloads.instantiations.com/Win ... ample.html

Please give it a try and let us know how your testing goes.
gnebling
Moderator
 
Posts: 243
Joined: Tue Aug 22, 2006 7:49 am

Postby jasonwang » Thu Aug 02, 2007 7:26 pm

That is really good. Thanks a lot.
jasonwang
 
Posts: 11
Joined: Tue Jul 17, 2007 10:51 pm


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest