Automated testing
Overview
Teaching: 0 min
Exercises: 0 minQuestions
Why does testing need to be part of the software development cycle?
how can software development cycle be implemented?
Objectives
Learn about automated testing with pytest
Learn about travis and how to use it
We use CodeRefinery lesson on Automated testing.
Automated testing
In this lesson we will discuss why testing needs to be part of the software development cycle and how such a cycle can be implemented. We will exercise a collaborative testing/code review workflow.
Prerequisites
-
You need pytest (as part of Anaconda or Miniconda or Virtualenv).
-
Basic understanding of Git.
-
You need a GitHub account.
-
You will also need a Travis CI account but you can sign into it with your GitHub account.
Automated testing in practice
- Motivation
- Concepts
- Tools
- Exercise: testing with pytest
- Exercise/discussion: Testing using hooks
- Exercise: Automatic testing with Travis CI
- Exercise/discussion: Test design
Conclusions and recommendations
- Explore and use the good tools that exist out there
- Automatize
- Strike a healthy balance between unit tests and integration tests
- Require that new functionality comes with new tests
- When you discover and fix a bug, also commit a test against this bug
- Use code coverage analysis to identify untested code or dead wood
Key Points
collaborative testing/code review workflow
pytest
travis