If you're a tester who wants to get up to speed on coding to become a test automation engineer, don't just start learning to code; start by learning about source control, a methodology for tracking and managing changes to your code.
In my recent past, testers at one particular organisation I worked with were busy creating test automation and even tools to manage test data and application state. All the application code was in source control but none of the code written by the testers was in source control. It was zipped and emailed, copied to shared file servers, sent by instant message to name a few sharing mechanisms. Versions diverged wildly, valuable code was lost or overwritten leading to delayed testing, panic rewrites of tools, all round disarray!
Without source control, software developments teams will essentially be in a state of chaos, terrified of code change. I often meet testers without access to their teams source control repository. If this describe you as a tester, you won't be truly closely collaborating with your team.
To bridge that gap, here's what you need to know about source control -- and how to get started. This article will cover:
- Key disadvantages to you as a tester when you cannot access or use source control repositories and tools.
- How a grounding in source control will help you to acquire the skills you need to grow as an automation engineer.
- Important learning resources to complement your on the job experience with source control.
Disadvantages of Being Source Control UnawareThere are a few key disadvantages you will find yourself as a tester if you don't have access to your team's source control repository and you don't appreciate what happens within:
- Primary source of collaboration - a lot of communication and collaboration happens within source control and it contains a compelling version of your system and your teams history. There are a number of artifacts that teams collaborate around, usually some form of issue tracking software, a shared wiki page but in my experience these are the least active. The truly active oracle for change is the code itself, where the most collaborative work is taking place, during code reviews and merges.
- Serious risks - if you don't know what your teams source control strategy is, you might be missing out on serious risks. Long lived feature branches might indicate integration problems later down the line. When there is an issue on your kanban board for a while, there might also be feature branch that has been alive just as long and depending on your release cadence further away from your master branch. As a result code merges might be longer and more difficult, even leading to re-implementing sections of code.
- Quality advocacy - as testers, we want to be strong advocates for quality. Effective use of source control is one of the key leading indicators of quality, not just for code, for configuration as well. Advocating for more effective use of source control can help our teams achieve better quality outcomes especially in safety and speed of deployments. We can advocate for smaller batch sizes for shorter lived branches, application configuration in source control, even encouraging storing database schema changes too.
- Early testing - often testers wait around for a build. Waiting for someone to complete a merge and deploy onto a test environment. Imagine being able to test the branch that has been created for your new feature straight away? If you were able to run an application locally or build to an environment from a branch you could test earlier, creating a tighter feedback loop with your team and wider group of stakeholders.
Source Control as Skills GatewayLearning source control concepts and skills are a gateway to the other technical skills that are valuable for test automation engineers to learn:
- Bash - although user interfaces exist for popular source control technologies you will likely be exposed to interactions using the command line, which is where a lot of developers and system administrators on your team spend their time. This then opens the door to bash for UNIX users, with its many commands for teasing out information. Check out Julia Evans Wizard Zines for more.
- Establishing coding habits - if you have access to your application code, you can see the patterns for the code within and learn from them in your own code. Positive behaviours such as striving for single responsibility, appropriate levels of reusability and sensible abstraction between implementation and test are worth looking out for and adding to your coding toolkit. The opposite is also true, where you can learn from the bad examples within your application code!
- Pipeline integration - without source control, any test automation that you create will be difficult to integrate with your deployment pipeline tooling, where it can add massive post deployment value. Tools such as Jenkins have built in source control integration enabling you to get your test automation code running where it matters, with the experience of adding to your team's pipeline.
Sources of InspirationMy journey into the world of source control began with 'The Git Parable' by Tom Preston-Werner. I learn a great deal from story telling as a medium and parable is no different, teaching concepts with reference to characters and situations that resonate with me. If I was to pick a starting point, try this:
However, each has their own learning style (or more likely mix of styles) so here's some next steps, depending on how you like to consume learning material:
- If you prefer to read, try Pro Git by Scott Chacon and Ben Straub - https://git-scm.com/book/en/v2
- If getting hands on is your thing try Git-it, providing a transition to using the command line - https://github.com/jlord/git-it-electron
- If you are a podcast fan - https://www.allthingsgit.com/
- There are many video courses, try here first, bite-size and assume very little previous knowledge. - https://git-scm.com/videos
SummaryLearning source control is an important step in a test automation engineers journey:
- Without source control awareness, you will experience limits to your collaboration with your team, identifying risks, testing early and advocating for quality.
- Source control is a gateway to many other skills that will make you an effective test automation engineer. Unlocking the potential of the command line, establishing coding habits by recognising patterns and integrate your tests with your deployment pipeline.
If you want to add value, collaborate with your team and add momentum to your learning, start with source control. Your team and your career will thank you for it.
This post was originally published by the great people at TechBeacon here: https://techbeacon.com/how-advance-your-test-automation-skills-source-control