3

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

M.P. Korstanje
  • 10,426
  • 3
  • 36
  • 58
novice
  • 43
  • 11

1 Answers1

1

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.
M.P. Korstanje
  • 10,426
  • 3
  • 36
  • 58