Package net.masterthought.cucumber
Class Configuration
java.lang.Object
net.masterthought.cucumber.Configuration
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClassificationFiles(List<String> classificationFiles) Adds properties files which house classifications in key value pairings.voidaddClassifications(String name, String value) Adds metadata that will be displayed at the main page of the report.voidaddCustomCssFiles(List<String> customCssFiles) Adds custom static css files to each html page.voidaddCustomJsFiles(List<String> customJsFiles) Adds custom static js files to each html page.voidaddPresentationModes(PresentationMode presentationMode) Sets how the report should be presented.voidaddReducingMethod(ReducingMethod reducingMethod) Sets how the report should be reduced, merged or modified.booleancontainsPresentationMode(PresentationMode presentationMode) Checks if the configuration has givenPresentationModeset.booleancontainsQualifier(@NonNull String jsonFileName) Checks whether an explicit qualifier was specified for a given json file.booleancontainsReducingMethod(ReducingMethod reducingMethod) Checks if the configuration has givenReducingMethodset.Gets the build number for this report.Returns directory suffixReturns directory suffix with separator prepended if necessaryGets directory where the attachments are stored.Returns the project name.getQualifier(@NonNull String jsonFileName) Retrieves explicit qualifier to use for a given json file.Gets how the report should be reduced, merged or modified.Returns directory where the report should be stored.intReturns number of historical reports presented by trends.Returns file with history with trends.booleanChecks if the page with trends should be generated and displayed.booleanChecks if the file for the trends was set.voidremoveQualifier(@NonNull String jsonFileName) Removes explicit qualifier for a given json file.voidsetBuildNumber(String buildNumber) Sets number of the build.voidsetDirectorySuffix(String directorySuffix) Sets directory suffix.voidsetNotFailingStatuses(Set<Status> notFailingStatuses) voidsetQualifier(@NonNull String jsonFileName, @NonNull String qualifier) Sets explicit qualifier to use for the given json file.voidsetSortingMethod(SortingMethod sortingMethod) Configure how items will be sorted in the report by default.voidsetTagsToExcludeFromChart(String... patterns) Stores the regex patterns to be used for filtering out tags from the 'Tags Overview' chartvoidSets configuration limit for trends.voidsetTrendsStatsFile(File trendsFile) CallssetTrends(File, int)with zero limit.
-
Constructor Details
-
Configuration
-
-
Method Details
-
getReportDirectory
Returns directory where the report should be stored.- Returns:
- directory for the report
-
getTrendsStatsFile
Returns file with history with trends.- Returns:
- file with trends
-
isTrendsStatsFile
public boolean isTrendsStatsFile()Checks if the file for the trends was set.- Returns:
trueif the file location was provided, otherwisefalse
-
setTrendsStatsFile
CallssetTrends(File, int)with zero limit.- Parameters:
trendsFile- file with trends
-
getTrendsLimit
public int getTrendsLimit()Returns number of historical reports presented by trends.- Returns:
- number of reports in trends
-
isTrendsAvailable
public boolean isTrendsAvailable()Checks if the page with trends should be generated and displayed.- Returns:
trueif the page with trends should be displayed
-
setTrends
Sets configuration limit for trends. When the limit is set to 0 then all items will be stored and displayed. To disable saving and displaying trends page set to -1, otherwise number of previous builds is equal to provided limit.- Parameters:
trendsFile- file where information about previous builds is storedlimit- number of builds that should be presented (older builds are skipped)
-
getBuildNumber
Gets the build number for this report.- Returns:
- build number
-
setBuildNumber
Sets number of the build.- Parameters:
buildNumber- number of the build
-
getProjectName
Returns the project name.- Returns:
- name of the project
-
setDirectorySuffix
Sets directory suffix.- Parameters:
directorySuffix- directory suffix
-
getDirectorySuffix
Returns directory suffix- Returns:
- directory suffix
-
getDirectorySuffixWithSeparator
Returns directory suffix with separator prepended if necessary- Returns:
- directory suffix with prepended separator
-
getEmbeddingDirectory
Gets directory where the attachments are stored.- Returns:
- directory for attachment
-
getTagsToExcludeFromChart
- Returns:
- Patterns to be used to filter out tags in the 'Tags Overview' chart. Returns an empty list by default.
-
setTagsToExcludeFromChart
Stores the regex patterns to be used for filtering out tags from the 'Tags Overview' chart- Parameters:
patterns- Regex patterns to match against tags- Throws:
ValidationException- when any of the given strings is not a valid regex pattern.
-
addClassifications
Adds metadata that will be displayed at the main page of the report. It is useful when there is a few reports are generated at the same time but with different parameters/configurations.- Parameters:
name- name of the propertyvalue- value of the property
-
getClassifications
- Returns:
- the classification for the report.
-
setSortingMethod
Configure how items will be sorted in the report by default.- Parameters:
sortingMethod- how the items should be sorted
-
getSortingMethod
- Returns:
- the default sorting method.
-
addReducingMethod
Sets how the report should be reduced, merged or modified.- Parameters:
reducingMethod- type of reduction
-
getReducingMethods
Gets how the report should be reduced, merged or modified.- Returns:
- type of reduction
-
containsReducingMethod
Checks if the configuration has givenReducingMethodset.- Parameters:
reducingMethod- method to validate- Returns:
trueif method was set, otherwisefalse
-
addPresentationModes
Sets how the report should be presented.- Parameters:
presentationMode- method used for presentation
-
containsPresentationMode
Checks if the configuration has givenPresentationModeset.- Parameters:
presentationMode- method used for presentation- Returns:
trueif mode was set, otherwisefalse
-
addClassificationFiles
Adds properties files which house classifications in key value pairings. When these properties file get processed these classifications get displayed on the main page of the report as metadata in the order in which they appear within the file.- Parameters:
classificationFiles- files with classifications
-
getClassificationFiles
- Returns:
- the list of properties files.
-
getNotFailingStatuses
- Returns:
- statuses which do not fail scenario.
-
setNotFailingStatuses
- Parameters:
notFailingStatuses- not failing statusses
-
setQualifier
Sets explicit qualifier to use for the given json file.- Parameters:
jsonFileName- JSON file name - without the extensionqualifier- Qualifier to use
-
getQualifier
Retrieves explicit qualifier to use for a given json file.- Parameters:
jsonFileName- JSON file name - without the extension- Returns:
- Qualifier specified for this file or
nullif none specified
-
containsQualifier
Checks whether an explicit qualifier was specified for a given json file.- Parameters:
jsonFileName- JSON file name - without the extension- Returns:
trueif the qualifier was specified,falseotherwise
-
removeQualifier
Removes explicit qualifier for a given json file.- Parameters:
jsonFileName- JSON file name - without the extension
-
addCustomCssFiles
Adds custom static css files to each html page.- Parameters:
customCssFiles- css files
-
getCustomCssFiles
- Returns:
- the list of custom css files.
-
addCustomJsFiles
Adds custom static js files to each html page.- Parameters:
customJsFiles- javascript files
-
getCustomJsFiles
- Returns:
- the list of custom js files.
-