Skip to main content



      Home
Home » Eclipse Projects » Eclipse Scout » Tests(tests tycho and maven)
Tests [message #1404757] Tue, 05 August 2014 10:05 Go to next message
Eclipse UserFriend
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 531 times)
Re: Tests [message #1409911 is a reply to message #1404757] Tue, 19 August 2014 05:25 Go to previous messageGo to next message
Eclipse UserFriend
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 08:24 Go to previous messageGo to next message
Eclipse UserFriend
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 05:00 Go to previous messageGo to next message
Eclipse UserFriend
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 12:50] by Moderator

Re: Tests [message #1413016 is a reply to message #1412086] Wed, 27 August 2014 11:18 Go to previous message
Eclipse UserFriend
thanks again Smile
Previous Topic:Multiple outline
Next Topic:Exported Scout application not working
Goto Forum:
  


Current Time: Wed Jul 23 06:24:29 EDT 2025

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

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

Back to the top