testthat icon indicating copy to clipboard operation
testthat copied to clipboard

Record skips

Open krlmlr opened this issue 5 years ago • 1 comments

Another idea would be to store the save the skips in a separate file — then we'd display a message showing how to find it. The advantage of a separate file would be that you could (if you wanted) check it into git, which would make it easier to see if the skips changed significantly in your development environment.

A skip file is brittle if it contains line number information. It should be safe if the skip file only refers to the tests by name.

The skip file bears so much similarity with snapshot tests, I wonder if we can somehow use the mechanics of snapshot testing here.

Follow-up to #1209.

krlmlr avatar Dec 04 '20 05:12 krlmlr

Some more ideas:

  • Skips could be recorded with their traceback in a binary file, similarly to testthat_problems.rds, with instruction printed how to extract them
  • The skip summary should provide enough context to locate the source of the skip: https://github.com/r-lib/testthat/pull/1209#issuecomment-738579887. Perhaps it's sufficient to record the skip summary?

krlmlr avatar Dec 11 '20 22:12 krlmlr

I think the state of skips is much better now than it was 3 years ago so I'm going to close this issue. We still don't have a great way to check if the skips have changed between runs, but I think that's starting to get out of scope for testthat since it will need some way of saving data on CI platforms.

hadley avatar Aug 04 '23 18:08 hadley