My system 1 thinking says “no”. I’ve often heard separation of duties makes testers valuable.
Let’s explore this.
A programmer and a tester are both working on a feature requiring a complex data pull. The tester knows SQL and the business data better than the programmer.
If Testers Write Source Code:
The tester writes the query and hands it to the programmer. Two weeks later, as part of the “testing phase”, the tester tests the query (they wrote themselves) and finds 0 bugs. Is anything dysfunctional about that?
If Testers do NOT Write Source Code:
The programmer struggles but manages to cobble some SQL together. In parallel, the tester writes their own SQL and puts it in an automated check. During the “testing phase”, the tester compares the results of their SQL with that of the programmer’s and finds 10 bugs. Is anything dysfunctional about that?