1

I have a Jenkins pipeline build that reports on cucumber tests using the "CucumberReportPublisher". When I delete tests or refactor a whole feature, many times the old tests hang around in the jenkins test report, showing as "skipped".

Is there a way to make Jenkins/CucmberReportPublisher forget about these old tests and stop reporting them as skipped?

hack_on
  • 2,532
  • 4
  • 26
  • 30

1 Answers1

2

It sounds like you don't have a clean environment when you build your project.

I would make sure that Jenkins deleted the work space for the job and checked out the entire project from scratch for every build. I don't have a Jenkins to look at here, but there are different checkout options available for the job near the version control settings. Choose one that deletes the work space before checkout.

Another option can be to clean as the first step in your build. Assuming that you use Maven, it could look like this

mvn clean deploy

This may solve your problem with ghost tests hanging around after deletion. But it may not solve your problem with a dirty work space.

Thomas Sundberg
  • 4,098
  • 3
  • 18
  • 25
  • Yup, I was already doing a clean deploy, but now I got deleteDir() from here http://stackoverflow.com/questions/37468455/jenkins-pipeline-wipe-out-workspace and called it before checking out and did that it. Thanks. – hack_on Mar 31 '17 at 06:02