Class Main

java.lang.Object
io.cucumber.core.cli.Main

@API(status=STABLE) public class Main extends Object
Cucumber Main. Runs Cucumber as a CLI.

Options can be provided in by (order of precedence):

  1. Command line arguments
  2. Properties from System.getProperties()
  3. Properties from in System.getenv()
  4. Properties from "cucumber.properties"
For available properties see Constants. For Command line options CommandlineOptions.
  • Constructor Details

    • Main

      public Main()
  • Method Details

    • main

      public static void main(String... argv)
    • run

      public static byte run(String... argv)
      Launches the Cucumber-JVM command line.
      Parameters:
      argv - runtime options. See details in the cucumber.api.cli.Usage.txt resource.
      Returns:
      0 if execution was successful, 1 if it was not (test failures)
    • run

      public static byte run(String[] argv, ClassLoader classLoader)
      Launches the Cucumber-JVM command line.
      Parameters:
      argv - runtime options. See details in the cucumber.api.cli.Usage.txt resource.
      classLoader - classloader used to load the runtime
      Returns:
      0 if execution was successful, 1 if it was not (test failures)