SaFi Bank Space : DEV: Testing Strategy

Unit/Component Test

Who does this

Developers

When do they run

Run as part of CI/CD and run on each pull request

Why are they needed

What tools/libraries are used

  • Junit5

  • Mockk

  • Micronaut Test

  • Test Containers

    • Postgres

    • Kafka

    • Temporal

  • Wiremock

  • DB Rider

How to measure

Coverage of line and condition(Stop merging if coverage below threshold)

Current status

Most of services doesn’t meet the expected coverage

Goal

  • All core services(XXX-manager) have coverage above 90%

  • Other services(XXX-gateway, XXX-aggregator, etc) have coverage above 80%

Integration Test(POSTPONE)

Who does this

Developers

When do they run

Why are they needed

What tools/libraries are used

How to measure

Contract Test

Who does this

Developers

When do they run

Before deployment

Why are they needed

Ensure two separate applications/services are compatible and can communicate with one other(even change over time).

What tools/libraries are used

Pactflow

pact-jvm-consumer-junit5

pact-jvm-provider-junit5

How to measure

Before each deployment, we need to check:

  • As a consumer, whether the services already in higher environment satisfy contract of the service to be deployed

  • As a provider, whether the service to be deployed satisfy the contracts required by the services which already in higher environment

API Test

Who does this

Developer

When do they run

After Deployment

Why are they needed

What tools/libraries are used

Postmand + Newman

How to measure

User Journey/Smoke/Regression Test

Who does this

Developer + QA

When do they run

After Deployment/Daily

Why are they needed

Ensures an application still functions as expected after any code changes, updates, or improvements.

Reduce effort of manual regression.

What tools/libraries are used

https://gatling.io/docs/gatling/

How to measure

Performance Test

Who does this

Developer

When do they run

Before go-live

Why are they needed

  • Anticipate slow response times and crashes, enhance user experience

  • Detects performances issues and errors early in development cycle

What tools/libraries are used

https://gatling.io/docs/gatling/

How to measure