Class CluecumberEngine


  • public final class CluecumberEngine
    extends Object
    The main plugin class.
    • Method Detail

      • build

        public void build​(String sourceJsonReportDirectory,
                          String generatedHtmlReportDirectory)
                   throws CluecumberException
        Cluecumber Report start method.
        Parameters:
        sourceJsonReportDirectory - The source directory of Cucumber JSON files.
        generatedHtmlReportDirectory - The target directory of the generated report.
        Throws:
        CluecumberException - When thrown, the plugin execution is stopped.
      • setCustomParameters

        public void setCustomParameters​(LinkedHashMap<String,​String> customParameters)
        Custom parameters to display at the top of the test report.
        Parameters:
        customParameters - A map of custom key value pairs.
      • setCustomParametersFile

        public void setCustomParametersFile​(String customParametersFile)
                                     throws CluecumberException
        Set a file that contains custom parameters as properties.
        Parameters:
        customParametersFile - The path to a properties file.
        Throws:
        CluecumberException - Thrown on any error.
      • setCustomParametersDisplayMode

        public void setCustomParametersDisplayMode​(String customParametersDisplayMode)
        Where to display custom parameters.
        Parameters:
        customParametersDisplayMode - The display mode for custom parameters.
      • setCustomNavigationLinks

        public void setCustomNavigationLinks​(LinkedHashMap<String,​String> customNavigationLinks)
        Custom navigation links to display at the end of the default navigation.
        Parameters:
        customNavigationLinks - A map of custom key value pairs (key is the link name, value is the URL).
      • setFailScenariosOnPendingOrUndefinedSteps

        public void setFailScenariosOnPendingOrUndefinedSteps​(boolean failScenariosOnPendingOrUndefinedSteps)
        Whether to fail scenarios when steps are pending or undefined.
        Parameters:
        failScenariosOnPendingOrUndefinedSteps - On true, it will fail scenarios with pending or undefined steps.
      • setExpandBeforeAfterHooks

        public void setExpandBeforeAfterHooks​(boolean expandBeforeAfterHooks)
        Whether to expand before and after hooks or not.
        Parameters:
        expandBeforeAfterHooks - If true, before and after hooks will be expanded.
      • setExpandStepHooks

        public void setExpandStepHooks​(boolean expandStepHooks)
        Whether to expand step hooks or not.
        Parameters:
        expandStepHooks - If true, step hooks will be expanded.
      • setExpandDocStrings

        public void setExpandDocStrings​(boolean expandDocStrings)
        Whether to expand doc strings or not.
        Parameters:
        expandDocStrings - If true, doc strings will be expanded.
      • setExpandAttachments

        public void setExpandAttachments​(boolean expandAttachments)
        Whether to expand attachments or not.
        Parameters:
        expandAttachments - If true, attachments will be expanded.
      • setCustomCssFile

        public void setCustomCssFile​(String customCss)
                              throws MissingFileException
        Custom CSS file to override default styles.
        Parameters:
        customCss - The path to a CSS file.
        Throws:
        MissingFileException - Thrown if the specified file does not exist.
      • setCustomStatusColorPassed

        public void setCustomStatusColorPassed​(String customStatusColorPassed)
                                        throws WrongOrMissingPropertyException
        Set a custom color for passed scenarios.
        Parameters:
        customStatusColorPassed - A color in hex format.
        Throws:
        WrongOrMissingPropertyException - Thrown if the property is missing or in a wrong format.
      • setCustomStatusColorFailed

        public void setCustomStatusColorFailed​(String customStatusColorFailed)
                                        throws WrongOrMissingPropertyException
        Set a custom color for failed scenarios.
        Parameters:
        customStatusColorFailed - A color in hex format.
        Throws:
        WrongOrMissingPropertyException - Thrown if the property is missing or in a wrong format.
      • setCustomStatusColorSkipped

        public void setCustomStatusColorSkipped​(String customStatusColorSkipped)
                                         throws WrongOrMissingPropertyException
        Set a custom color for skipped scenarios.
        Parameters:
        customStatusColorSkipped - A color in hex format.
        Throws:
        WrongOrMissingPropertyException - Thrown in case of a missing or incompatible property.
      • setCustomPageTitle

        public void setCustomPageTitle​(String customPageTitle)
        Set a custom page tite for the report.
        Parameters:
        customPageTitle - The custom page title.
      • setStartPage

        public void setStartPage​(String startPage)
        Set the start page of the test report that should be directed to.
        Parameters:
        startPage - The name of the start page (referring to Settings.StartPage).