Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 1.3 KB

tests.md

File metadata and controls

41 lines (25 loc) · 1.3 KB

Tests

Tests are a way to make sure the software is working as intended, bug-free, without security vulnerabilities and to know its limits.

They also serve as documentation on how to use the code

Types Of Testing

  • Functional test: Checks that the software works that way it is supposed to.
    • Unit test: Verifies small units of code such as a single methods or functions
    • Integration test: Verifies modules or classes interact with each other as supposed to
  • Benchmarks: Test the performance of the software
  • Fuzzing: Send random inputs to the software to hopefully find a mysterious bug.
  • Security test: Look for vulnerabilities in the software

Unit Tests

Tests should be:

  • Independent of the environment (except library dependencies)
  • Fast
  • Parallelizable
  • Executed frequently

TSTU001 - Write In Temporary Directory

Most tests should be read-only regarding the OS environment file system.

If writes are necessary, they should be done in a temporary directory that is cleaned up upon test completion or interruption.

If the written files or directories remains, they should not break the next tests execution.

Integration Tests

Benchmarks

Fuzzing

Security Tests

Next: Security