Runner { public static Results parallel(Class<?> clazz, int threadCount) { return parallel(clazz, threadCount, null); }  static Builder path(String... paths); static Builder path(List<String> paths); static Results parallel(Class<?> clazz, int threadCount); static Results parallel(Class<?> clazz, int threadCount, String reportDir); static Results parallel(List<String> tags, List<String> paths, int threadCount, String reportDir); static Results parallel(int threadCount, String... tagsOrPaths); static Results parallel(String reportDir, int threadCount, String... tagsOrPaths); static Results parallel(List<String> tags, List<String> paths, String scenarioName,
            List<ExecutionHook> hooks, int threadCount, String reportDir); static Results parallel(List<Resource> resources, int threadCount, String reportDir); static Results parallel(Builder options); static Map<String, Object> runFeature(Feature feature, Map<String, Object> vars, boolean evalKarateConfig); static Map<String, Object> runFeature(File file, Map<String, Object> vars, boolean evalKarateConfig); static Map<String, Object> runFeature(Class relativeTo, String path, Map<String, Object> vars, boolean evalKarateConfig); static Map<String, Object> runFeature(String path, Map<String, Object> vars, boolean evalKarateConfig); static void callAsync(String path, List<String> tags, Map<String, Object> arg, ExecutionHook hook, Consumer<Runnable> system, Runnable next);  }
@Test public void testParallel() { Results results = Runner.parallel(getClass(), 1); assertEquals(2, results.getFailCount()); String pathBase = "target/surefire-reports/com.intuit.karate."; assertTrue(contains(pathBase + "core.scenario.xml", "Then match b == { foo: 'bar'}")); assertTrue(contains(pathBase + "core.outline.xml", "Then assert a == 55")); assertTrue(contains(pathBase + "multi-scenario.xml", "Then assert a != 2")); assertTrue(contains(pathBase + "multi-scenario-fail.xml", "Then assert a != 2 ........................................................ passed")); assertEquals(2, results.getFailedMap().size()); assertTrue(results.getFailedMap().keySet().contains("com.intuit.karate.no-scenario-name")); assertTrue(results.getFailedMap().keySet().contains("com.intuit.karate.multi-scenario-fail")); }