Skip to content

ericdriggs/karate-test-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

karate-test-util

utilities for karate dsl testing includes java methods and karate functions

version

<groupId>io.github.ericdriggs</groupId>
<artifactId>karate-test-utils</artifactId>
<version>0.0.1-SNAPSHOT</version>

karate coverage report

purpose

Generates a coverage report based in json format n karate.log and openapi swagger json spec report: karate-coverage.json

Usage with OpenApi Url

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();

Usage with OpenApi as local resource (prefer url to this)

KarateOpenApiCoverageGenerator karateOpenApiCoverageGenerator = new KarateOpenApiCoverageGenerator()
  .setOpenApiJsonFilePath("src/test/resources/coverage/user-swagger2.json")
  .setKarateLogPath("src/test/resources/coverage/user.log");

KarateOpenApiCoverageReport karateOpenApiCoverageReport = karateOpenApiCoverageGenerator.generateAndSave();

About

Test utilities for karate dsl testing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published