Unit tests are executed automatically during the GitHub workflow IRS build.
- Currently, no test reports are published.
- Failing tests result in a failing build and are reported there.
-
Test coverage can be viewed in detail on sonarcloud.io.
-
For more information on coverage see Architecture Documentation - Build, Test, Deploy.
-
The IRS project uses JUnit with AssertJ and Mockito and the testing capabilities of the Spring Boot Framework for unit testing.
-
Furthermore, the following libraries are utilized:
- Awaitility for expressing expectations of asynchronous code in a concise and easy to read manner.
- DataFaker for creating fake data.
Besides the Spring Boot features testing features the following frameworks and tools are used for integation testing:
- Testcontainers for bootstrapping integration tests with real services wrapped in Docker containers
- Wiremock for building mock APIs in order to simulate dependencies
The Wiremock tests are intended to cover the IRS flow and communication
without the need of a running environment that includes all dependencies.
Wiremock Tests and their corresponding utilities are marked by the suffix WiremockTest
respectively WiremockSupport
.
- The smoke test can be found under
irs-integration-tests/src/test/java/org/eclipse/tractusx/irs/smoketest/ItemGraphSmokeTest.java
. - It is executed via the GitHub workflow IRS integration tests.
We use both Tavern and Cucumber for regression testing.
- For more information about Tavern API tests for the IRS see
Tavern API Tests README under
local/testing/api-tests
.
- There are Cucumber that verify the response bodies in more detail.
- See the module
irs-cucumber-tests
and the Cucumber Tests README for more information.
Please note that there will be changes concerning test execution due to the transfer to Post-consortia-working-model (PCWM).
- We use Gatling for load testing.
- IRS load tests can be triggered manually via GitHub workflow IRS Load Test.
- Please see IRS Load Tests README for more information.
Currently, there aren't any stress tests.