Uploaded image for project: 'Imaging'
  1. Imaging
  2. MGNLIMG-114

Tests should output test images in the target folder

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 3.2
    • None
    • None
    • None

      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.

        Acceptance criteria

              gjoseph Magnolia International
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD