#Testing Posts

The Toptal Engineering Blog is a hub for in-depth development tutorials and new technology announcements created by professional freelance software engineers in the Toptal network.
Subscribe for daily updates today and check out the wealth of technical resources published by the Toptal network.
Mikhail Angelov
Integration and End-to-end Tests Made Easy with Node.js and MongoDB

Dealing with a real database for integration and end-to-end testing can pose some challenges. One way of working around them is to use an in-memory database that integrates well with the testing framework and provides APIs to manipulate its state from test code.

In this article, Toptal Freelance Software Engineer Mikhail Angelov shows how you can write integration and end-to-end tests easily for your Node.js and MongoDB application without having to write complicated setup/teardown code.

Continue reading →
Alexander Gedevanishvili
Android and iOS UI Testing with Calabash

Do you think testing your iOS or Android apps manually is faster than writing automated tests for them? Calabash, the cross-platform acceptance framework, busts that myth once and for all.

In this article, Toptal Freelance Software Engineer Alexander Gedevanishvili shows how Calabash, with its support for Cucumber, makes writing automated UI tests as simple as writing instructions in plain English.

Continue reading →
Luka Blažecki
A Node.js Guide to Actually Doing Integration Tests

Your software isn’t fully tested until you write integration tests for it. While unit tests help ensure that functions are properly written, integration tests help ensure that the system is working properly as a whole.

In this article, Toptal Software Engineer Luka Blažecki uses Node.js to explain why integration testing is important for every development platform and how to write clean, composable integration tests.

Continue reading →
Gabriel Aszalos
Testing Your Go App: Get Started The Right Way

When Golang first came out, there were next to no resources available about how to efficiently test your Go-written application. Even now, with plenty of guides and recommendations available, many bright-eyed developers still try to apply their Ruby or JavaScript mindset and use external frameworks to test apps written in Go.

In this article, Toptal Freelance Developer Gabriel Aszalos first explains Golang philosophy and then covers the basics of testing in Go, from table testing to JSON response assertion.

Continue reading →
Vasily Koval
Jumpstart Your PHP Testing with Codeception

Would you like to test your PHP code like a boss? Do you feel that basic unit tests and PHPUnit just don’t cut it anymore? If your answer to both questions is yes, you might want to try Codeception, a mature and well-documented testing framework designed to outperform PHPUnit and Behat.

In this post, Toptal Freelance Software Engineer Vasily Koval describes how he came to take the plunge and start using Codeception, and he explains why you should check out Codeception for your PHP testing needs.

Continue reading →
Bhushan Lodha
HTTP Request Testing: A Developer's Survival Tool

It’s tragically common for developers to come into a project where proper automated testing has been and will continue to be overlooked. It’s a situation Freelance Developer Bhushan Lodha has found himself in all too often; fortunately, he’s found a solution. In this article, he briefly covers the reasons why testing is overlooked and ultimately explains his “coding life hack” to ensure quality control even when he can’t introduce a testing framework.

Continue reading →
Dejan Zivanovic
Automation in Selenium: Page Object Model and Page Factory

Proper test automation is not always easy to achieve and requires almost as much design and thought as needed for the software itself. In the agile way of development tests are an essential ingredient in ensuring quality of software. However, unless these test codes are maintainable, they can prove to be more of a nuisance, especially when it comes to automated testing of modern web applications. This article is an easy introduction to Selenium features Page Object and Page Factory, how they can be used to model web applications, and how to write maintainable test code using them.

Continue reading →
Sergey Kolodiy
Unit Tests, How to Write Testable Code and Why it Matters

In this article, I will show that unit testing itself is quite easy; the real problems that complicate unit testing, and introduce expensive complexity, are a result of poorly-designed, untestable code. We will discuss what makes code hard to test, which anti-patterns and bad practices we should avoid to improve testability, and what other benefits we can achieve by writing testable code. We will see that writing testable code is not just about making testing less troublesome, but about making the code itself more robust, and easier to maintain.

Continue reading →