[Discuss] Build integration test
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 658
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 52
Description
In most of the time, we can use unit test to test our code, but this is not enough, since unit test is just test the code logic, it doesn't considerate the real situation of different modules working together.
We should also use integration test to test the whole application.
In EventMesh, there are some three-part dependencies, e.g. rocketmq、mysql(In the future)...
It is better to create a container environment to run the integration test script or code.
I think maybe this project can help us.
https://github.com/testcontainers/testcontainers-java.
https://www.testcontainers.org/modules/rabbitmq/
It supports create mysql、kafka、pulsar container, but it donesn't support rocketmq now(https://github.com/testcontainers/testcontainers-java/issues/3348).
Contributor guide
Research direction
No files, tests, or entry points are named. Start by reviewing EventMesh's existing test setup and the Testcontainers Java documentation, then determine which dependencies can run in containers and how the integration test should exercise the whole application; done means a repeatable container-based integration test is defined for the supported dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kafka, mysql
- Domain
- distributed-systems, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100