Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Headless SWTBot tests fail on Windows
Headless SWTBot tests fail on Windows [message #1699000] Fri, 19 June 2015 12:07 Go to next message
Donat Csikos is currently offline Donat CsikosFriend
Messages: 14
Registered: February 2012
Junior Member
I'm trying to add a few SWTBot UI tests to the Buildship project (Gradle integration for Eclipse) and I encountered a strange issue. When the tests are running locally they pass both on Linux and on Windows. But, when the same tests run on the CI server, they pass on Linux but fail on Windows.

When analysing the error log, it says, widget not found. The screenshot created by the tests is an 1024x768 blanc jpeg image. An example for the failing build is available here: https://builds.gradle.org/viewLog.html?buildId=346679&tab=buildResultsDiv&buildTypeId=Tooling_Master_Commit_Windows_Eclipse37Build (credentials: guest/guest)

The test execution is done by Gradle, which under the hood only executes the following console command:
Command: /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin/java -Declipse.p2.data.area=@config.dir/p2 -Declipse.pde.launch=true -Dosgi.requiredJavaVersion=1.7 -XX:MaxPermSize=256m -XstartOnFirstThread -Xms40m -Xmx1024m -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant -cp /Users/donat/Development/oomph/buildship-master/git/buildship/org.eclipse.buildship.ui.test/build/eclipseTest/eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar org.eclipse.equinox.launcher.Main -os macosx -ws cocoa -arch x86_64 -consoleLog -debug /Users/donat/Development/oomph/buildship-master/git/buildship/org.eclipse.buildship.core/.options -version 4 -port 61227 -testLoaderClass org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames org.eclipse.buildship.ui.wizard.project.ProjectCreationWizardUiTest -application org.eclipse.swtbot.eclipse.core.swtbottestapplication -product org.eclipse.platform.ide -data /Users/donat/Development/oomph/buildship-master/git/buildship/org.eclipse.buildship.ui.test/build/eclipseTest -configuration /Users/donat/Development/oomph/buildship-master/git/buildship/org.eclipse.buildship.ui.test/build/eclipseTest/eclipse/configuration -testpluginname org.eclipse.buildship.ui

Any help is greatly appreciated!
Re: Headless SWTBot tests fail on Windows [message #1699221 is a reply to message #1699000] Mon, 22 June 2015 16:47 Go to previous messageGo to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1751
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 19/06/2015 14:07, Donat Csikos wrote:
> I'm trying to add a few SWTBot UI tests to the Buildship project (Gradle
> integration for Eclipse) and I encountered a strange issue. When the
> tests are running locally they pass both on Linux and on Windows. But,
> when the same tests run on the CI server, they pass on Linux but fail on
> Windows.
> When analysing the error log, it says, widget not found. The screenshot
> created by the tests is an 1024x768 blanc jpeg image. An example for the
> failing build is available here:
> https://builds.gradle.org/viewLog.html?buildId=346679&tab=buildResultsDiv&buildTypeId=Tooling_Master_Commit_Windows_Eclipse37Build
> (credentials: guest/guest)
>
> The test execution is done by Gradle, which under the hood only executes
> the following console command: Command:
> /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin/java
> -Declipse.p2.data.area=@config.dir/p2 -Declipse.pde.launch=true
> -Dosgi.requiredJavaVersion=1.7 -XX:MaxPermSize=256m -XstartOnFirstThread
> -Xms40m -Xmx1024m -Dfile.encoding=UTF-8 -Duser.country=US
> -Duser.language=en -Duser.variant -cp
> /Users/donat/Development/oomph/buildship-master/git/buildship/org.eclipse.buildship.ui.test/build/eclipseTest/eclipse/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
> org.eclipse.equinox.launcher.Main -os macosx -ws cocoa -arch x86_64
> -consoleLog -debug
> /Users/donat/Development/oomph/buildship-master/git/buildship/org.eclipse.buildship.core/.options
> -version 4 -port 61227 -testLoaderClass
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader
> -loaderpluginname org.eclipse.jdt.junit4.runtime -classNames
> org.eclipse.buildship.ui.wizard.project.ProjectCreationWizardUiTest
> -application org.eclipse.swtbot.eclipse.core.swtbottestapplication
> -product org.eclipse.platform.ide -data
> /Users/donat/Development/oomph/buildship-master/git/buildship/org.eclipse.buildship.ui.test/build/eclipseTest
> -configuration
> /Users/donat/Development/oomph/buildship-master/git/buildship/org.eclipse.buildship.ui.test/build/eclipseTest/eclipse/configuration
> -testpluginname org.eclipse.buildship.ui
> Any help is greatly appreciated!
>

Hi

did you check the hints for windows reported here:
https://wiki.eclipse.org/SWTBot/Automate_test_execution

Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Re: Headless SWTBot tests fail on Windows [message #1702323 is a reply to message #1699221] Tue, 21 July 2015 14:37 Go to previous messageGo to next message
Donat Csikos is currently offline Donat CsikosFriend
Messages: 14
Registered: February 2012
Junior Member
Yes I did, but for windows there is one entry related to jenkins.
We use the the
org.eclipse.swtbot.eclipse.core.swtbottestapplication
application to launch the tests from the command line. The full logic is available here.
Re: Headless SWTBot tests fail on Windows [message #1702420 is a reply to message #1702323] Wed, 22 July 2015 09:03 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1751
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 21/07/2015 16:37, Donat Csikos wrote:
> Yes I did, but for windows there is one entry related to jenkins.

Do you mean "no" instead of "one"?

> We use the the org.eclipse.swtbot.eclipse.core.swtbottestapplication
> application to launch the tests from the command line. The full logic is
> available
> https://github.com/eclipse/buildship/blob/master/buildSrc/src/main/groovy/eclipsebuild/testing/EclipseTestExecuter.java#L96-L158.
>

However, I'm afraid, I never tried Jenkins/SWTBot on Windows...

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Previous Topic:Still cannot get Mars working with Kali Linux
Next Topic:swtbot command line plugins
Goto Forum:
  


Current Time: Tue Nov 13 04:44:00 GMT 2018

Powered by FUDForum. Page generated in 0.02756 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top