Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58931

move the `InjectedTest` out to a separate dependency

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Surefire has a way to scan dependencies for Tests in order to execute.

      This sounds like a good thing to replace the `InjectedTest` with (and move to junit4 at the same time).

      http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#dependenciesToScan

       

        Attachments

          Activity

          Hide
          jglick Jesse Glick added a comment -

          Not sure that is a great idea. In giant PCT-like results, it is sometimes hard to track which injected test you are looking at. Maybe better to generate a test with a unique name based on the plugin id.

          Show
          jglick Jesse Glick added a comment - Not sure that is a great idea. In giant PCT-like results, it is sometimes hard to track which injected test you are looking at. Maybe better to generate a test with a unique name based on the plugin id.
          Hide
          teilo James Nord added a comment -

          Is that issue not addressed by running each plugin in its own stage (named by the plugin?) At least when running in CI which is where I expect most bulk running of PCT/plugin builds to be where this matters.

          I recall there is a different issue for making the test name include the plugin id

          Show
          teilo James Nord added a comment - Is that issue not addressed by running each plugin in its own stage (named by the plugin?) At least when running in CI which is where I expect most bulk running of PCT/plugin builds to be where this matters. I recall there is a different issue for making the test name include the plugin id
          Hide
          jglick Jesse Glick added a comment -

          Yes, of course using named stages helps. Still, if it is easy to make the test self-describing, that seems preferable.

          Another issue with the current (JUnit 3-based) hack is that the source is named InjectedTest yet the actual suite created at runtime is named PluginAutomaticTestBuilder, which is kind of confusing. I would propose keeping the test injection mojo but having it generate something more like

          @org.junit.runner.RunWith(org.jvnet.hudson.test.InjectedTestRunner)
          @org.jvnet.hudson.test.InjectedTest(artifactId="my-tool", …)
          public class MyToolInjectedTest {}
          
          Show
          jglick Jesse Glick added a comment - Yes, of course using named stages helps. Still, if it is easy to make the test self-describing, that seems preferable. Another issue with the current (JUnit 3-based) hack is that the source is named InjectedTest yet the actual suite created at runtime is named PluginAutomaticTestBuilder , which is kind of confusing. I would propose keeping the test injection mojo but having it generate something more like @org.junit.runner.RunWith(org.jvnet.hudson.test.InjectedTestRunner) @org.jvnet.hudson.test.InjectedTest(artifactId= "my-tool" , …) public class MyToolInjectedTest {}

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            teilo James Nord
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: