The project uses different categories of tests:
-
Regular Tests: Unit tests and basic integration tests that don't require external services or sensitive credentials.
- Run with:
./gradlew test
- Run with:
-
Integration Tests: Tests that require external services, credentials, or special setup.
- Run with:
./gradlew integrationTest
- These tests are excluded from regular builds to:
- Protect sensitive credentials
- Avoid external service dependencies in CI/CD pipelines
- Speed up regular test execution
- Prevent test failures due to external service availability
- Run with:
Some tests, like GoogleCalendarWidgetDataProviderTest
, are marked with @Tag("integration")
because they:
- Require sensitive credentials (service account JSON)
- Need access to external services (Google Calendar API)
- Use private configuration (calendar IDs)
To run these tests:
- Ensure all required credentials are in place:
/src/test/resources/secret/service-account.json
/src/test/resources/http-client.private.env.json
- Execute:
./gradlew integrationTest
To run both regular and integration tests:
./gradlew test integrationTest
Note: Integration tests will fail if required credentials or services are not available.