Bad Tests Good Tests

Of course, I know that you, dear Reader, write only perfect tests! Yes, I know you do! But maybe you have some not-so-smart colleagues that write ugly test code? If so send me their ugly test code please!

HELP!

I'm looking for interesting cases that would be worth mentioning in the next editions of the book.

I need examples of test code, that doesn't really work as it should.

P.S. I give the book for free, as my gift to the devs community. That is why I'm asking you for help!

What exactly am I looking for?

I need flawed tests. They can verify something else than their name says (or nothing at all). They can take too long to execute. They can exist only to bump up the coverage metrics. They can be too damn long to understand it, or be a nightmare to maintain. They can be so complicated, that they beg to be tested!

There are no technologies or tools constraints. Different languages (Java, Python, JS, ...), different frameworks (JUnit, Mockito, Spock, PyTest, Jasmine, Karma, ...), different types (unit, integration, e2e, ...).

The most important requirement is that it really happened: that you share some real code, and NOT some hypothetical construct!

Another book, perhaps?

Practical Unit Testing with JUnit and Mockito Practical Unit Testing with TestNG and MockitoBad Tests, Good Tests

Kanban For Your Team 1,2,3 KANBAN - polish version / wersja polska Złe testy, dobre testy