Skip to main content



      Home
Home » Archived » Eclipse SmartHome » Running a single groovy test via maven
Running a single groovy test via maven [message #1698164] Thu, 11 June 2015 15:12 Go to next message
Eclipse UserFriend
Hi,

how can I run a single groovy test for ESM in maven?
Using
mvn integration-test
works for all tests but it takes a long time. I am looking for the fastest way to run a single test (or all tests of a single binding).

I tried
mvn -Dtest=HueLightHandlerOSGiTest integration-test
from the root directory, but then I get this error:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-surefire-plugin:0.20.0:test (default-test) on project org.eclipse.smarthome.config.core.test: No tests found. -> [Help 1]


Running
mvn integration-test
from the binding directory will give this error:
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: org.eclipse.smarthome.binding.hue.test 0.8.0.qualifier
[ERROR]   Missing requirement: org.eclipse.smarthome.binding.hue.test 0.8.0.qualifier requires 'bundle org.eclipse.smarthome.binding.hue 0.0.0' but it could not be found


What is the proper way?

Thanks, Dominic

[Updated on: Thu, 11 June 2015 15:13] by Moderator

Re: Running a single groovy test via maven [message #1698179 is a reply to message #1698164] Thu, 11 June 2015 16:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi Dominic,

I have no idea how tell tycho surefire to run just a single test. The documented "-Dtest" property seems not work - maybe because of groovy.

But it should be possible to run a partial build from each folder in the repository. I can run a successful build of the binding folder and also of the org.eclipse.smarthome.binding.hue.test project.

Here you see reactor summary:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Eclipse SmartHome Bindings ......................... SUCCESS [ 2.380 s]
[INFO] Eclipse SmartHome hue Binding ...................... SUCCESS [ 1.495 s]
[INFO] Eclipse SmartHome hue Binding Tests ................ SUCCESS [ 19.792 s]
[INFO] Eclipse SmartHome YahooWeather Binding ............. SUCCESS [ 0.238 s]
[INFO] Eclipse SmartHome WeMo Binding ..................... SUCCESS [ 0.240 s]
[INFO] Eclipse SmartHome LIFX Binding ..................... SUCCESS [ 0.243 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.661 s
[INFO] Finished at: 2015-06-11T22:50:28+02:00
[INFO] Final Memory: 76M/646M
[INFO] ------------------------------------------------------------------------

Did you call "mvn install" on the top level at least once before?

Regards

Dennis
Re: Running a single groovy test via maven [message #1698249 is a reply to message #1698179] Fri, 12 June 2015 09:40 Go to previous message
Eclipse UserFriend
Hello Dennis,

thanks for you advise! Appearently I hadn't called mvn install before. Now that I executed it, I can run the tests for a single bundle fine without errors!

Thanks,
Dominic
Previous Topic:Questions about Removing devices from Binding
Next Topic:Thing Type Channel
Goto Forum:
  


Current Time: Sat Jul 12 11:53:07 EDT 2025

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

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

Back to the top