Table of Contents
utilities for karate dsl testing includes java methods and karate functions
<groupId>io.github.ericdriggs</groupId>
<artifactId>karate-test-utils</artifactId>
<version>0.0.1-SNAPSHOT</version>
Generates a coverage report based in json format n karate.log and openapi swagger json spec report: karate-coverage.json
KarateOpenApiCoverageGenerator karateOpenApiCoverageGenerator = new KarateOpenApiCoverageGenerator()
.setOpenApiJsonUrl("https://user:[email protected]/v2/api-docs")
.setOpenApiJsonUserPass(Collections.singletonMap("username1","password1"))
.setKarateLogPath("src/test/resources/coverage/foo.log")
.setSkipPathRegexes(Arrays.asList(".*actuator.*", ".*internal.*", ".*health_check.*"));
KarateOpenApiCoverageReport karateOpenApiCoverageReport = karateOpenApiCoverageGenerator.generateAndSave();
KarateOpenApiCoverageGenerator karateOpenApiCoverageGenerator = new KarateOpenApiCoverageGenerator()
.setOpenApiJsonFilePath("src/test/resources/coverage/user-swagger2.json")
.setKarateLogPath("src/test/resources/coverage/user.log");
KarateOpenApiCoverageReport karateOpenApiCoverageReport = karateOpenApiCoverageGenerator.generateAndSave();