Test apache-test
Run unit tests, integration tests, or slow integration tests matching CI. Use to validate changes before submitting a PR.
- Our test
- —
- not tested yet
- GitHub stars
- 25k
- apache/skywalking
- Added by
- 0
- members
- Updated
- Dec 6
- commit be6d22d
- Content
- 1 file
- no scripts · 3 KB
- License
- Apache 2.0
- free to use
What our test found
Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.
name: test description: Run unit tests, integration tests, or slow integration tests matching CI. Use to validate changes before submitting a PR. argument-hint: "[unit|integration|slow|module-name]"
Tests
Run tests matching CI configuration.
Commands by argument
unit or no argument — unit tests
./mvnw clean test -q -B -D"checkstyle.skip"CI runs this on:
- JDK 11: ubuntu, macOS, Windows
- JDK 17, 21, 25: ubuntu only
integration — integration tests (excludes slow)
./mvnw -B clean integration-test -Dcheckstyle.skip -DskipUTs=true -DexcludedGroups=slowCI runs this on JDK 11, 17, 21, 25 (ubuntu only).
slow — slow integration tests
The slow matrix has two entries, each building the whole project once:
# ElasticSearch / OpenSearch: the Elasticsearch client against Elasticsearch 7, 8 and 9, and OpenSearch 1 and 2
./mvnw -B clean integration-test -Dcheckstyle.skip -DskipUTs=true \
-Dit.test=org.apache.skywalking.library.elasticsearch.ElasticSearchIT \
-Dfailsafe.failIfNoSpecifiedTests=false
# Elastic IT: the storage-elasticsearch-plugin ITs tagged @Tag("elastic-it") (Zipkin query, span-attached events)
./mvnw -B clean integration-test -Dcheckstyle.skip -DskipUTs=true -Dgroups=elastic-itCI runs on JDK 11 (ubuntu only).
Module name — single module tests
# Unit tests for a specific module
./mvnw clean test -pl oap-server/analyzer/<module-name> -D"checkstyle.skip"
# Integration tests for a specific module
./mvnw -B clean integration-test -pl oap-server/analyzer/<module-name> -Dcheckstyle.skip -DskipUTs=trueTest frameworks
- JUnit 5 (
org.junit.jupiter) - Mockito for mocking
- AssertJ for assertions
- PowerMock for reflection utilities
Test naming conventions
| Type | Pattern | Maven phase | |------|---------|-------------| | Unit tests | *Test.java | test | | Integration tests | IT*.java or *IT.java | integration-test |
Slow test tagging
Tests tagged with @Tag("slow") are excluded from the normal integration-test job and run separately in the slow-integration-test job. Use this tag for tests that spin up external services (Elasticsearch, etc.) and take significant time. A slow IT must also be selected by a slow-matrix entry (by class, or by a second tag such as @Tag("elastic-it")), or it never runs in CI.
CI retry behavior
All three CI jobs retry on failure (run the same command twice with ||). This handles flaky tests but masks intermittent issues — if a test fails locally, investigate rather than relying on retries.
CI reference
CI workflow: .github/workflows/skywalking.yaml
| Job | JDK | OS | Timeout | |-----|-----|----|---------| | unit-test | 11 (3 OS) + 17, 21, 25 (ubuntu) | ubuntu, macOS, Windows | 30 min | | integration-test | 11, 17, 21, 25 | ubuntu | 60 min | | slow-integration-test | 11 | ubuntu | 60 min |