Using the JUnitFlakyTestDataPublisher throws an AbstractMethodError “you must override contributeTestData”

允我心安 提交于 2020-05-30 06:31:25

问题


I try to use the rerunFailingTestsCount option to deal with flaky tests. In order to display these in the junit results, I use the flaky test handler plugin which would theoretically deal with displaying flaky tests

In my jenkins file this looks like

pipeline {    
  stages {
    stage('tests') {
      steps{
        // sh mvn verify here
      }

      post { 
        always {
          junit testResults: 'target/failsafe-reports/**/*.xml', testDataPublishers: [[$class:
            'JUnitFlakyTestDataPublisher']]
        } 
      }
    }
  }
}

the test run fine, flaky ones are repeated but when it comes to publishing the junit results, i get an

Error when executing always post condition: java.lang.AbstractMethodError: you must override contributeTestData

Google wasn't very helpful, maybe someone here had the same problem and can help me or at least can confirm that this plugin works as pipeline script (there is a pull request regarding pipeline support, so I am not sure...)

来源:https://stackoverflow.com/questions/55402391/using-the-junitflakytestdatapublisher-throws-an-abstractmethoderror-you-must-ov

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!