0

I have some integration tests that use Selenium and the HtmlUnitDriver to verify my web app behaves correctly from the browser. In IntelliJ, I'm able to run ./gradlew bootRun to start my embedded web server, and then run my Selenium tests manually.

The tests run as expected.

However, I'm wondering what the best strategy is to run these in an automated fashion on my CI Server (TeamCity in this case). Simply running bootRun doesn't quite work since the task runs until it gets terminated.

Should I create a script that runs bootRun, and then I can terminate gradle somehow after the tests complete? I'd also like to use my application.properties file I have in src/test/resources instead of src/main/resources which bootRun uses normally.

Stealth Rabbi
  • 10,156
  • 22
  • 100
  • 176
  • Have you considered going through [this](https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-testing-spring-boot-applications) and also referred to [this](https://stackoverflow.com/questions/45591160/use-one-spring-boot-context-through-all-springboottests) stackover post ? – Krishnan Mahadevan Sep 25 '17 at 06:55
  • What you've posted is for running regular unit tests in a spring context. I am attempting to use selenium to run my full web application and test it via the browser. – Stealth Rabbi Sep 26 '17 at 16:24

0 Answers0