Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Tests(tests tycho and maven)
Tests [message #1404757] Tue, 05 August 2014 14:05 Go to next message
Beatriz SanchezFriend
Messages: 22
Registered: July 2014
Location: York
Junior Member
I'm working on a project which has basically the same structure, however the fact that we have to add 3 projects or modules for each client and server and 2 others for the shared module seems a little too much for me. The convention in maven is to create a test folder parallel to the main folder both inside the src folder. Scouts creates packages immediately after the src so there are no main nor test folders and we have no option but to create many extra projects or to move all packages to the a new main folder. Maybe it would be convenient to modify scout's convention and add all new classes in a main folder. What do you think about this?
index.php/fa/18781/0/
  • Attachment: maven.png
    (Size: 15.55KB, Downloaded 485 times)
Re: Tests [message #1409911 is a reply to message #1404757] Tue, 19 August 2014 09:25 Go to previous messageGo to next message
Judith Gull is currently offline Judith GullFriend
Messages: 75
Registered: February 2010
Member
Scout uses Eclipse Tycho for building and testing (see [1]). Therefore you cannot use the default maven project structure. You need to create a new test fragment containing only the tests for your project.

There is a tutorial [2] and an example application [3]. You can also check out the blog post [4].

[1] https://wiki.eclipse.org/Tycho/Testing_with_Surefire
[2] https://wiki.eclipse.org/Scout/Tutorial/4.0/Maven_Tycho_Build
[3] https://github.com/BSI-Business-Systems-Integration-AG/org.eclipsescout.demo/tree/develop/minifigcreator
[4] http://www.bsiag.com/scout/testing-scout-applications-2/
Re: Tests [message #1410701 is a reply to message #1409911] Thu, 21 August 2014 12:24 Go to previous messageGo to next message
Beatriz SanchezFriend
Messages: 22
Registered: July 2014
Location: York
Junior Member
thanks! I hadn't checked out those resources. They will definitely help me out
Re: Tests [message #1412086 is a reply to message #1410701] Mon, 25 August 2014 09:00 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Thanks for asking the question here.

The structure you are describing is very common in plain maven project. When you work with plugins like in an eclipse scout application you need to organize you code as Judith told.

I have tried to ask this question on the Tycho Mailing list:
[tycho-user] Is there a way to have src/ and test/ in the same eclipse plug-in?
The answers I got are clear: you should not use the plain-maven approach.

In my opinion this is due to how dependencies are handled:

* Plain maven project:
Dependencies are defined in the pom.xml files, you can have different dependencies for the src/ and the test/ folder inside the same maven module.

* Maven Tycho project:
Dependencies are defined in the META-INF/MANIFEST.MF of the plugin (which is also a maven module). Even if you have 2 source folder src/ and test/ in your plugin, you can specify the dependencies only once.
If you follow this approach, this means that you will include testing dependencies into your productive code. This is not recommended.

I hope this helps.
Feel free to continue the discussion (here or on the tycho-user mailing list).

---
Related topic:
* [tycho-user]Splitting source and test artifacts

[Updated on: Thu, 04 September 2014 16:50]

Report message to a moderator

Re: Tests [message #1413016 is a reply to message #1412086] Wed, 27 August 2014 15:18 Go to previous message
Beatriz SanchezFriend
Messages: 22
Registered: July 2014
Location: York
Junior Member
thanks again Smile
Previous Topic:Multiple outline
Next Topic:Exported Scout application not working
Goto Forum:
  


Current Time: Tue Apr 23 09:18:38 GMT 2024

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

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

Back to the top