Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop Cucumber runner from printing the details in the console

How to stop Cucumber runner from printing the details in the console ?

String [] argv = new String[]{ 
     "-g"
    ,"components"
    ,"./Features"
  //,"-t","@functional,@regression"
    ,"-n","Validate_login_search_using_sku_id"
};
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();

There is something known as "Monochrome" but not sure how to add that in the argv

like image 827
novice Avatar asked Jan 01 '26 13:01

novice


1 Answers

You can use --plugin null_summary to avoid printing a summary and --monochrome to avoid printing ANSI color escape sequences.

From:

https://github.com/cucumber/cucumber-jvm/blob/master/core/src/main/resources/cucumber/api/cli/USAGE.txt

 -p, --[add-]plugin PLUGIN[:PATH_OR_URL]
                                         Register a plugin.
                                         Built-in formatter PLUGIN types: junit,
                                         html, pretty, progress, json, usage, rerun,
                                         testng. Built-in summary PLUGIN types:
                                         default_summary, null_summary. PLUGIN can
                                         also be a fully qualified class name, allowing
                                         registration of 3rd party plugins.
                                         --add-plugin does not clobber plugins of that 
type defined from a different source.
like image 108
M.P. Korstanje Avatar answered Jan 05 '26 05:01

M.P. Korstanje



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!