dhis2_generate_test_setup
Set up DHIS2 app testing environments by configuring frameworks like Jest, Cypress, or Playwright and generating unit, integration, e2e, or visual tests with mock setups for APIs, DataStore, and authentication.
Instructions
Generate testing setup and example tests for DHIS2 app
Input Schema
Name | Required | Description | Default |
---|---|---|---|
coverage | No | ||
mockSetup | No | ||
testFramework | Yes | Testing framework to configure | |
testTypes | No | Types of tests to set up |
Input Schema (JSON Schema)
{
"properties": {
"coverage": {
"properties": {
"reports": {
"description": "Coverage report formats",
"items": {
"enum": [
"html",
"json",
"lcov",
"text"
],
"type": "string"
},
"type": "array"
},
"threshold": {
"description": "Coverage threshold percentage",
"type": "number"
}
},
"type": "object"
},
"mockSetup": {
"properties": {
"authentication": {
"description": "Set up authentication mocks",
"type": "boolean"
},
"dataStore": {
"description": "Set up DataStore mocks",
"type": "boolean"
},
"dhis2Api": {
"description": "Set up DHIS2 API mocks",
"type": "boolean"
}
},
"type": "object"
},
"testFramework": {
"description": "Testing framework to configure",
"enum": [
"jest",
"cypress",
"playwright"
],
"type": "string"
},
"testTypes": {
"description": "Types of tests to set up",
"items": {
"enum": [
"unit",
"integration",
"e2e",
"visual"
],
"type": "string"
},
"type": "array"
}
},
"required": [
"testFramework"
],
"type": "object"
}