workbench does not exit?

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

workbench does not exit?

Postby typh00n » Wed Dec 01, 2010 6:41 am

I have built an ant script that launches my built eclipse product and runs the ui tests. I run this via hudson, but i get the same behavior if i run it from eclipse or an normal cmd. It runs the tests successfully but i get no xml outpufile from it. Also it does not shut down the workbench after its finished. It just stands there waiting, do i need to write an "exit workbench" test?

This is started via an exec ant task like (took most from the snippets)
Code: Select all
<exec os="Windows XP" executable="java" failonerror="false">
         <arg value="-Xms64M" />
         <arg value="-Xmx512M" />
         <arg value="-cp" />
         <arg value="${eclipse.startup.jar}" />
         <arg value="org.eclipse.core.launcher.Main"/>
         <arg value="-application"/>
         <arg value="com.windowtester.runner.application"/>
         <arg value="formatter=${junit.formatter},${buckminster.temp.root}/test-result${TODAY}.xml" />
         <arg value="-testProduct"/>
         <arg value="${test.product}"/>
         <arg value="-pluginCustomization"/>
         <arg value="${pluginCustomization.ini}"/>
         <arg value="-data"/>
         <arg value="${test.workspace}"/>
         <arg value="-testPluginName"/>
         <arg value="${test.pluginname}"/>
         <arg value="-classname"/>
         <arg value="${testclassname}"/>
         <arg value="-consoleLog" />
         <arg value="-clean" />
      </exec>


When its started i get this as output:

Code: Select all
echo] using eclipse launcher c:\ws\eclipse_test\3.6_ui_tests\plugins\org.eclipse.equinox.launcher_1.1.0.v20100507.jar
     [exec] !SESSION 2010-11-29 07:55:22.379 -----------------------------------------------
     [exec] eclipse.buildId=unknown
     [exec] java.version=1.6.0_05
     [exec] java.vendor=Sun Microsystems Inc.
     [exec] BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=sv_SE
     [exec] Framework arguments:  formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,c:/ws/buck_build/tmp/test-result2010-11-29_07-55-20.xml -application com.windowtester.runner.application -testProduct se.rsv.zz.eclipse.helios.product -pluginCustomization c:/ws/eclipse_test/3.6_ui_tests/plugins/se.rsv.zz.eclipse.helios_0.9.6/prefs/plugin_customization.ini -testPluginName se.rsv.zz.eclipse.helios.test -classname se.rsv.zz.eclipse.helios.test.all.AllTests
     [exec] Command-line arguments:  formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,c:/ws/buck_build/tmp/test-result2010-11-29_07-55-20.xml -application com.windowtester.runner.application -testProduct se.rsv.zz.eclipse.helios.product -pluginCustomization c:/ws/eclipse_test/3.6_ui_tests/plugins/se.rsv.zz.eclipse.helios_0.9.6/prefs/plugin_customization.ini -data c:/ws/eclipse_test/3.6_ui_tests/tmp_workspace -testPluginName se.rsv.zz.eclipse.helios.test -classname se.rsv.zz.eclipse.helios.test.all.AllTests -consoleLog -clean
     [exec]
     [exec] !ENTRY com.instantiations.eclipse 1 0 2010-11-29 07:55:35.957
     [exec] !MESSAGE Bundle org.eclipse.test cannot be found.
     [exec]
     [exec] !ENTRY com.instantiations.eclipse 1 0 2010-11-29 07:55:51.926
     [exec] !MESSAGE UI test starting: se.rsv.zz.eclipse.helios.test.installed.AboutDialog_testAboutDialog
     [exec]
     [exec] !ENTRY com.instantiations.eclipse 1 0 2010-11-29 07:55:52.426
     [exec] !MESSAGE
     [exec] *************************************************
     [exec] WindowTester Runtime 201009131510
     [exec]    OS:   Windows XP, x86, 5.1
     [exec]    Java: Sun Microsystems Inc., 1.6.0_05
     [exec]    Spec: Java Platform API Specification, Sun Microsystems Inc., 1.6
     [exec]    VM:   Java Virtual Machine Specification, Sun Microsystems Inc., 1.0
     [exec] *************************************************
....


Since i don't get an xml output file hudson cannot record the junit test number etc. Is this all because of the workbench does not exit?

best regards

David
typh00n
 
Posts: 2
Joined: Sun Nov 28, 2010 11:33 pm

Re: workbench does not exit?

Postby keertip » Wed Dec 01, 2010 8:32 am

At the end of all the tests, add code to exit the workbench. Closing the workbench should fix the other issue too.
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am

Re: workbench does not exit?

Postby typh00n » Fri Dec 03, 2010 5:43 am

Hmm i still don't get the xml file.

I just did a simple

Code: Select all
ui.click(new MenuItemLocator("File/Exit"));


it closes the workbench, but no xml file. Any idea on where to start looking? Also it seems that the exec task gives me an "2" in return code when it finishes, but eclipse says nothing, no errors in the log, just the info about the executed tests.

Btw why doesn't the testrunner close the application like it suggested in this thread?

viewtopic.php?f=5&t=5430&p=17437&hilit=exit+close+workbench#p17437

best regards

David
typh00n
 
Posts: 2
Joined: Sun Nov 28, 2010 11:33 pm

Re: workbench does not exit?

Postby keertip » Fri Dec 03, 2010 10:32 am

Guess File/Exit is not the way to go - please remove that line from your tests.

Let us first look at the problem of the workbench not exiting once all tests are done. Do you have the same issue even when you run the tests in eclipse? Can you reproduce this problem with a small sample test? If so, please post the test so that we can take a look at it.
keertip
Moderator
 
Posts: 221
Joined: Thu Mar 15, 2007 10:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest

cron