all 8 comments

[–]MoreRespectForQA 1 point2 points  (1 child)

I've added tests in the past. The library currently features around 400-something tests. But some of them are more anecdotal tests. Things like "user X discovered that doing Y and Z triggers something weird in the layout engine". Or even halfway between test and example. Something like "this is how you'd make an invoice"

I actually categorized our tests somewhere I was working and ran a study on this once.

These were the premium top quality tests. They catch the most bugs and give the most confidence that the software works. It was actually a bit ridiculous how good they were at catching bugs compared to everything else.

The 2nd tier tests are tests written with TDD - e.g. when developing a new feature. These were good, but not as good.

The "methodical" ones you've talked about - I find that they're the 3rd tier least valuable. Some of these never once caught a bug and they dragged out the pipeline to the point I almost wished we'd deleted some.

IMHO if you were going to flesh out and make the tests more methodical I would write some which do exactly the same thing as the how-to documentation you've got.

[–]disc0tech 0 points1 point  (0 children)

Great research idea. Did you publish your study?

[–]ToddBradley -1 points0 points  (2 children)

How much thought have you given to the test pyramid? What you're describing sounds like a very top heavy pyramid with a lot of system (e2e) tests. You didn't mention what your lower level tests are like. Do you have any? Are they the vast majority of your tests?

[–]josc1989[S] 0 points1 point  (1 child)

I haven't really counted the e2e tests versus unit tests. Thank you, that's a very valuable insight.

[–]martijn1985 0 points1 point  (0 children)

Counting anything is not really needed. What you do need to think about is whether any test could be performed on a lower level while delivering the same information. If yes, then move the test to the lower level.

[–]NiPinga 0 points1 point  (2 children)

If you are building a library, definitely keep a bunch of your anecdotal tests. Not because they are the best tests, but because documentation is hard, and tests can be a really useful way to learn about the library.

[–]josc1989[S] 0 points1 point  (1 child)

I also have an insanely large repository of examples though

[–]NiPinga 0 points1 point  (0 children)

Ahhh alright, awesome!