Skip to content

overfullstack/sttc-demo

Repository files navigation

Score the Tendulkar Test Coverage

Functionality

This figure depicts what this sample app does:

Functionality
  1. HTTP call to a Pokémon Store to fetch random Pokémon names.

  2. It uses those names to query the DB and deduces matching and missing Pokémon in the DB.

  3. It then fetches powers for those missing Pokémon from the Store via HTTP and inserts them in the DB.

It uses postgresql for DB. powers is the only table in this DB with this simple schema:

DB Schema

Module Dependency

This miniature is a multi-module project, that comprises 5 modules:

  • demo-before — demos predominant coding and testing practices on the Core that makes unit-testing difficult

  • demo-now — demos the solution to organically improve unit-test coverage

  • legacy — This simulates legacy core modules. Assume you don’t have control over refactoring this module.

  • loki — A simulated Loki module

  • loki-dud — A simulated Dud module that contains Fakes

Demo before
Demo now

See in Action

It’s a simple gradle project, so just run this command after clone:

./gradlew clean build

Install Docker and run this command to get the Postgresql DB up

docker compose up

Run the main method from App.kt and see it in action with pokemon.http

Find comments in the respective classes and tests for explanation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published