0 points

Who tests the tests

permalink
report
reply
0 points

Who tests the tests for the tests

permalink
report
parent
reply
0 points

Unfortunately, if anyone, I do.

permalink
report
parent
reply
0 points

I’ve written some tests that got complex enough that I also wrote tests for the logic within the tests.

permalink
report
parent
reply
0 points

We do that for some of the more complex business logic. We wrote libraries, which are used by our tests, and we wrote tests which test the library functions to ensure they provide correct results.

What always worries me is that WE came up with that. It wasn’t some higher up, or business unit, or anything. Only because we cared to do our job correctly. If we didn’t - nobody would. Nobody is watching the testers (in my experience).

permalink
report
parent
reply
0 points

This is why you write the test before the code. You write the test to make sure something fails, then you write the code to make it pass. Then you repeat this until all your behaviors are captured in code. It’s called TDD

But, full marks for writing tests in the first place

permalink
report
reply
0 points

That supposes to have a clear idea of what you’re going to code. Otherwise, it’s a lot of time wasted to constantly rewrite both the code and tests as you better understand how you’re going to solve the task while trying. I guess it works for very narrowed tasks rather than opened problems.

permalink
report
parent
reply
0 points
*

constantly rewrite both the code and tests as you better understand how you’re going to solve the task while trying

The tests should be decoupled from the “how” though. It’s obviously not possible to completely decouple them, but if you’re “constantly” rewriting, something is going wrong.

Brilliant talk on that topic (with slight audio problems): https://www.youtube.com/watch?v=EZ05e7EMOLM

permalink
report
parent
reply
0 points

And then in the end we realize the most important thing was the tests we wrote along the way.

permalink
report
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 6.8K

    Monthly active users

  • 800

    Posts

  • 7.4K

    Comments

Community moderators