Details
-
Improvement
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
None
Description
MGNLIMG-100 introduced a test that accidentally wrote test images in src/test/resources. Those images have been accidentally committed to the Git repository.
A lot of tests have (since forever) written images in the root folder of the project, which isn't great either.
We could configure the project as such
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<imagesOutputDir>${project.build.directory}/test-images</imagesOutputDir>
</systemPropertyVariables>
</configuration>
</plugin>
Tests should ensure this property is set and fail early if it isn't, or fallback on some default. Tests should ensure they don't overwrite the output of another test. A utility method could be provided to return this directory to a test class/method, suffixed with the test name, for example.
Checklists
Attachments
Issue Links
- caused by
-
MGNLIMG-100 Loading image from JCR using AbstractLoader will result in adding the alpha value as a color to generated JPGs
-
- Closed
-
- is related to
-
MGNLIMG-152 Consistency in how test images are generated, stored and kept (or not) for inspection
-
- Closed
-