Further Recommendations#

Try reading the chapter on reproducible computational environments and then the chapter on continuous integration. The chapter on reviewing outlines how you can further strengthen your code base by adding a formal reviewing stage to your development workflow.

TutorialsPoint has a number of useful tutorials related to testing, as does the Turing Institute. It is also worth looking at softwaretestingfundamentals.com.

Materials used: How this will help you/ why this is useful#

Materials used: General guidance and good practice for testing#

Materials used: Types of tests#

Materials used: Smoke testing#

  • Digitalocean Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Materials used: Unit testing#

Materials used: Integration testing#

Materials used: System testing#

Materials used: Acceptance testing#

Materials used: Regression testing#

Materials used: Runtime testing#

Materials used: Test driven development#

Materials used: glossary#

Definitions/glossary#

  • Acceptance test: A test that the program meets the project’s fundamental requirements.

  • Code coverage: A measure which describes how much of the source code is exercised by the test suite.

  • End to end test: A test that runs the program from beginning to end and verifies that the output is correct.

  • Integration test: A test where units of code are combined and run, and the output is verified to check the units have been correctly integrated.

  • Mocking: Replace a real object with a pretend one to use when running tests.

  • Regression test: Comparing the result of a test before and after the code has been altered. If the output has changed a problem has been introduced somewhere in the program, and an error is thrown.

  • Runtime test: Tests embedded within the program which are run as part of it.

  • Smoke test: Very brief initial checks that ensure the basic requirements needed to run the project hold.

  • Stochastic code: Code which, while correct, does not always output the same result. For example a program that outputs ten random numbers will generate a different result each time, despite being correct.

  • System test: See “end to end test”.

  • Test driven development: A process of code development where unit tests are written before the units themselves.

  • Test stub: Fake implementations of parts of code which are used in testing to remove dependences.

  • Test suite: The tests that have been written for a project.

  • Testing framework: Tools that make writing and running tests less labour intensive.

  • Unit: A small piece of code that does one simple thing. It usually has one or a few inputs and usually a single output.

  • Unit test: A test that checks the behaviour of a unit.