-
Notifications
You must be signed in to change notification settings - Fork 10
Sahagin configuration YAML
Sahagin's all configurations are centralized on YAML format configuration file called "sahagin.yml".
By default, sahagin.yml is assumed to be located on the test execution current directory. In the case of Java or Groovy, this is project root directory.
If you want to change the directory path to sahagin.yml or file name itself, specify the path to Sahagin configuration file by sahagin.configPath system property as JVM argument.
If you use Maven, add maven-surefire-plugin argLine:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
-Dsahagin.configPath={path to Sahagin configuration file}
</argLine>
</configuration>
</plugin>
</plugins>
</build>If you use Gradle, add systemProperty value:
test {
systemProperty 'sahagin.configPath', 'path to Sahagin configuration file'
}If you use sahagin.jar file directly, add JVM argument:
-Dsahagin.configPath=<path to Sahagin configuration file>
In addition to the system property, if you use Jenkins Sahagin plug-in, you need to specify the path to Sahagin configuration file by Post-build Action Publish Sahagin HTML report configuration.
Configuration YAML structure is as below:
common:
runOutputIntermediateDataDir: <intermediate data directory>
reportInputIntermediateDataDirs:
- <intermediate data directory>
- <intermediate data directory>
- ...
reportOutputDir: <report directory>
userLocale: <locale value>
runTestOnly: <report generate flag>
java:
testDir: <test code root directory>
testFramework: <test framework name>
groovy:
testDir: <test code root directory>
testFramework: <test framework name>Sahagin configuration file is intended to be used by all language [Sahagin runtime libraries](Basic architecture).
- common key configurations are used for all languages.
- java key configurations are only used for Sahagin-Java runtime library.
- groovy key configurations are only used for Sahagin-Groovy runtime library.
| key | detail |
|---|---|
| runOutputIntermediateDataDir | Path to the root directory of [Sahagin intermediate data](Basic architecture) generated by test run. This path is absolute path or relative path from this YAML file.
|
| reportInputIntermediateDataDirs | Path to the root directories of [Sahagin intermediate data](Basic architecture) used to generate the HTML report. This path is absolute path or relative path from this YAML file.
|
| reportOutputDir | Path to the HTML report output root directory. This path is absolute path or relative path from this YAML file.
|
| userLocale | Locale used in the report.
|
| runTestOnly | Used only for sahagin.jar or sahagin-groovy.jar. If true, sahagin.jar (or sahagin-groovy.jar) does not generate HTML report, only generates intermediate data. See Basic architecture for detail.
|
| key | detail |
|---|---|
| testDir | Path to the root directory of test Java files. All test methods and methods annotated by @TestDoc must be located under this directory. This path is absolute path or relative path from this YAML file.
|
| testFramework | Sahagin assumes tests are executed by this test framework. Be aware of the case difference of values.
|
| key | detail |
|---|---|
| testDir | Path to the root directory of test Groovy files. All test methods and methods annotated by @TestDoc must be located under this directory. This path is absolute path or relative path from this YAML file.
|
| testFramework | Sahagin assumes tests are executed by this test framework. Be aware of the case difference of values.
|