The first step is the hardest. Reading this article might actually be that first move you need to make. Taking the time to document how to do it, and where to start, is probably just as difficult. Even though I was pretty excited to learn, I was worried about properly understanding or learning fast enough on my own. But it’s actually not likely to fail. Once I took some time to search for the “minimum requirements” of automated testing, it seemed like an attainable goal.
Starting as a QA can be confusing. There are a lot of people out there who opted for this job. Testers are pretty easy to find for a company and I’m one of them. Just as I did before, you’ve probably already asked yourself “How could I make a difference? How can I prove myself? How on Earth could I stand out from all the others?” Well, the answer is bluntly simple: the Internet and your computer. The secret to being a great QA is actually well known and attainable: learn automated testing. Nowadays, an IT career is a lot more solid when supported by something like automated tests, and software companies are desperately hunting for testers that can write them.
Both you and I know the secret already. This is the story of how I went from “I have no idea about where to start with automated tests” to actually writing comprehensive, functional and really helpful ones.
When I first realised that the project I am working on in Innobyte needs something more than just traditional, manual testing, I gave serious thought to learning test automation. I started with the most popular ones: Ruby and Watir. It took me a while to setup. Until I ended up writing my first test, I realised I had spent a few nights tinkering with it. Being inexperienced with test automation at that time, I felt like I had to pick Ruby. So I continued learning. Little did I know that I was going to end up with a totally different framework.
Since we needed to test the project based on customer behaviour, we decided to analyse two good BDD (behaviour driven development) testing frameworks: Behat and Codeception. Behat seemed a bit complicated for my shoes, and it would have needed a lot of help from the developers to implement. Codeception seemed a lot friendlier and easier to understand. Therefore, after taking a detailed look at it and analysing it with the team, we decided to pick the latter. In retrospect, I think it was the best decision, even if Ruby had been one of the candidates.
I honestly think that Codeception is the answer when doing automatic testing. Why? Here are 10 of the many reasons, which I am mostly giving you from my own perspective and experience:
- It’s a simple setup;
- The tests are easy to write and understand;
- There’s almost no involvement from the developers;
- You have the opportunity to insert PHP in your tests, if you need it;
- It’s very customizable and it works well with Selenium WebDriver;
- It’s suitable for any web project;
- Developers can use it to write unit tests;
- It has tons of modules you can use to make the test process more efficient (special modules for Symfony2, database modules, Laravel4 module, Facebook testing modules, Webdriver etc. – Find all of the modules on www.codeception.com);
- The output is easily readable and the test results can be saved in many formats;
- It offers many options through its modules, like testing e-mail content and restoring the DB after each test.
Alright now, don’t panic, it’s not as difficult as it sounds. And it is actually as easy to do as it is to say. Here’s a sample of a line of code: $I->click(“Submit”); . It doesn’t look that bad, right? You shouldn’t have to know anything but the regular computer usage to be able to start writing automated tests. This framework offers just that.
And we’ll talk more about it!
If you want to know how simple it is to setup Codeception, stay tuned! The next article will be up next Tuesday and it is on Installing and configuring Codeception for Windows.
You can also subscribe to our weekly newsletter on Codeception here.