The idea of automating your code testing is a pretty exciting one. It allows any developer or tester to run automated tests on your code and see results instantly. It’s pretty cool, right? Well, a lot of developers and testers are skeptical. They wonder what the point of it is. We are going to get to the bottom of why and how automation is useful.
The goal of automated testing is to make sure that everything is working as expected. You want to get every test to run in less than one second.
The good news is that there’s a lot of automation out there already. We’ve talked about a few different options to automate testing before. We’ve talked about the code-level testing tools. We talked about continuous integration tools. We’ve even talked about a few different ways of doing automated testing in the cloud. The thing is that none of these options are perfect.
Continuous integration is the big one that we all know and love. It means that you get your code tested periodically, preferably daily or weekly, and you can deploy it to production whenever it is ready. You can do this with a simple combination of git and build scripts, or you can do it with a combination of automated build scripts and CI tools.
The thing is, though, that you don’t get any code done with a CI build until you run a build. So if you’re building a feature into your CI build, you’re probably not going to be able to test it until after it’s deployed.
There are many CI-built tools that manage the process of automatically running tests. These include Travis CI, CircleCI, Jenkins, and AppVeyor. These are all of them available either as plugins to your build scripts or as stand-alone tools. They all have excellent support communities and you can often find tutorials and videos on how to use them.
All of these tools have a different approach and each one has a different set of features and is designed to address different requirements. They generally fall into one of two categories: Continuous Integration or Continuous Deployment.
Continuous Integration is the process of running your code against a set of known, testable and reproducible files. These files are typically some kind of documentation, so that other developers can easily understand what is going on. The goal is to make sure that your code works as you intend it to work, and this is achieved by having these files available to other developers. You can also use this to create a baseline for your code that will be a good starting point for your code changes.
In practice, this means that you have to setup a “release” branch, which is a branch that is used to test your code, make sure it is good to go, and then merge it back into a stable branch for your normal development workflow.
This, like all other automated testing techniques, has its downsides. One of the biggest is that it can make your code more difficult to read and understand. With the code in this release branch you can also easily test changes that may require a lot of work to integrate into the main branch. As we’ve seen before with our own code, you can also have a lot of fun with this strategy.