Hire yourself as a tester
Tags: testing, codequality
Published: 2021-02-21 13:24:57

---
title: Hire yourself as a tester
published: true
description: Testing your own code is hard. Taking a part time job as a tester is making you a better developer.
tags: testing, quality
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g5mk2iw0wk2mkwwykb4s.jpg
---

About a year ago I was a tester and I was keen to get back into development role full time. My employer gave me an amazing opportunity to change my role in the same team. It was exciting to write code again after years away from coding full time. My code even passed code review and QA. I deployed the ticket to production and checked that deployment went ok. Everything seemed fine.

### But then someone outside of our team reported a bug. It did not take long before I found myself rolling back my latest commit.


I could not believe that I have not picked up this bug during development. After all, I used to be a good tester. Developer bias was overtaking me.
 
It feels like testing and development are very different roles. But they are not as opposite as it seems at first. Role of a tester is to explore the system with the aim of finding faults, that the end user may encounter. Testers need to get in shoes of the end user and break the software. My main goal as a developer is to write readable code that works, passes linters and scores 100% in unit tests. I am doing everything to get my code to work and easy to maintain. I am thinking about possible ways it could go wrong (e.g. exceptions handling), but my goal is to make it work. I am optimistic my code will work. Tester thinks opposite - I am doing everything to break software. I know that there are bugs, I just have not found them yet. I am pessimistic. 
 
I kicked myself for missing that bug. I even created a checklist to follow after completion of each ticket. And I failed in following that checklist too. 

###It was too tedious to go through that checklist, so I never did.
 
Something was not right. Why is there such a big movement of transitioning to team-based testing? Can developers test their own work? And as a tester, I loved the idea of spreading QA across the team. After all it moved the responsibility of quality from one tester to the whole team. I also had time to get in front of developers and prevent bugs, instead of finding bugs later.
 
My current team does team-based testing most of the time.  Over the last year I have been on a journey to become a better tester in a developer role.
 
I found a strange technique that works.


### Hire yourself as a tester.


Turns out developers are amazing at testing. Because we know the system under test like no other. We care about quality. We are good at thinking of possible scenarios that might break the code. And we can automate most of testing scenarios to avoid retesting the same thing over and over. Hiring yourself as a tester helps avoid developer bias. It converts you from an optimistic developer to a pessimistic developer at the right time. You can also take testing mindset earlier into the project lifecycle. Think about quality at design stage to create testable resilient architecture.
 
Someone else on your team should still test your ticket. It is always good to get more than one pair of eyes before releasing something to production. Your developer testing will improve from this mindset. And others will pick less bugs in you code.
 
Hiring yourself as a different role seems crazy though. So I checked with phycology, philosophy and habits creation. 
 
Creating an identity first will set you on a path of getting into a habit. Your desire to be someone now or in the future drives your actions now. Based on the [Recipe of Sustained Success](https://jamesclear.com/identity-based-habits) by James Clear here is how to improve quality of your code:
 
* Decide that you want to be a good tester.
* Prove it to yourself with small wins.

Small wins part is an important one. Start with 5 minutes testing your ticket, before you move it to the next column on your board. Then next week increate it to 6 minutes, or 10. Whatever feels like a sustainable pace. It is important not not push yourself too hard.

Self-distancing can also be a good tactic to improve. [Researchers](https://experts.umn.edu/en/publications/what-would-batman-do-self-distancing-improves-executive-function-) got a group of children for an experiment. While playing with kids, researchers taught them to self-distance with various methods. One of those methods was asking this silly question:
 
> What would batman do?
 
And they noticed that those kids have improved their executive skills. Skills that help with managing everyday life.
 
You too can ask yourself this question... If you can imagine Batman being an awesome developer or a superb tester.
 
It could be a developer you look up to, Maurice Moss for example.



Hiring yourself as a tester is not such a crazy idea after all. 

### Our brain is a complex organ, but like anything, it has bugs. 

Tricking your brain into thinking that you have a part time job as a tester makes you a better developer.