Uploaded image for project: 'Jalview'
  1. Jalview
  2. JAL-4682

Configure new gradle refactor so TestNG tests run properly in Eclipse IDE

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Ready for testing
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.12
    • Fix Version/s: None
    • Component/s: Dev and Dep, gradle, Test suite
    • Labels:
      None

      Description

      The new gradle upgrade and refactor (JAL-4644) has a more simplified (i.e. standard gradle) approach to placement of source and resources for both the main build and the test build/run.

      What the gradle java plugin does is run a task called "processTestResources" before running tests. By default this simply copies files from src/test/resources to build/resources/test and adds "build/resources/test" to the classpath.
      Hence there is now a test.Vars class that contains the paths to resource files, statically set (to "build/resources/main" and "build/resources/test").
      All references to test files in the tests have been changed to include these statically defined vars at the start of the path (and so they can be changed easily).

      However, Eclipse doesn't do that.
      Eclipse+buildship compiles classes into bin/main and bin/test and also copies the gradle specified resource srcDirs into those same directories (so classes and resources are mixed together). That means that the paths to files in test.Vars are not (necessarily) valid.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              soares Ben Soares
              Reporter:
              soares Ben Soares
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: