[JIRA] (JENKINS-51702) Summarize history of same test case executed in different parallel splits

2 views
Skip to first unread message

christian.ciach@gmail.com (JIRA)

unread,
Jun 5, 2018, 5:55:01 AM6/5/18
to jenkinsc...@googlegroups.com
Christian Ciach updated an issue
 
Jenkins / Improvement JENKINS-51702
Summarize history of same test case executed in different parallel splits
Change By: Christian Ciach
I am using the Parallel Test Executor plugin, so my unit tests are splitted into splits executed in parallel on different nodes. This is a simplified part of my Jenkinsfile:

 

 
{code:java}
#!/usr/bin/env groovy

stage('Test') {
  def testSteps = [:]
  def splits = splitTests parallelism: count(env.NUMBER_EXECUTORS as int)
  for (int i = 0; i < splits.size(); i++) {
    def num = i
    def split = splits[num]
    testSteps["Test split${num}"] = {
      node('!master') {
        checkout scm
        writeFile file: ("test_exclusions.txt"), text: split.join("\n")
        sh './gradlew test'
        junit '**/build/test-results/**/TEST-*.xml'
      }
    }
  }
  parallel testSteps
}

{code}
 

We make heavy use of the test result history to see when the build first broke and who is responsible for that.

The issue I am facing is the fact, that the ID of the test result contains the name of the parallel execution step as the prefix, in this case "Test split2" for example. As a result, a broken test is shown in the history as "Test / Test split2 / my.package.MyTest.testStuff()".

This is nice in theory, but there is one issue: The history only shows me the history of a test case executed in this specific split. For example, it may be that  *"Test / Test split2 / my.package.MyTest.testStuff()"* is shown as broken with an age of 1, although it may be broken since multiple builds, just that this specific test case happened to be put into different splits before.

To summarize: *"Test / Test split2 / my.package.MyTest.testStuff()"* and *"Test / Test split3 / my.package.MyTest.testStuff()"* have separate histories, but I need to track their histories together.

 
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

christian.ciach@gmail.com (JIRA)

unread,
Jun 5, 2018, 5:55:02 AM6/5/18
to jenkinsc...@googlegroups.com
Christian Ciach updated an issue
Change By: Christian Ciach
Summary: Summary Summarize history of same test case executed in different parallel splits

christian.ciach@gmail.com (JIRA)

unread,
Jun 5, 2018, 5:56:01 AM6/5/18
to jenkinsc...@googlegroups.com
Christian Ciach updated an issue
I am using the Parallel Test Executor plugin, so my unit tests are splitted into splits executed in parallel on different nodes. This is a simplified part of my Jenkinsfile:

 
{code:java}
#!/usr/bin/env groovy

stage('Test') {
  def testSteps = [:]
  def splits = splitTests parallelism: count(env.NUMBER_EXECUTORS as int)
  for (int i = 0; i < splits.size(); i++) {
    def num = i
    def split = splits[num]
    testSteps["Test split${num}"] = {
      node('!master') {
        checkout scm
        writeFile file: ("test_exclusions.txt"), text: split.join("\n")
        sh './gradlew test'
        junit '**/build/test-results/**/TEST-*.xml'
      }
    }
  }
  parallel testSteps
}

{code}
 

We make heavy use of the test result history to see when the build first broke and who is responsible for that.

The issue I am facing is the fact , that the ID of the test result contains the name of the parallel execution step as the prefix, in this case "Test split2" for example. As a result, a broken test is shown in the history as "Test / Test split2 / my.package.MyTest.testStuff()".


This is nice in theory, but there is one issue: The history only shows me the history of a test case executed in this specific split. For example, it may be that  *"Test / Test split2 / my.package.MyTest.testStuff()"* is shown as broken with an age of 1, although it may be broken since multiple builds, just that this specific test case happened to be put into different splits before.

To summarize: *"Test / Test split2 / my.package.MyTest.testStuff()"* and *"Test / Test split3 / my.package.MyTest.testStuff()"* have separate histories, but I need to track their histories together.

 

nardew@gmail.com (JIRA)

unread,
Sep 9, 2019, 7:50:03 AM9/9/19
to jenkinsc...@googlegroups.com
A Ch commented on Improvement JENKINS-51702
 
Re: Summarize history of same test case executed in different parallel splits

I would like to vote for this request. Stage names/node names were made part of the test result key without any functional backward compatibility, anyone who is running tests on several nodes randomly is getting completely unusable history of test results since one time test is running on node A, second time on node B and plugin treats it as separate test records (so you cannot track evolution of test results between builds and so on).

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages