9

How do I clear old tests from the tests page in Sauce Labs?

I've got allot of noise on there from trying out stuff and I'd like to tidy it up.

In the long run there will be lots of uninteresting builds, I'd like to be able to archive\remove them so that it isn't difficult to find the significant test runs.

BanksySan
  • 24,077
  • 27
  • 94
  • 189

3 Answers3

4

This is currently not possible in Saucelabs. See this forum post for reference: http://support.saucelabs.com/entries/23076777-I-to-delete-seesions-

these jobs stay in your account indefinitely, as we've found that users prefer to maintain the records for future reference (for example, in case something starts failing in the future that previously passed).

UPDATE In the meantime they made it possible to delete jobs and resources through their REST API: https://docs.saucelabs.com/reference/rest-api/#delete-job

toubsen
  • 179
  • 11
  • 4
    The argument that "we've found that users prefer to maintain the records for future reference" is just disingenuous. There's tons of reasons why users may not want to have their jobs stored indefinitely: clutter, organization, relevancy, security, confidentiality, etc. Can't understand why they don't let their paid customers delete old jobs. It's just so obvious and important. – Gui Ambros Dec 28 '13 at 16:01
  • 1
    I agree. We'd like to delete a number of jobs that are using an old build numbering format, that is messing up the ordering. Saucelabs - could you let us delete unwanted jobs? And that's coming from another paid user. – Zac Jan 09 '14 at 10:36
4

To quickly delete all your old SauceLabs jobs, you can use this command-line recipe:

SUN=$SAUCE_USERNAME; SAK=$SAUCE_ACCESS_KEY
curl -u $SUN:$SAK https://saucelabs.com/rest/v1/$SUN/jobs?format=csv \
  | perl -wpe 's/\r$//' \
  | xargs -I{} curl -u $SUN:$SAK -X DELETE "https://saucelabs.com/rest/v1/$SUN/jobs/{}"
Knu
  • 14,012
  • 5
  • 54
  • 86
Lucas Cimon
  • 1,636
  • 1
  • 20
  • 26
2

Sauce Labs has recently (Spring 2014) added the capability to delete tests manually. If you go on the test details page, you'll see a big red button labeled "Delete" on the right side of the screen. Clicking it will delete the test.

There's a feature request in to allow you to delete multiple tests at the same time.

Louis
  • 128,628
  • 25
  • 249
  • 295