Testing: Automation
How to make testing an automatic part of your process
The best way to ensure that testing becomes a part of your process is to automate it.
One way of automating this is to ensure that each time you commit code to your project, an entire suite of tests is run automatically.
There is a buzzword for that approach: it’s called continuous integration.
The process of ensuring that your code base stays sane is sometimes called “keeping the build green” as described in this article:
- Why you should keep your build green, an article on Continous Integration by Petri Kainulainen.
Travis-CI
An easy way to get started with continuous integration is with Travis-CI.
- Travis-CI is a platform that offers free continuous integration services for any open source project on Github.
- It is straightforward to set up automated testing on Travis-CI for dozens of programming languages including all those commonly used in UCSB CS courses:
Language/Platform | Link to Travis-CI documentation |
---|---|
Android | https://docs.travis-ci.com/user/languages/android/ |
C | https://docs.travis-ci.com/user/languages/c/ |
C++ | https://docs.travis-ci.com/user/languages/cpp/ |
Java | https://docs.travis-ci.com/user/languages/java/ |
JavaScript with node.js | https://docs.travis-ci.com/user/languages/javascript-with-nodejs/ |
Python | https://docs.travis-ci.com/user/languages/python/ |
Ruby | https://docs.travis-ci.com/user/languages/ruby/ |
There are many more; this is only a partial list. Visit https://docs.travis-ci.com/user/languages for the full list.
More on Travis-CI
- https://docs.travis-ci.com/user/for-beginners/
- https://docs.travis-ci.com/user/customizing-the-build/
Alternatives to Travis-CI
Related topics:
- Testing: Acceptance Testing—Criteria for being 'done' with an issue
- Testing: Agile Testing (Crispin and Gregory)—Material from the book by Lisa Crispin and Janet Gregory, Agile Testing: A Practical Guide for Testers and Agile Teams
- Testing: Automation—How to make testing an automatic part of your process
- Testing: End to End Testing—Intro to End to End Testing, and Framework Specific Examples
- Testing: Jacoco Reports—How to interpret the reports (red, yellow, green)
- Testing: Jacoco via Maven—Setting up Jacoco test coverage, using Maven
- Testing: Unit Testing with Jest—Setting up Jest for Next.JS projects
- Testing: Mocking—Intro to Mocking in Tests, and Framework-specific Examples