Who is writing unit tests?

Just wondered if I’m the only one writing unit tests instead of the developers writing them & I mean coding them as well. Is that right?

That sounds a little odd. Even if you’re doing TDD, the disconnect/iteration time between writing code/writing tests seems like it’d be problematic . . .


Yes. It worries me. But it is quicker than UI testing. Trying to get focus on TDD and developers coding them.

I used to write unit tests when I worked in a scrum team - I was the test “expert” in the team but everyone else did some testing and I spent about a third of my time on development.
We got to a place where we considered tests right from UT up to full-system live testing together in a single test strategy.

However, when working in non-scrum teams with separate devs and testers, the split has usually been that unit tests are owned and written by the developers, as you need quite a lot of the dev context in order to understand the UT frameworks.


I’ve quietly started reviewing unit tests in PR and adding my 2 cents. I’m not at the stage of pairing yet, but I believe it’s a good place to be :slight_smile:

1 Like

Hello @caznew277 and Welcome!

In our project, developers are writing the unit tests and testers are providing feedback on them.


1 Like

I would definitely say a developer should write unit tests to test their own code. As a tester, I am concerned about the overall behaviour of the application, not an individual method/unit of code.
Devs should know their code works before merging it!

No reason why you can’t code review unit tests though.

1 Like

In our org, developers are writing up unit tests. However, the SDETs within our teams do provide feedback on said unit tests (ie. potential gotchas/edge cases that could be semi-catastrophic…ish).

If you feel confident in writing Unit tests then why not? The devs should be writing them also but if you can enhance your testing suite by moving UI tests down to that level or even reviewing and enhancing Unit coverage then this is all good. If you were the only person writing them then we have issues!