How Docker Makes Testing More Efficient

Testing your software is important. Automating your testing and having continuous integration for your project in place is a matter of best practice nowadays. Often it’s one of the first things a software team works on when starting a new project.

A good test suite allows you to push changes to your product in a safe way without breaking things for your customers. It also helps you validate the functionality of your features. But your test suite also needs a lot of time and maintenance. Many teams want to have good testing in place but don’t actually work on it.

There’s an argument that large test suites slow down your deployment, and running your test suite simply takes too long. However, we have quite a few services nowadays that help automate the running of your tests.

One of the main reasons my co-founders and I began working on Codeship was to remove the burden of running tests on your own machines. We also wanted to help you with automation, process control, and removing your development machine as a blocker to pushing changes. As a result, now we can offer you dedicated infrastructure that’s geared toward speed but still allows for flexibility. Most importantly, it doesn’t require the resources of your personal machine.


Reasons why development teams skip tests

You Should Really Test Your Software

Yes, we all have a lot to do, and writing/improving tests or refactoring your code might not really be on top of your high-priority tasks list. Taking care of your test suite may not feel like the most important thing to do just now — you need to work on all these features that are on your team’s roadmap, and the deadlines are getting dangerously close. Rarely does it feel like testing needs your immediate attention.

But really, it should. Relying on continuous integration or continuous delivery without adequate test coverage is not a great idea. You’ve got to have a safety net in place that stops code-breaking changes to be pushed to your customers.

Continuous Integration and Delivery with Docker

Today, efficient software teams push code to production multiple times a day. But this only works with good processes in place. Pull requests, code reviews, and good test coverage are essential for enabling a fast pace and high output of new code. You can read more about this in my free eBook about “Efficiency in Development Workflows.”

Making sure that development and production environments are as similar to each other as possible can often feel like an overwhelming goal for software teams. Having the same conditions on your testing environment as on your production environment has been difficult to accomplish in the past.

Today, Docker allows you to run your tests in containers as well as isolate your tests in development and deployment. And together with our Codeship Jet CI Platform, you now have a simple way to make testing predictable across multiple platforms by achieving parity between your testing environment and production. This gives you the confidence that when something works on your machine it will also work for your customers.

As Codeship senior engineer Laura Frank and I will demonstrate in our upcoming webinar, setting up testing with Docker is a big step toward improving your team’s efficiency and level of output. All software teams, no matter which team size or company size, will very likely benefit from having such a workflow in place.

While a lot of people view Docker containers as something similar to virtual machines, you really should think about them more as processes. This perspective suddenly opens up a lot more creative thought for how to use containers. When Jessie Frazelle spoke at DockerCon 2015, she showed several examples of “Container Hacks in Docker,” demonstrating just how creative you can get and how much you can push the boundaries with Docker containers.

Testing with Docker Live Tutorial in our free webinar on March 29

If you are interested in learning how to leverage Docker for your testing, I highly encourage you to join our free webinar on Tuesday, March 29, 2016. Laura Frank, a senior engineer here at Codeship, and I will talk about the importance of writing tests, as well as offer detailed examples of how to run your tests with Docker and how to parallelize them.

Reference: How Docker Makes Testing More Efficient from our JCG partner Manuel Weiss at the Codeship Blog blog.
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Back to top button