5

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

Charlie Yen
  • 131
  • 3
  • 10
  • Do you just want to restrict the number of builds in the graph? or the number of builds in your build history? – dkatzel Jan 06 '14 at 20:13
  • to dkatzel, I just figured it out how to clean up the old history: http://stackoverflow.com/questions/3410141/how-do-i-clear-my-hudson-build-history. But I don't how to restrict the number of builds in the graph. Would you please show me how? Thanks. – Charlie Yen Jan 07 '14 at 15:40

3 Answers3

1

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

Community
  • 1
  • 1
Charlie Yen
  • 131
  • 3
  • 10
0

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.

dkatzel
  • 31,188
  • 3
  • 63
  • 67
0

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.

R. Oosterholt
  • 7,720
  • 2
  • 53
  • 77