Class Runner

java.lang.Object
com.intuit.karate.Runner

@Deprecated(since="2.0", forRemoval=true) public final class Runner extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Use Runner instead. This class will be removed in a future release.
V1 compatibility shim for Runner.

This class provides backward compatibility for code written against Karate v1. Migrate to Runner for new code.

  • Method Details

    • path

      @Deprecated(since="2.0", forRemoval=true) public static Runner.Builder path(String... paths)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Start building a test run with one or more paths.
    • path

      @Deprecated(since="2.0", forRemoval=true) public static Runner.Builder path(List<String> paths)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Runner.path(List) instead.
      Start building a test run with a list of paths.
    • builder

      @Deprecated(since="2.0", forRemoval=true) public static Runner.Builder builder()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Runner.builder() instead.
      Get a new builder instance.
    • runFeature

      @Deprecated(since="2.0", forRemoval=true) public static Map<String,Object> runFeature(Class<?> relativeTo, String path, Map<String,Object> arg, boolean evalKarateConfig)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use Runner.runFeature(String, Map) with a classpath: prefixed path instead.
      Execute a single feature with pre-defined variables.

      V1 signature that converts the Class-relative path to a classpath resource path.

      Parameters:
      relativeTo - the class to resolve the path relative to
      path - the feature file path relative to the class
      arg - variables to inject into the feature
      evalKarateConfig - ignored in v2 (config is always evaluated)
      Returns:
      the result variables from the last executed scenario
    • runFeature

      @Deprecated(since="2.0", forRemoval=true) public static Map<String,Object> runFeature(String path, Map<String,Object> arg)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute a single feature with pre-defined variables using a classpath path.
    • runFeature

      @Deprecated(since="2.0", forRemoval=true) public static Map<String,Object> runFeature(String path, Map<String,Object> arg, boolean evalKarateConfig)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Execute a single feature with pre-defined variables using a classpath path.
      Parameters:
      path - the feature file path
      arg - variables to inject into the feature
      evalKarateConfig - ignored in v2 (config is always evaluated)
      Returns:
      the result variables from the last executed scenario