Details

    • Type: Improvement
    • Status: In Review (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: jenkins-test-harness
    • Labels:
      None
    • Environment:
      jenkins-2.14
    • Similar Issues:

      Description

      @LocalData decides the directory use in the following way:

      1. # /package/class/methodname
      2. /package/class

      So the data is usable from only one test cases or all test cases (with @LocalData) in a test.

      However, it's often the case that one wants to use data from multiple test cases,
      but not all test cases.

      It's great if one can specify the directory name with @LocalData like

      public class Test {
          @Rule public JenkinsRule j = new JenkinsRule();
      
          @Test
          @LocalData("config1")
          public void config1_test1() throws Exception {...}
      
          @Test
          @LocalData("config1")
          public void config1_test2() throws Exception {...}
      
          @Test
          @LocalData("config2")
          public void config2_test1() throws Exception {...}
      }
      

        Attachments

          Activity

          ikedam ikedam created issue -
          ikedam ikedam made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          Show
          ikedam ikedam added a comment - https://github.com/jenkinsci/jenkins-test-harness/pull/36
          ikedam ikedam made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: ikedam
          Path:
          src/main/java/org/jvnet/hudson/test/HudsonHomeLoader.java
          src/main/java/org/jvnet/hudson/test/recipes/LocalData.java
          src/test/java/org/jvnet/hudson/test/recipes/LocalDataTest.java
          src/test/resources/org/jvnet/hudson/test/recipes/LocalDataTest/methodData/config.xml
          http://jenkins-ci.org/commit/jenkins-test-harness/6cd95132487a1188f1adcffb8aaea6990e75c5c6
          Log:
          [FIXED JENKINS-38306] Add a parameter to LocalData and use that instead of method name

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/org/jvnet/hudson/test/HudsonHomeLoader.java src/main/java/org/jvnet/hudson/test/recipes/LocalData.java src/test/java/org/jvnet/hudson/test/recipes/LocalDataTest.java src/test/resources/org/jvnet/hudson/test/recipes/LocalDataTest/methodData/config.xml http://jenkins-ci.org/commit/jenkins-test-harness/6cd95132487a1188f1adcffb8aaea6990e75c5c6 Log: [FIXED JENKINS-38306] Add a parameter to LocalData and use that instead of method name

            People

            • Assignee:
              ikedam ikedam
              Reporter:
              ikedam ikedam
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: