16 July 2019
My experience of writing automated tests as a non-technical guy with no programming knowledge
You dream about writing automated tests but you have no idea where to start? YouTube is full of tutorials but without proper knowledge, you probably feel lost and discouraged. Don’t worry – I’ve been there, took pictures and came back. Today I’m going to to tell you the secret: learning to write automated tests in a few hours is possible. All you need is a proper framework.
What are automated tests anyway?
Automated tests – this magical phrase was a hot topic in conversations between testers in my previous company. Everyone dreamed of learning how to write automated tests, becoming a QAA, finally being one of the developers and earning unimaginably large amounts of money. Unfortunately, it started and ended on dreams. When I think about those workmates today – their attempts to understand Java and Selenium, and the growing reluctance to these technologies with each subsequent page of thick volumes of introductions and tutorials – I won’t surprise anyone if I say that to this day none of them has become an automation tester.
To be completely honest, I wasn’t interested in QAA at all and never had the slightest desire to learn how to write automated tests. It just seemed to be an unreachable goal for me.
You can ask: what the fuss is all about? Well, actually test automation plays a crucial role in software testing. Apart from literally automating repetitive tasks and performing additional testing that’s impossible to do manually, it controls the proper execution of tests and compares the actual outcomes with predicted ones. In short, automated testing saves you A LOT of time. My Quality Assurance colleagues have already written a lot on this topic, so if you’re interested further why is it important to maintain automated tests or how to speed up software testing, read their articles.
Now, back to my story…
How I (almost) became a programmer in two hours
A year ago, I changed my job from a glass office building in Warsaw to the refurbished neo-gothic post office in Gliwice. When I came to The Software House, I started working as a second manual tester in a project in which I work to this day. It took me some time to understand the business requirements and learn about this particular application. However, after a few weeks – when I already knew my project quite well and was looking forward to doing some testing – I learned that some automated tests have already been written for this project. That’s when I heard the magic word “Kakunin”.
After about two months, the main tester left my project and I remained alone. But before he left, he handed over his duties to me and showed me these mysterious Kakunin scenarios for automated testing. I was absolutely shocked! It turned out that I understood almost everything that was written in them. At first, I thought I am an undiscovered technological prodigy who understands every line of code ever written, able to learn a programming language in two hours! How cool is that? The reality turned out to be a bit more down-to-earth:
Kakunin is based on the Gherkin language which is apparently very simple to understand. All you need is a 15-minute introduction and basic knowledge of English.
Shame, because I was getting used to my secret superpowers.
You don’t know JS? Yes, I do!
With Kakunin I became a “programmer” without programming knowledge
Not a long time passed and all the tests have been updated! The work turned out to be so pleasant and simple that I decided to take the next step and write a few test scenarios from scratch. Of course, in the beginning, I simply recycled whole fragments of code from other scenarios. Put together they did work but were absolutely appalling. I was so proud of myself, however, that I didn’t realize how “ugly” they were written. I learned that the hard way – by being introduced to code review by our testers. I had to swallow my pride but, after a few corrections, I finally managed to understand how to properly use Kakunin’s “Given”, “When”, “And” and “Then”. Finally, it was time for a world premiere of the first test scenario written all by myself!
Of course, it doesn’t mean that I suddenly became a programmer who’s able to use Kakunin to the fullest and write everything in it. I still have a lot of work ahead of me, but I also know that…
Learning to write automated tests in a few hours is possible
All in all, I needed only a few hours to learn how to write automated tests using Kakunin.
And that’s really it. The rest can be found in the framework’s documentation which in no way resembles those terrible, fat and difficult to understand volumes that pop to your mind when you hear the phrase: “technical documentation”.
What comes next?
I will certainly continue to write in Kakunin! This is a framework that opened up huge opportunities for me and it wouldn’t be right to snub it. In the foreseeable future, I’m going to finish all the automated tests I need in my project. And later, who knows, maybe I will be able to support our testers in developing Kakunin itself?
If you want to start your own adventure with our original open-source Kakunin, visit the official website, see how it works and try it out yourself. It is and always will be completely free of charge. So go crazy! 🤩