Skip to content

Testing

Jordan Piscitelli edited this page Feb 14, 2020 · 3 revisions

Detect has three main types of tests:

  • Unit
  • Functional
  • Battery

Unit

Unit tests operate on a very small scope and have no external dependencies or intertwined mechanics. They may use external files for formatting or extended Pros:

  • Easy to implement.
  • Easy to fix and debug. Cons:
  • Breaks when refactoring.
  • Don't provide much confidence in system as a whole.

Functional

Functional tests operate on a slightly larger scale and test multiple pieces in cooperation. They rely on external dependencies such as files in resources. Pros:

  • Increases confidence in system. Cons:
  • Breaks when refactoring.
  • Difficult to fix when broken.

Battery

Battery tests operate on the largest scale and test an entire Detect run. These tests are for consistency to verify that things are still working as they were. These use actual communications external systems and mock the executables. Changes to the way we communicate with these systems breaks these tests.

Pros:

  • Large confidence that overall system is working.
  • Easy to use to debug customer issues.
  • Should never break when refactoring is done. Cons:
  • Breaks are usually fixed by large scale file replacement.
  • Generating new files can be difficult due to external systems.
  • More complicated tests and require more song and dance to implement.
Clone this wiki locally