| name | testing |
|---|---|
| description | JUnit 4, Surefire, JaCoCo, fixtures, offline policy — use when adding or changing tests |
- Creating or editing tests under
src/test/java/com/contentstack/utils/. - Adding JSON under
src/test/resources/. - Investigating CI failures or coverage gaps.
- JUnit 4 (
junit:junit, test scope inpom.xml). - Maven Surefire runs classes from
src/test/java.
testFailureIgnoreistrueinpom.xml. Always inspecttarget/surefire-reports/— a successful Maven exit code does not guarantee all tests passed.
- Mirror package
com.contentstack.utils. - Existing patterns:
UtilTests,DefaultOptionTests,AssetLinkTest,TestRte,TestMetadata,Test*,*Test,*Tests. - No separate
*ITMaven profile in this repo; optionalsample/uses the Delivery SDK with env vars (seesample/README.md).
- JSON and assets under
src/test/resources/(e.g.multiple_rich_text_content.json,reports/). Loading patterns:ReadResource,UtilTests@BeforeClass.
ReadResource,DefaultOptionClass, and similar helpers — keep tests deterministic and offline (no live API for default unit tests).
- JaCoCo on
mvn test; HTML reporttarget/site/jacoco/index.html.
skills/dev-workflow/SKILL.md— when to run tests before PRs.skills/framework/SKILL.md— Maven/Surefire configuration.skills/code-review/SKILL.md— test expectations for reviews.