
It is helpful for a tester to be able to program as it enables a tester to get a better understanding of the application they are testing. Being able to code also helps create test data, automate tests and build a better relationship with developers.
But which programming language(s) should a tester learn? Over the last year or so I have learned some javascript. This has helped me work with front end developers, automate tests and create test data. To help backend developers I used Node.js to automate tests for the API, but was this the best thing to do?
Javascript is used by frontend developers. If I want to support developers I should use the programming language that they use and not use Node.js. Our backend developers use golang and for this reason I have started to learn golang. I am using the go track on exorcism.org to learn golang. Exercism is free, and I like its style of learning. As an exercism.org student you write solutions to exercises, and the exercise passes if the tests for the exercise passes. It is sort of TDD style learning! You can also ask exercism.org for a mentor.
I have also created PR’s for my solutions to the exercises and got feedback from backend developers on the golang code that I have written. This has been really useful as it shifts my perspective from just getting the solution to the exercise to pass the tests to a perspective of trying to write good code.
Other free tools that are helping me to learn golang are:
- The Go Playground where you can write, format and run go code
- Go by Example which is an introduction to golang that contains lots of useful examples
- Visual Code which I am using as my IDE
- Getting started with VS Code Go this video helps you get started with Visual Code
- Go tools in Visual Code which gives you a range of tools including auto complete
Golang is quite different to javascript as it is a compiled language that is statically typed, and I am learning how these differences affect developing code. Learning golang is expanding my technical knowledge and is beginning to help me to work with backend developers.
Learning golang will also enable me to read the code that I am testing and pinpoint where in the code a bug is occurring.
It is great that where I work gives me time and support to learn new skills.
Being able to code in javascript has helped me as a tester, being able to code in golang will help me too when I work with backend developers to test API’s and create test data.