Environment variables are read only during first gradle run. Subsequent runs ignore changes.
Steps to reproduce
(I've omitted superfluous output and used ellipsis ... to shorten output)
(I'm invoking explicitly clearReports and aggregate to avoid distractions due to a fixed plugin issue)
Make sure you have a working test set and a valid serenity configuration, and that no gradle daemon is running:
$ git clone git@github.com:serenity-bdd/serenity-junit-starter.git
Cloning into 'serenity-junit-starter'...
...
$ cd serenity-junit-starter/
$ git checkout 5d5b01a
...
HEAD is now at 5d5b01a Merge pull request #26 from mariagomgod/master
$ ./gradlew --stop
This should generate valid reports:
$ ./gradlew clean clearReports test aggregate
...
BUILD SUCCESSFUL in 25s
6 actionable tasks: 5 executed, 1 up-to-date
Description
Environment variables are read only during first gradle run. Subsequent runs ignore changes.
Steps to reproduce
(I've omitted superfluous output and used ellipsis
...
to shorten output) (I'm invoking explicitlyclearReports
andaggregate
to avoid distractions due to a fixed plugin issue)Make sure you have a working test set and a valid serenity configuration, and that no gradle daemon is running:
This should generate valid reports:
Features
should appear inindex.html
3 times:Kill all gradle daemons
Change
serenity.test.root
to something invalid and create reportsWhen broken,
Features
is not present inindex.html
(this is expected)Set
serenity.test.root
back to its correct value and create reports againFeatures
should appear in index.html 3 times. These reports are broken! (unexpected)Create reports outside the gradle daemon
These reports looks OK (expected):
Analysis
Since gradle 3.0+ is the gradle daemon enabled by default (see https://docs.gradle.org/3.0/release-notes.html#improved-gradle-daemon,-now-enabled-by-default), and the plugin is run inside gradle's jvm. Unfortunately the configuration is created by guice as singleton only during first run and subsequent invocations of the plugin reuse the configuration.