[MGNLIMG-114] Tests should output test images in the target folder Created: 09/Jul/13 Updated: 09/Apr/15 Resolved: 13/Mar/15 |
|
| Status: | Closed |
| Project: | Imaging |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 3.2 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Magnolia International | Assignee: | Magnolia International |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Template: |
|
||||||||||||||||
| Acceptance criteria: |
Empty
|
||||||||||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||||||||||
| Date of First Response: | |||||||||||||||||
| Description |
|
<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. |
| Comments |
| Comment by Magnolia International [ 13/Mar/15 ] |
|
Oh you're right, I forgot I even wrote this |
| Comment by Magnolia International [ 13/Mar/15 ] |
|
Additionally, I just implemented the "Tests should ensure they don't overwrite the output of another test." bit, which I had also forgotten in my first commit. |
| Comment by Magnolia International [ 13/Mar/15 ] |
|
This breaks completely when we use the enable-clover profile; clover executes the test a second time, so a bunch of files still exist (those which are created with ignoring the KEEP_GENERATED_FILES_FOR_INSPECTION flag, see |
| Comment by Magnolia International [ 13/Mar/15 ] |
|
Now both write() and newOutputFile() methods check the KEEP_GENERATED_FILES_FOR_INSPECTION flag consistently. Partly fixes |