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

Tests should output test images in the target folder

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 3.2
    • 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

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD