SaFi Bank Space : SaFi Testing Practices Draft

Unit Test:

  1. We should always write unit test for every logic contained code unit(classes, functions, etc).

  2. TDD is recommended for doing unit test and development.

  3. We need to setup test coverage support in each services and common libs.

  4. We need to be able to setup and define test coverage metrics, and we need to be able to set the test coverage target to force the metrics.

  5. We need to be able to fail the build process in CI if the test coverage is below the target.

Integration Test:

  1. We will have integration test to run against real environment(currently it's dev env) to test business flow.

  2. We will need to update CI to include integration test stage.

  3. Integration test should have isolated test account (or other data) only for running the integration test.

  4. We are doing the spike about introducing Contract Test(such as pact) for our services, will share more on this later.

For more detailed information, you can refer to these documents / slides:

  1. Overall Testing Strategy

  2. Testing Practices & Tools Drafts

  3. Current Integration Test Practices(in progress)