Closed kpiwko closed 9 years ago
it is not a bug per se.
The file where report will be written consists of two properties.
The first one is called file
and it defaults to this (1). The second one is called rootDir
and it is by default set to target
.
The final path of the file is then the concatenation of these two: new File(rootDir, file).
If the gradle build fails because it fails to find target
, just set rootDir
in arquillian.xml
to the value which signifies the already existing directory.
The creation of the directory when it does not exist is implemented, however the reason it was no created is that if you do not specify reporter
extension in arquillian.xml
, the creation of the non-existing rootDir happens in validate() method here (3) but that one will never be called when you do not set reporter
extension qualifier in arquillian.xml
.
I have already repaired it in (4). This means new recorder has to be released as well.
(1) https://github.com/arquillian/arquillian-recorder/blob/master/arquillian-recorder-reporter/arquillian-recorder-reporter-api/src/main/java/org/arquillian/recorder/reporter/ReporterConfiguration.java#L52 (2) https://github.com/arquillian/arquillian-recorder/blob/master/arquillian-recorder-reporter/arquillian-recorder-reporter-api/src/main/java/org/arquillian/recorder/reporter/ReporterConfiguration.java#L234-L253 (3) https://github.com/arquillian/arquillian-recorder/blob/master/arquillian-recorder-reporter/arquillian-recorder-reporter-impl/src/main/java/org/arquillian/recorder/reporter/configuration/ReporterConfigurator.java#L68 (4) https://github.com/arquillian/arquillian-recorder/commit/fe28bc65f982ca0173bf01fbd1796c32af2b2995
Tests will fail if
target
directory is not present. This breaks functionality when invoked via Gradle.The value should not be hardcoded but flexible. Directory should be created if it does not exist.