Skip to content

Testing

Testing is checking whether your application does what it is supposed to do. You write code that automatically verifies that your application works correctly, that all features behave as expected, and that no new bugs have been introduced. By testing properly, you prevent problems and can make changes with confidence, without being afraid of breaking something.

For this product, you choose one testing strategy and describe which tests you wrote, how you implemented them, and what the results are.

Testing

There are different types of tests you can write:

  • Unit tests: Testing individual functions or components
  • Integration tests: Testing how different parts of the system work together
  • End-to-end tests: Testing complete user scenarios
  • Performance tests: Testing the speed and efficiency of your application

You choose one of these testing strategies to apply in your project. By writing tests, you ensure that your application is reliable and keeps working even when you make changes.

Quality indicators

When assessing this product, the following quality indicators will be considered:

  • The testing document is self-contained: it starts with an introduction/context and then describes the chosen testing strategy.
  • A testing strategy is chosen and described (unit tests, integration tests, end-to-end tests, or performance tests).
  • It explains why this testing strategy was chosen and what the tests verify.
  • It describes how the tests are implemented in the project (which test frameworks are used, how the tests are structured).
  • It includes examples of test code that clearly show how the tests work.
  • It includes test results that show the tests were executed successfully.
  • It includes references to the code in GitLab where the tests are implemented.
  • It includes a list of sources used to write and implement the tests.

Template

To document your own tests, you can use the following template:

# Testing

In this section, describe in a few sentences what testing is and why it is important for your project. This is the main text of your document.

## Test Strategy

Here you describe which test strategy you chose for your project (unit tests, integration tests, end-to-end tests, or performance tests). Explain why you chose this approach and what this test strategy entails.

## Test Implementation

Here you describe how you implemented the tests in your project. For example:
- Which test frameworks you use
- How the tests are structured
- How you run the tests

## Test Examples

Here you add examples of test code that clearly show how the tests work. Explain what each test does and what the expected result is.
Add references to the code in GitLab and use code snippets to describe the tests.

## Test Results

Here you add test results that show the tests were executed successfully. This could be a screenshot of the test output or a summary of the test coverage.

## Sources

List here the sources you used to write and implement the tests. Think of YouTube videos, websites, books, and so on.
Also include sources that helped you write the code.