---
# System prepended metadata

title: Integration testing Framework - WG

---

# Integration testing Framework - WG

EPIC: https://github.com/cosmos/cosmos-sdk/issues/14145

## 21 March 2023

## Status update

- Explanation about the verbosity of the tests and that there is not too much difference with the current way of doing tests.

## Action

- Ok to proceed. Migration of modules can start.

## 15 March 2023

## Problem

- Likhita, Julien: 
    - Problems with Msg passing way
        - Ends up more complicated and less intuitive than just using keepers.
        - The user needs to manually register what he wants to test, and thus be aware of the dependencies of the module he's testing
            - This is okay, as dev should know the dependencies, but it makes the test very verbose
        - Framework ends-up as small helpers functions where users still need to do all the work

---

## Current State

- Mix of E2E tests and Integration test that basically test the same things
    - Integration tests right now using depinject
    - E2E tests using SimApp

## Goals

- Provide a canonical way to write tests
- Reduce module dependencies

## Use Cases

Testing Module A:

### Module A <-> Module B

Module A has a hard dependencies on Module B. Module B has no dependencies.
You need to use in your integration tests Module A and Module B

### Module A <-> Module B <- -> Module C

Module A has a hard dependencies on Module B. Module B depends on Module C.
For testing Module A, Module C should not be required.
You need to mock Module C and use Module B with that mocks.

## Progress

- [ ] New setup for tests (@likhita)
    - [ ] Takes multiple modules and config
    - [ ] Using mocks and depinject
        - [ ] Mocks are for replaced dependencies
    - [ ] Blocked on module dependencies evidence

## Ideas

- Query Router / Msg Router (Passing messages between modules)
    - Mocks header, etc.. but not modules

## Questions

- What is the best way to layout the go packages?

## Action items

- [ ] Stop current work and embrace MsgServiceRouter
- [ ] Create PoC with MsgServiceRouter (@likhita,@sam,@julien)
    - [ ] Two independent examples (x2 use case 1, x1 use case 2)