DBItest icon indicating copy to clipboard operation
DBItest copied to clipboard

What to do if a test fails

Open hadley opened this issue 2 years ago • 4 comments

It would be useful to provide some more concrete advice on what to do if a test fails or error. For example, when I see this error:

Error ('test-SQLServer.R:19:3'): DBItest[SQLServer]: Result: send_query_only_one_result_set

How do I go about finding the individual test code so I can run it line by line and understand what is happening.

hadley avatar Dec 09 '23 15:12 hadley

Can you run DBItest::test_some("send_query_only_one_result_set", dblog = FALSE) in your package?

krlmlr avatar Dec 09 '23 15:12 krlmlr

That's the sort of advice that you need to write somewhere.

hadley avatar Dec 09 '23 16:12 hadley

We have vignette("DBItest"), what is missing there?

krlmlr avatar Dec 21 '23 14:12 krlmlr

I'm really looking for a heading that says "When a test fails" that says:

  • How to run a single test
  • How to find the source code for that test

I guess that information is maybe currently present in the vignette, but it's currently rather buried. You want to make it as clear as possible because people will be visiting when a test fails and they just want to understand what's happening, not learn the full details of DBItest.

hadley avatar Dec 21 '23 14:12 hadley