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

Include filtering by class name when splitting tests

      Starting with an scenario such as N test classes run:

      com.parallelizable.one (duration 10 mins)
      com.parallelizable.two (duration 10 mins)
      com.notparallelizable.one (duration 1 mins)
      com.notparallelizable.two (duration 1 mins)

      I am interested in parallelizing classes with packaging com.parallelizable, ending with an pseudo-pipeline such as:

      node {
      test (com.notparallelizable)
      splits = splitTests parallelism: 2
      parallel ( "one": test(splits[0].list.join('\n')),
      "two": test(splits[1].list.join('\n')))
      }

      My current workaround is filtering with grep:

      parallel ( "one": test(splits[0].list.grep(~/com.parallelizable.*/).join('\n')),
      "two": test(splits[1].list.grep(~/com.parallelizable.*/).join('\n')))

      but obviously, the resulting tests wont be ballanced in number of elements. I was thinking in filtering at the plugin level, so the returned groups would be properly ballanced.

      Im not sure if this improvement would be interesting for freestyle projects (i dont use them anymore), but for sure it will for pipelines.

          [JENKINS-39353] Include filtering by class name when splitting tests

          Javier Delgado created issue -
          Javier Delgado made changes -
          Assignee New: Javier Delgado [ witokondoria ]
          Jesse Glick made changes -
          Remote Link New: This issue links to "PR 24 (Web Link)" [ 17198 ]
          Jesse Glick made changes -
          Link New: This issue relates to JENKINS-27395 [ JENKINS-27395 ]
          Javier Delgado made changes -
          Resolution New: Won't Do [ 10001 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]

            witokondoria Javier Delgado
            witokondoria Javier Delgado
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: