-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(testing):[#742] update test strategy
- Loading branch information
Showing
4 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Testing Strategy | ||
|
||
## Frontend Testing Strategy | ||
|
||
See [TESTING](frontend/TESTING.md). | ||
|
||
## Backend Testing Strategy | ||
See [TESTING](tx-backend/TESTING.md). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Backend Testing Strategy | ||
|
||
### Unit Tests | ||
|
||
Unit tests are executed automatically during the GitHub workflow | ||
[pull-request_backend.yml](./github/workflows/pull-request_backend.yml) | ||
[sonar-scan-backend.yml](./workflows/sonar-scan-backend.yml) | ||
|
||
#### Test Reports | ||
|
||
https://sonarcloud.io/project/issues?resolved=false&id=eclipse-tractusx_traceability-foss-backend | ||
[sonar-scan-backend.yml](./workflows/sonar-scan-backend.yml) | ||
|
||
#### Test Coverage | ||
|
||
- The current test coverage is [![Coverage](https://sonarcloud.io/project/overview?id=eclipse-tractusx_traceability-foss-backend&metric=coverage)](https://sonarcloud.io/project/overview?id=eclipse-tractusx_traceability-foss-backend). | ||
|
||
- For more information on coverage see [Architecture Documentation - Development concepts](https://eclipse-tractusx.github.io/traceability-foss/docs/arc42/full.html#_development_concepts). | ||
|
||
#### Testing Frameworks and Libaries | ||
|
||
- The Trace-X project uses [JUnit5](https://junit.org/junit5/) with [AssertJ](https://github.com/assertj/assertj) | ||
and [Mockito](https://site.mockito.org/) and the testing capabilities of the | ||
[Spring Boot Framework](https://spring.io/projects/spring-boot) for unit testing. | ||
|
||
|
||
### Integration Tests | ||
|
||
Besides the Spring Boot features testing features the following frameworks and tools are used for integation testing: | ||
- [Testcontainers](https://java.testcontainers.org/) for bootstrapping integration tests with real services wrapped in Docker containers | ||
- [Wiremock](https://wiremock.org/) 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`. | ||
|
||
- Furthermore, the following libraries are utilized: | ||
- [Awaitility](http://www.awaitility.org/) for expressing expectations of asynchronous code | ||
in a concise and easy to read manner. | ||
- [DataFaker](https://www.datafaker.net/) for creating fake data. | ||
|
||
### Smoke Tests | ||
|
||
N.A | ||
|
||
|
||
### Regression Tests | ||
|
||
[Cucumber](https://cucumber.io/) for regression testing. | ||
|
||
|
||
#### Cucumber Tests | ||
|
||
- There are [Cucumber](https://cucumber.io/) that verify the response bodies in more detail. | ||
- See the module `tx-cucumber-tests` and the [Cucumber Tests README](irs-cucumber-tests/README.md) for more information. | ||
|
||
### Load Tests | ||
|
||
N.A |