Charlie Yen
Charlie Yen

Reputation: 131

Is there a way to define "number of builds" for JUnit test results in Jenkins?

I am learning Jenkins. I just configured it to publish JUnit test results. Now it keeps accumulating all previous results in the plot. Please refer to the attached screen, which contains 20+ builds.

I am wondering whether I can configure it to only display last 10 builds?

Thanks.enter image description here

Upvotes: 5

Views: 3370

Answers (3)

R. Oosterholt
R. Oosterholt

Reputation: 8090

I found a work-around which we found to be an acceptable solution:

You can install Dashboard View plugin.

Follow these steps:

  • create a new view of type Dashboard
  • select the job(s) of which you want to display the test result chart
  • click on the button Add Dashboard Portlet to the top of the view
  • choose Test Trend Chart
  • configure the desired Number of (latest) days to display
  • save the view

On the newly created/configured view you now have a test results charts with your desired number of builds.

Upvotes: 0

dkatzel
dkatzel

Reputation: 31648

I don't think you can change the number of builds shown for the built in test result trend graph.

If you have other plug-ins that have trend graphs you can see most of them have a link under the graph to "Configure" it which you can set the number of builds to use etc, but I don't see one for the test graph so I think you are stuck using the number of builds in your build history.

Upvotes: 0

Charlie Yen
Charlie Yen

Reputation: 131

I just found out two ways to handle this issue by removing old build history.

1) Refer to answers to this thread: How do I clear my Jenkins/Hudson build history?

2) In config page, you can set number of builds & artifacts you want to keep. Please refer to the screen shot attached.

enter image description here

Upvotes: 1

Related Questions