Im planning to execute some automated UI tests against a Java Play app built using sbt in CI.
This is basically what I'm doing at the moment:
sbt clean compile
sbt run
cd "my tests module"
sbt test
The issue is that as soon as the server start, it stops immediately (possibly because it's not detecting any input in CI?). The Logs look something lie this:
$ sbt run
Picked up _JAVA_OPTIONS: -Duser.home=/builds/***
[info] Loading project definition from /builds***
[info] Set current project to insights (in build file:/builds/***)
> ***@0.1.0 watch /builds/***
> node node_modules/webpack/bin/webpack.js -w
--- (Running the application, auto-reloading is enabled) ---
clean-webpack-plugin: /builds/***javascripts has been
removed.
clean-webpack-plugin: /builds/***stylesheets has been
removed.
[info] p.c.s.NettyServer - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
(Server started, use Ctrl+D to stop and go back to the console...)
[info] p.c.s.NettyServer - Stopping server...**
[success] Total time: 6 s, completed Feb 9, 2021 3:43:35 AM
Obviously the tests fail since the UI is not even loaded by that time. I've also tried writing the logs to a file to watch for the text "Server started" so I can run the tests then, but it still doesn't like it. (IO Exception)
Is there a solution for this?
Aucun commentaire:
Enregistrer un commentaire