You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The flag dab validate -output:results.xml extends dab validate to support outputting the validation results in a machine-readable XML format useful for CI/CD pipelines. This allows for automated validation of configuration files, where any validation errors will be written to the specified XML file for further processing or reporting just like unit test. It's okay to still output to the console.
Sample file
The JUnit XML format is widely used for reporting test results and is supported by most CI/CD tools (Jenkins, GitLab CI, Azure DevOps, etc.). You can find the JUnit XML schema reference and examples at the following link: JUnit XML Format.
<testsuites>
<testsuitename="DABConfigurationValidation"tests="4"failures="3">
<!-- Test Case for Missing Connection String -->
<testcaseclassname="DataSourceValidation"name="Missing Connection String">
<failuremessage="Connection-string is not present in the data-source.">
The data-source section is missing the required 'connection-string' field.
</failure>
</testcase>
<!-- Test Case for Empty Entities Array -->
<testcaseclassname="EntityValidation"name="Entities Array is Empty">
<failuremessage="The entities[] array has no entities.">
The entities array in the configuration is empty. Please define at least one entity.
</failure>
</testcase>
<!-- Test Case for Invalid Runtime Host Mode -->
<testcaseclassname="RuntimeHostValidation"name="Invalid Host Mode">
<failuremessage="runtime/host/mode has an invalid value.">
The value 'abc' for runtime/host/mode is invalid. Expected values are 'development', 'production', or 'staging'.
</failure>
</testcase>
<!-- Test Case for Valid Authorization Provider -->
<testcaseclassname="AuthorizationProviderValidation"name="Valid Authorization Provider">
<!-- No failure, this passes -->
</testcase>
</testsuite>
</testsuites>
What is it?
dab init
to create a.env
file when a connection string is supplied.dab start
to output a summary table after starting.dab validate -output: test-result.xml
for CICD automation.dab configure
to edit everything from the command line.Automatic .env file
.env
filedab init
is passing an@env()
value, then do not continue with this..env
file already exists, modify it.my-connection-string
Simple
.env
file contents:dab-config.json
file.Using variables in the JSON:
dab start Summary table
Today, it's just console logs. This is not new information, just easier to use.
When production
When no HTTPS
dab validate Output File
The flag
dab validate -output:results.xml
extendsdab validate
to support outputting the validation results in a machine-readable XML format useful for CI/CD pipelines. This allows for automated validation of configuration files, where any validation errors will be written to the specified XML file for further processing or reporting just like unit test. It's okay to still output to the console.Sample file
The JUnit XML format is widely used for reporting test results and is supported by most CI/CD tools (Jenkins, GitLab CI, Azure DevOps, etc.). You can find the JUnit XML schema reference and examples at the following link: JUnit XML Format.
Related issues to potentially close
dab configure
options #2296dab configure --data-source
in CLI #2295dab configure
#2251--enable-feature-123
) #2000The text was updated successfully, but these errors were encountered: