Reputation: 2325
I have a bunch of acceptance tests that need the application to be running. It all works fine when I test from command line (thanks to some gradle magic) but I would like to be able to run these tests from IntelliJ IDEA without worrying about starting up Jetty.
Is there any clever way to achieve that automation? I do not even know where to begin.
Thank you very much.
Upvotes: 2
Views: 431
Reputation: 944
For testing purposes it's generally a good idea to use jetty embedded. That way you can fully automate start/stop of jetty and it will work completely independent from build tools/ide.
It's really simple. With few lines of code you have a full featured jetty configured and running for testing.
This is one of the most beloved features of jetty. Have a look at this: http://www.eclipse.org/jetty/documentation/current/advanced-embedding.html
Upvotes: 1
Reputation: 402235
You can do it with Maven/Ant, other Run configurations, but not Gradle at the moment, at least until this feature request is implemented.
Upvotes: 1