You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 [email protected]: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
Due to gradle starting by default as daemon and many services configured guice singletons, configuration is read only on first gradle run. If these services are not explicitly reset, serenity configuration changes are ignored on subsequent gradle runs.
This commit fixesserenity-bdd#9. It instructs guice to recreate many of these services when they are requested instead of reusing them.
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 explicitly
clearReports
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.
The text was updated successfully, but these errors were encountered: