Class AllScenariosPageCollection
- java.lang.Object
-
- com.trivago.cluecumber.engine.rendering.pages.pojos.pagecollections.PageCollection
-
- com.trivago.cluecumber.engine.rendering.pages.pojos.pagecollections.AllScenariosPageCollection
-
public class AllScenariosPageCollection extends PageCollection implements Visitable
Page collection for the scenario overview page.
-
-
Constructor Summary
Constructors Constructor Description AllScenariosPageCollection(String pageTitle)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(PageVisitor visitor)Method to accept aPageVisitor.voidaddReports(Report[] reportList)Add reports to the existing report list.voidclearReports()Empty report list.AllScenariosPageCollectionclone()Function to clone theAllScenariosPageCollectionincluding all included data.List<Element>getElementsByFeatureIndex(int featureIndex)Get scenarios by feature index.FeaturegetFeatureFilter()Return the feature by which scenarios are filtered.List<Report>getReports()Get all reports.StepgetStepFilter()Return the step by which scenarios are filtered.TaggetTagFilter()Get the current tag filter to filter scenario by a specific tag.StringgetTotalDurationString()Return a human-readable time string of the total duration.intgetTotalNumberOfFailedScenarios()Return the number of failed scenarios.intgetTotalNumberOfFailedScenarioWithoutLaterRuns()Return the number of scenarios runs that failed and were either single runs or the last of multiple runs.intgetTotalNumberOfNotLastScenariosRuns()Return the number of scenarios runs that were not the last.intgetTotalNumberOfPassedScenarios()Return the number of passed scenarios.intgetTotalNumberOfScenarios()Return the total scenario count.intgetTotalNumberOfSkippedScenarios()Return the number of skipped scenarios.booleanhasFailedScenarios()Check if there are failed scenarios.booleanhasFailedScenariosNotPassedOnLastRun()Check if there are failed scenarios.booleanhasNotLastRunScenarios()Check if there are scenarios run multiple times.booleanhasPassedScenarios()Check if there are passed scenarios.booleanhasSkippedScenarios()Check if there are skipped scenarios.booleanisExpandPreviousScenarioRuns()This determines whether the not last run elements should be expanded and shown.booleanisGroupPreviousScenarioRuns()This determines whether the scenarios run multiple times should be grouped and the show not last run toggle should be shown.StringreturnEndDateTimeString()Return the human-readable time and date string of the latest scenario end.StringreturnStartDateTimeString()Return the start date and time string of the earliest scenario that was started in the test run.voidsetExpandPreviousScenarioRuns(boolean expandPreviousScenarioRuns)Set whether the not last run elements should be expanded and shown.voidsetFeatureFilter(Feature featureFilter)Set the feature by which scenarios should be filtered.voidsetGroupPreviousScenarioRuns(boolean groupPreviousScenarioRuns)Set whether the scenarios run multiple times should be grouped and the show not last run toggle should be shown.voidsetStepFilter(Step stepFilter)Set the step by which scenarios should be filtered.voidsetTagFilter(Tag tagFilter)Set the current tag filter to filter scenario by a specific tag.-
Methods inherited from class com.trivago.cluecumber.engine.rendering.pages.pojos.pagecollections.PageCollection
getCustomParameters, getDisplayMode, getNavigationLinks, getPageTitle, getReportDetails, hasCustomParameters, isExpandAttachments, isExpandBeforeAfterHooks, isExpandDocStrings, isExpandOutputs, isExpandStepHooks, isExpandSubSections, setCustomParameters, setDisplayMode, setExpandAttachments, setExpandBeforeAfterHooks, setExpandDocStrings, setExpandOutputs, setExpandStepHooks, setExpandSubSections, setNavigationLinks
-
-
-
-
Constructor Detail
-
AllScenariosPageCollection
public AllScenariosPageCollection(String pageTitle)
Constructor.- Parameters:
pageTitle- The page title.
-
-
Method Detail
-
getElementsByFeatureIndex
public List<Element> getElementsByFeatureIndex(int featureIndex)
Get scenarios by feature index.- Parameters:
featureIndex- The feature index.- Returns:
- The list of related
Elementinstances.
-
clearReports
public void clearReports()
Empty report list.
-
addReports
public void addReports(Report[] reportList)
Add reports to the existing report list.- Parameters:
reportList- An array ofReportinstances to add.
-
getTotalNumberOfScenarios
public int getTotalNumberOfScenarios()
Return the total scenario count.- Returns:
- The scenario count.
-
hasFailedScenarios
public boolean hasFailedScenarios()
Check if there are failed scenarios.- Returns:
- true if there are failed scenarios.
-
hasFailedScenariosNotPassedOnLastRun
public boolean hasFailedScenariosNotPassedOnLastRun()
Check if there are failed scenarios.- Returns:
- true if there are failed scenarios.
-
hasPassedScenarios
public boolean hasPassedScenarios()
Check if there are passed scenarios.- Returns:
- true if there are passed scenarios.
-
hasSkippedScenarios
public boolean hasSkippedScenarios()
Check if there are skipped scenarios.- Returns:
- true if there are skipped scenarios.
-
hasNotLastRunScenarios
public boolean hasNotLastRunScenarios()
Check if there are scenarios run multiple times.- Returns:
- true if there are scenarios run multiple times.
-
getTotalNumberOfPassedScenarios
public int getTotalNumberOfPassedScenarios()
Return the number of passed scenarios.- Returns:
- The scenario count.
-
getTotalNumberOfFailedScenarios
public int getTotalNumberOfFailedScenarios()
Return the number of failed scenarios.- Returns:
- The scenario count.
-
getTotalNumberOfFailedScenarioWithoutLaterRuns
public int getTotalNumberOfFailedScenarioWithoutLaterRuns()
Return the number of scenarios runs that failed and were either single runs or the last of multiple runs.- Returns:
- The scenario count.
-
getTotalNumberOfSkippedScenarios
public int getTotalNumberOfSkippedScenarios()
Return the number of skipped scenarios.- Returns:
- The scenario count.
-
getTotalNumberOfNotLastScenariosRuns
public int getTotalNumberOfNotLastScenariosRuns()
Return the number of scenarios runs that were not the last.- Returns:
- The scenario count.
-
getTotalDurationString
public String getTotalDurationString()
Return a human-readable time string of the total duration.- Returns:
- The time string.
-
returnStartDateTimeString
public String returnStartDateTimeString()
Return the start date and time string of the earliest scenario that was started in the test run.- Returns:
- The time string.
-
returnEndDateTimeString
public String returnEndDateTimeString()
Return the human-readable time and date string of the latest scenario end.- Returns:
- The time string.
-
getTagFilter
public Tag getTagFilter()
Get the current tag filter to filter scenario by a specific tag.- Returns:
- The
Tagto filter by.
-
setTagFilter
public void setTagFilter(Tag tagFilter)
Set the current tag filter to filter scenario by a specific tag.- Parameters:
tagFilter- TheTagto filter by.
-
getFeatureFilter
public Feature getFeatureFilter()
Return the feature by which scenarios are filtered.- Returns:
- The
Featureto filter by.
-
setFeatureFilter
public void setFeatureFilter(Feature featureFilter)
Set the feature by which scenarios should be filtered.- Parameters:
featureFilter- TheFeatureto filter by.
-
getStepFilter
public Step getStepFilter()
Return the step by which scenarios are filtered.- Returns:
- The
Stepto filter by.
-
setStepFilter
public void setStepFilter(Step stepFilter)
Set the step by which scenarios should be filtered.- Parameters:
stepFilter- TheStepto filter by.
-
isGroupPreviousScenarioRuns
public boolean isGroupPreviousScenarioRuns()
This determines whether the scenarios run multiple times should be grouped and the show not last run toggle should be shown.- Overrides:
isGroupPreviousScenarioRunsin classPageCollection- Returns:
- true means scenarios should be grouped and toggle should be shown.
-
setGroupPreviousScenarioRuns
public void setGroupPreviousScenarioRuns(boolean groupPreviousScenarioRuns)
Set whether the scenarios run multiple times should be grouped and the show not last run toggle should be shown.- Overrides:
setGroupPreviousScenarioRunsin classPageCollection- Parameters:
groupPreviousScenarioRuns- true means scenarios should be grouped and toggle should be shown.
-
isExpandPreviousScenarioRuns
public boolean isExpandPreviousScenarioRuns()
This determines whether the not last run elements should be expanded and shown.- Overrides:
isExpandPreviousScenarioRunsin classPageCollection- Returns:
- true means it should be expanded.
-
setExpandPreviousScenarioRuns
public void setExpandPreviousScenarioRuns(boolean expandPreviousScenarioRuns)
Set whether the not last run elements should be expanded and shown.- Overrides:
setExpandPreviousScenarioRunsin classPageCollection- Parameters:
expandPreviousScenarioRuns- true means elements should be expanded.
-
clone
public AllScenariosPageCollection clone() throws CloneNotSupportedException
Function to clone theAllScenariosPageCollectionincluding all included data.- Overrides:
clonein classPageCollection- Returns:
- The clone of the
AllScenariosPageCollection - Throws:
CloneNotSupportedException- Thrown if cloning failed.
-
accept
public void accept(PageVisitor visitor) throws CluecumberException
Method to accept aPageVisitor.- Specified by:
acceptin interfaceVisitable- Parameters:
visitor- ThePageVisitorinstance.- Throws:
CluecumberException- thrown on any error.
-
-