By Justinas Židonis, Head of QA at Kilo Health
We created the QA Department at Kilo Health nearly 3 years ago. Since the beginning, we have put a high emphasis on automation. Test automation provides confidence in your product and enables you to not only move faster in your release cycle but also spend the time you saved in a more productive way.
With this blog post, I would like to share our ongoing journey, providing you with insights and reasoning behind our decisions, and, hopefully, give you a headstart with your journey to web automation.
I was the first QA engineer at Kilo Health. When I joined, there were no automation tests or solid infrastructure to support it.
From the beginning, I was eager to start automation testing, but there were a few challenges ahead:
Obviously, during the initial implementation of automation, many more challenges arose, but these three were the main ones to tackle first.
Sounds cliche, but to test a product, it has to be testable.
This goes both for manual and automated testing. It encapsulates a whole bunch of things, but when focusing on automation, there are only a few more important than selectors.
Automatically generated attributes or selecting an element by text are the best ways to make your tests even flakier. To avoid that, we want a particular element to have its own unique selector.
To address this, I made a simple document with screenshots of all elements which need selectors in our product. A task was made out of the document, and a few weeks later, I had all the selectors I needed to fully automate our product End-to-End.
Another thing I ran into while trying out multiple threads while running automation was insufficient resources for testing environment servers. Make sure that your testing environment will be able to keep up with automation and be able to process multiple browsers hitting that system at the same time.
This often gets overlooked but is a key in avoiding test flakiness as well.
There are numerous reasons why you should always execute your automation on dedicated servers, but, in my opinion, the most important are:
With automation, you want to save time. That’s a fact. Executing on dedicated servers enables you to use multithreading and run multiple browsers at the same time while keeping your own computing resources available to be spent elsewhere.
Also, it does help with debugging since the execution environment is always the same, and there are fewer “I cannot reproduce it locally” types of arguments.
Addressing this challenge, there are quite a few paths to choose from. You can either go with cloud-stored solutions to execute your tests or save the initial setup. But the trade-off can mean that you are sacrificing potential customization capabilities. Price may be another factor since, in the beginning, you are not sure if all the fancy features are really needed.
I think that you’ve already figured it out, but we did not go with a cloud-stored solution – we set up our execution server ourselves on Amazon AWS.
We did spend a reasonable amount of time on the setup and configuration but had the ability to configure everything to fit your needs. The technology we chose for this one is TeamCity. Not only is it free (if 3 run agents are enough), but the setup was not complicated, and the feature-rich administration panel helped configure everything.
The IT field is constantly changing, and new technologies and methodologies are coming up constantly. So it is impossible to have a working knowledge of everything new. This is true for automation as well.
By default, it is not necessary to “sell” automation to developers (project managers are a different beast in this regard) because they do understand the benefits. However, depending on your situation, proving that automation really brings value may be essential as well. The easiest way to prove that is for your tests to catch some bugs.
The bigger the impact of a caught bug, the bigger the “visible” value. In my situation, I got lucky to be placed in a professional and eager-to-improve team.
After the benefits of automation are clear, there are a few things from the QA side of things you can do to onboard developers to automation:
Most of the developers were working or had knowledge of PHP language; therefore, the Codeception framework was chosen.
As a tester, I think that if you know how to automate things in one language, it is quite easy to jump to another one. But when it’s completely new to you, you get a headstart when it’s written in the form you understand. Also, the stack trace of a failed test becomes a whole lot more understandable.
Make sure that your test framework is easily run and provides you with an output (screenshots, videos, etc.). Shocker, but people tend to use things when they are easy to use.
To address this point, I made a Slack bot that, after typing a command in a channel, would send a GET request to TeamCity and automatically start tests. After the execution, the outcome would also be posted to Slack (out-of-the-box TeamCity feature).
This means that tests can be executed and the result seen inside a Slack channel.
There are multiple techniques and approaches to avoid flakiness, and you, as a QA, should strive to make your tests as stable as possible.
If we do have flaky tests, there is a possibility of developers getting “used to the red color” of a falling test and start ignoring the outcome. Tests should provide confidence in a product and give feedback to the developer that his changes did not break anything.
We should never lose that confidence.
Constantly updating your framework, adding new features and test types that were requested by the team, and reacting fast to changes help show the value and potential of automation.
To sum up, when introducing an automation technique to a team where it did not exist before, make sure that:
To recap, we’ve already had working automation tests, infrastructure, reporting, and the right kind of attitude to make everything work in our processes.
However, as the team grew and the rate of development increased, the demand to be even more flexible, reduce test running time, and start adopting CI/CD pushed us to improve our automation setup.
To reduce running time and have more testing and reporting capabilities, it was decided to move from Codeception to Playwright. NodeJs was chosen as a programming language because it is an asynchronous, open-source, and cross-platform JavaScript runtime environment.
This was a great choice for multiple reasons:
Since we were not prepared to adopt CI/CD just yet, I spent lots of time improving the current framework and introducing new test types:
During this time, I learned a lot. I saw the direct impact of having a very flexible tool and the freedom to make decisions and not be constrained by the processes. This, again, proved to me that automation is a tool and should be treated as such.
I was in a situation where having an automation framework and processes around it made everyday tasks take too much time, and making custom and reactive decisions to ever-changing products became nearly impossible.
The tool should help you achieve your goals easily. If a tool starts interfering with your goals and starts slowing you down, you cannot quickly implement new features or tests – it’s time for a change. In other aspects of life, people are skeptical of changes; however, in the IT field, it should be embraced and welcomed because it enables us to move forward and improve.
In my opinion, the natural progression of development is when a team adopts CI/CD, which, in a few words, is a modern software development practice in which incremental code changes are made frequently and reliably.
In CI/CD pipelines, you do have some static code checks and Unit test jobs, but in our case, we wanted to expand it to include E2E automation suites as well. Since our framework was written in NodeJS and had a package.json file, we were `npm install` away from installing all the dependencies needed to execute tests anywhere.
To integrate your automation tests into the pipeline, there are only a few steps from the development side of things:
There are also workflow-related aspects you should consider. For example, when running a CI/CD pipeline, you want to get feedback as soon as possible, so running the entire suite of your tests as a default step may not be an ideal solution because the run time would increase dramatically. We, by default, run only regression tests and leave the ability to manually launch the entire suite.
Furthermore, what if we needed to push a hotfix quickly? Waiting for an entire pipeline to succeed and all the tests to pass may not be an option. In such cases, with the magic of GitLab’s CI/CD job variables, we allowed developers to skip these steps if they used special tags in the commit messages.
What if we wanted to enable different types of tests for different projects (e.g., front-end vs. back-end)? Again, GitLab’s job variables came to the rescue.
Using CI/CD pipelines not only made us move a lot faster in the development process, but it did not take away any flexibility we had before that. Our code is constantly tested, and if we need any custom solutions, they are easily implemented. Having workflows is good, but you have to remember to always improve those workflows because, again, change in IT is a good thing.
Lastly, I wanted to point out that in this paragraph, I talked about QA automation only.
We expanded current pipelines with a focus on quality and not increasing run times by a lot. We still have a TeamCity to run tests on-demand, but a move to CI/CD-focused testing, in my opinion, will enable us to move even faster and in a confident, quality-focused way.
It’s been a long journey, and there is a long way to go. During the past 3 years, our approach to automation has changed a lot. We learned from our mistakes, improved on them, and planned for the future.
We tried to set ourselves up to be able to adapt to the ever-changing development sphere, introduce changes quickly, improve current solutions, and not be prisoners of workflows and processes. You have to have a plan and be able to react quickly.
In this blog post, I focused more on a theory and the experiences that worked for us.
Your journey may be different, but I still hope you’ll find something useful and it will help you hit the ground running.
If you are interested in technological solutions, I’d be happy to talk about them via LinkedIn PM.
My experience comes from aviation, but now I lead a wellness and HealthTech company. Business lessons are universally similar, and continuous success requires adaptation and growth. In this article, I want to share the most important points — or perhaps…
As we’re entering an exciting new chapter of business growth and leadership, it’s the perfect time to catch up on the latest changes in our team and where we’re headed next. Dive in and get to know our new CEO…
I’m Matas, and when asked, I refer to myself as an intern — always learning. However, research, strategy, business development, and idea generation are the cornerstones of my work. I want to pull back the curtain and give you an…
I’m Deimante, currently Head of Marketing at Kilo Health, and a big lover of this company. My journey to being hired at Kilo has been quite the ride. How it all started? I underwent interviews with 11 different people and…
Ever dreamt of taking the lead, even if the path isn’t crystal clear? Or to have someone believe in you and offer you a chance to figure out whether you would thrive in a startup environment? Speaking of which, Kilo…
A whole decade has raced by in the blink of an eye for us at Kilo Health, and what better way to celebrate than to reflect on the milestones and lessons over the years? Do you know where we started?…
We, the co-founders, are just ordinary individuals with grand ambitions. There are times when we work twice as long and intensely as others, yet we’re equipped with the same amount of daytime, energy, and capacity. However, as leaders in the…
There’s no enchanting tale behind how I became a part of Kilo Health. In truth, some of us regular folks simply have regular journeys, and that’s perfectly fine. What counts is that today, I hold a successful product in my…
Reflecting on your achievements from the previous year is advantageous. That’s exactly what we did, proudly demonstrating our boundless aspirations through an impressive 84% growth and 213 million euros. So let’s put our hands in the air and celebrate together,…
I joined Kilo Health back in 2019, and I can prove that when people’s values and mindsets align, great things can be accomplished, even if you don’t have a plan. BoomeranGO!, the first and only product for children provided by…
Lighting, sound, set, and actors are essential components of a film studio, but they are not the sole factors that define its success. Consistent creativity, appreciation of talent, and adaptability to market trends are a few of the things that…
Having pen discussions and providing transparent information about salaries can strengthen employee trust, improve fairness and contribute to long-term retention. However, for leaders in human resources to effectively implement pay transparency requires a nuanced approach that respects employees’ privacy and…
The first thing I would say about myself is that I am a family person. The next thing is that I love playing tennis. And the third thing would be that I currently hold the position of COO, Chief Operations…
Far from being a solitary pursuit, app and gaming usage is becoming increasingly social – and its online communities are not only presenting new opportunities for advertisers, they’re reshaping the entire advertising ecosystem in ‘the golden age of AI-powered innovation’….