Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » run tests with maven/tycho headless
run tests with maven/tycho headless [message #1718738] Tue, 29 December 2015 16:01 Go to next message
Fredy Setz is currently offline Fredy SetzFriend
Messages: 3
Registered: December 2015
Junior Member
On your homepage https://wiki.eclipse.org/SWTBot/Automate_test_execution

you describe how to configure maven tycho to have a the tests executed against a running application.

I wonder if there is a simple way to execute swtbot tests headless with maven tycho build. Does anybody have such an example out there?

Thanks for your advice
Re: run tests with maven/tycho headless [message #1719333 is a reply to message #1718738] Thu, 07 January 2016 10:33 Go to previous messageGo to next message
Stephan Druskat is currently offline Stephan DruskatFriend
Messages: 102
Registered: October 2011
Location: Berlin, Germany
Senior Member

This is what I use in the POM for my GUI tests plugin, works fine.

<build>
  <plugins>
    <plugin>
      <groupId>org.eclipse.tycho</groupId>
      <artifactId>tycho-surefire-plugin</artifactId>
      <version>${tycho-version}</version>
	<configuration>
	  <useUIHarness>true</useUIHarness>
	  <useUIThread>false</useUIThread>
 	  <product>my.product</product>
	  <application>my.application</application>
	</configuration>
      </plugin>
    </plugins>
</build>
Re: run tests with maven/tycho headless [message #1719474 is a reply to message #1719333] Fri, 08 January 2016 09:25 Go to previous messageGo to next message
Fredy Setz is currently offline Fredy SetzFriend
Messages: 3
Registered: December 2015
Junior Member
This is also what I use with tycho but it is not headless.
Re: run tests with maven/tycho headless [message #1721838 is a reply to message #1718738] Sun, 31 January 2016 21:58 Go to previous messageGo to next message
Mickael Istria - away until August 14th is currently offline Mickael Istria - away until August 14thFriend
Messages: 833
Registered: July 2009
Location: Grenoble, France
Senior Member

On 12/29/2015 05:42 PM, Fredy Setz wrote:
> I wonder if there is a simple way to execute swtbot tests headless with
> maven tycho build. Does anybody have such an example out there?

See also
https://wiki.eclipse.org/Tycho/FAQ#How_to_use_SWTBot_or_some_UI_tool_for_testing.3F
and
https://eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#testRuntime

--
Mickael Istria
My job: http://www.jboss.org/tools
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: run tests with maven/tycho headless [message #1722167 is a reply to message #1721838] Wed, 03 February 2016 08:19 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 31/01/2016 22:58, Mickael Istria wrote:
> On 12/29/2015 05:42 PM, Fredy Setz wrote:
>> I wonder if there is a simple way to execute swtbot tests headless with
>> maven tycho build. Does anybody have such an example out there?
>
> See also
> https://wiki.eclipse.org/Tycho/FAQ#How_to_use_SWTBot_or_some_UI_tool_for_testing.3F
> and
> https://eclipse.org/tycho/sitedocs/tycho-surefire/tycho-surefire-plugin/test-mojo.html#testRuntime
>
>

Fredy

as Mickael suggested, you might want to have a look at
test-mojo.html#testRuntime; that's quite a powerful feature, though I
had a few problems to set it up at the beginning ;)

You might want to have a look at this example

https://github.com/LorenzoBettini/javamm/blob/master/javamm.swtbot.tests/pom.xml

In this example, I run the SWTBot tests against a provisioned Eclipse
(with my features/bundles installed). This gives you much more
confidence, since it actually simulates what your users have once they
installed your features in an Eclipse.

Hope this helps
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: run tests with maven/tycho headless [message #1725624 is a reply to message #1722167] Sat, 05 March 2016 08:29 Go to previous messageGo to next message
Fredy Setz is currently offline Fredy SetzFriend
Messages: 3
Registered: December 2015
Junior Member
Thanks for your answers. But everything you showed above with tycho is not headless. So I assume the only way to run a headless build is with ant as you described it here http://wiki.eclipse.org/SWTBot/Automate_test_execution#Ant
Re: run tests with maven/tycho headless [message #1726021 is a reply to message #1725624] Wed, 09 March 2016 06:01 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1751
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 05/03/2016 09:29, Fredy Setz wrote:
> Thanks for your answers. But everything you showed above with tycho is
> not headless. So I assume the only way to run a headless build is with
> ant as you described it here
> http://wiki.eclipse.org/SWTBot/Automate_test_execution#Ant

Then it is not clear what you mean by "headless" :)

--
Prof. Lorenzo Bettini, Computer Science, DISIA, Univ. Firenze
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book
Previous Topic:Testing External Application with SWBot
Next Topic:Does SWTBot supports JavaFx
Goto Forum:
  


Current Time: Mon Nov 19 19:31:57 GMT 2018

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

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

Back to the top