Showing preview only (3,454K chars total). Download the full file or copy to clipboard to get everything.
Repository: karatelabs/karate
Branch: master
Commit: c07caae8b5fa
Files: 1264
Total size: 3.0 MB
Directory structure:
gitextract_0ovktbaz/
├── .github/
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── FUNDING.yml
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ ├── dependabot.yml
│ └── workflows/
│ ├── codeql.yml
│ ├── delete-workflow-runs.yml
│ ├── jdk-compat.yml
│ ├── maven-build.yml
│ └── maven-release.yml
├── .gitignore
├── LICENSE
├── README.md
├── SECURITY.md
├── _config.yml
├── _includes/
│ ├── nav.html
│ └── toc.html
├── build-docker.sh
├── examples/
│ ├── README.md
│ ├── consumer-driven-contracts/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── payment-consumer/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ └── java/
│ │ │ │ └── payment/
│ │ │ │ └── consumer/
│ │ │ │ └── Consumer.java
│ │ │ └── test/
│ │ │ └── java/
│ │ │ ├── logback-test.xml
│ │ │ └── payment/
│ │ │ └── consumer/
│ │ │ ├── ConsumerIntegrationAgainstMockTest.java
│ │ │ └── ConsumerIntegrationTest.java
│ │ ├── payment-producer/
│ │ │ ├── pom.xml
│ │ │ └── src/
│ │ │ ├── main/
│ │ │ │ └── java/
│ │ │ │ └── payment/
│ │ │ │ └── producer/
│ │ │ │ ├── Payment.java
│ │ │ │ ├── PaymentService.java
│ │ │ │ └── ServerStartedInitializingBean.java
│ │ │ └── test/
│ │ │ └── java/
│ │ │ ├── karate-config.js
│ │ │ ├── logback-test.xml
│ │ │ └── payment/
│ │ │ └── producer/
│ │ │ ├── contract/
│ │ │ │ ├── PaymentContractTest.java
│ │ │ │ └── payment-contract.feature
│ │ │ └── mock/
│ │ │ ├── PaymentContractAgainstMockTest.java
│ │ │ ├── payment-mock.feature
│ │ │ └── test.feature
│ │ └── pom.xml
│ ├── gatling/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── build.gradle
│ │ ├── pom.xml
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ ├── karate-config.js
│ │ ├── logback-test.xml
│ │ └── mock/
│ │ ├── CatsGatlingSimulation.scala
│ │ ├── CatsKarateSimulation.scala
│ │ ├── MockUtils.java
│ │ ├── cats-create.feature
│ │ ├── cats-delete-one.feature
│ │ ├── cats-delete.feature
│ │ ├── custom-rpc.feature
│ │ ├── feeder.feature
│ │ └── mock.feature
│ ├── image-comparison/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ ├── karate-config.js
│ │ ├── logback-test.xml
│ │ └── ui/
│ │ ├── 1_establish_baseline.feature
│ │ ├── 2_compare_baseline.feature
│ │ ├── 3_custom_rebase.feature
│ │ ├── 4_generic_rebase.feature
│ │ ├── 5_custom_config.feature
│ │ ├── 6_outline.feature
│ │ ├── 7_api.feature
│ │ ├── ImageComparisonRunner.java
│ │ ├── MockRunner.java
│ │ ├── html/
│ │ │ └── index.html
│ │ └── screenshots/
│ │ └── config/
│ │ ├── loaded_phone.json
│ │ ├── loaded_tablet.json
│ │ ├── loading_phone.json
│ │ └── loading_tablet.json
│ ├── mobile-test/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ ├── android/
│ │ │ ├── AndroidTest.java
│ │ │ └── android.feature
│ │ ├── karate-config.js
│ │ └── logback-test.xml
│ ├── profiling-test/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ ├── karate-config.js
│ │ ├── logback-test.xml
│ │ └── perf/
│ │ ├── Main.java
│ │ ├── TestSimulation.scala
│ │ ├── TestUtils.java
│ │ ├── called.feature
│ │ ├── main.feature
│ │ └── mock.feature
│ ├── robot-test/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ ├── karate-config.js
│ │ ├── logback-test.xml
│ │ ├── mac/
│ │ │ ├── ChromeRunner.java
│ │ │ └── chrome.feature
│ │ └── win/
│ │ ├── CalcRunner.java
│ │ └── calc.feature
│ ├── ui-test/
│ │ ├── README.md
│ │ ├── pom.xml
│ │ └── src/
│ │ └── test/
│ │ └── java/
│ │ ├── logback-test.xml
│ │ └── ui/
│ │ ├── MockRunner.java
│ │ ├── UiRunner.java
│ │ ├── html/
│ │ │ ├── index.html
│ │ │ ├── karate.js
│ │ │ └── page-01.html
│ │ └── test.feature
│ └── zip-release/
│ └── src/
│ └── demo/
│ ├── api/
│ │ ├── httpbin.feature
│ │ └── users.feature
│ ├── mock/
│ │ ├── cats-mock.feature
│ │ ├── cats-test.feature
│ │ └── cats.html
│ ├── robot/
│ │ ├── calc-old.feature
│ │ └── calc.feature
│ └── web/
│ └── google.feature
├── jbang-catalog.json
├── karate-archetype/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── resources/
│ ├── META-INF/
│ │ └── maven/
│ │ └── archetype-metadata.xml
│ └── archetype-resources/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ └── test/
│ └── java/
│ ├── examples/
│ │ ├── ExamplesTest.java
│ │ └── users/
│ │ ├── UsersRunner.java
│ │ └── users.feature
│ ├── karate-config.js
│ └── logback-test.xml
├── karate-core/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── antlr4/
│ │ │ └── com/
│ │ │ └── intuit/
│ │ │ └── karate/
│ │ │ └── core/
│ │ │ ├── KarateLexer.g4
│ │ │ └── KarateParser.g4
│ │ └── java/
│ │ ├── com/
│ │ │ └── intuit/
│ │ │ └── karate/
│ │ │ ├── Actions.java
│ │ │ ├── Constants.java
│ │ │ ├── FileUtils.java
│ │ │ ├── Http.java
│ │ │ ├── ImageComparison.java
│ │ │ ├── Json.java
│ │ │ ├── JsonUtils.java
│ │ │ ├── KarateException.java
│ │ │ ├── LogAppender.java
│ │ │ ├── Logger.java
│ │ │ ├── Main.java
│ │ │ ├── Match.java
│ │ │ ├── MatchOperation.java
│ │ │ ├── MatchOperator.java
│ │ │ ├── MatchStep.java
│ │ │ ├── PerfContext.java
│ │ │ ├── PerfHook.java
│ │ │ ├── Results.java
│ │ │ ├── Runner.java
│ │ │ ├── RuntimeHook.java
│ │ │ ├── ScenarioActions.java
│ │ │ ├── StringUtils.java
│ │ │ ├── Suite.java
│ │ │ ├── XmlUtils.java
│ │ │ ├── core/
│ │ │ │ ├── Action.java
│ │ │ │ ├── AfterHookType.java
│ │ │ │ ├── AssignType.java
│ │ │ │ ├── AutoDef.java
│ │ │ │ ├── Background.java
│ │ │ │ ├── Channel.java
│ │ │ │ ├── ChannelFactory.java
│ │ │ │ ├── Config.java
│ │ │ │ ├── Embed.java
│ │ │ │ ├── ExamplesTable.java
│ │ │ │ ├── Feature.java
│ │ │ │ ├── FeatureCall.java
│ │ │ │ ├── FeatureParser.java
│ │ │ │ ├── FeatureResult.java
│ │ │ │ ├── FeatureRuntime.java
│ │ │ │ ├── FeatureSection.java
│ │ │ │ ├── MockHandler.java
│ │ │ │ ├── MockInterceptor.java
│ │ │ │ ├── MockServer.java
│ │ │ │ ├── ParallelProcessor.java
│ │ │ │ ├── ParserErrorListener.java
│ │ │ │ ├── PerfEvent.java
│ │ │ │ ├── Plugin.java
│ │ │ │ ├── PluginFactory.java
│ │ │ │ ├── Result.java
│ │ │ │ ├── RuntimeHookFactory.java
│ │ │ │ ├── Scenario.java
│ │ │ │ ├── ScenarioBridge.java
│ │ │ │ ├── ScenarioCall.java
│ │ │ │ ├── ScenarioEngine.java
│ │ │ │ ├── ScenarioFileReader.java
│ │ │ │ ├── ScenarioIterator.java
│ │ │ │ ├── ScenarioOutline.java
│ │ │ │ ├── ScenarioOutlineResult.java
│ │ │ │ ├── ScenarioResult.java
│ │ │ │ ├── ScenarioRuntime.java
│ │ │ │ ├── Step.java
│ │ │ │ ├── StepResult.java
│ │ │ │ ├── StepRuntime.java
│ │ │ │ ├── SyncExecutorService.java
│ │ │ │ ├── Table.java
│ │ │ │ ├── Tag.java
│ │ │ │ ├── TagResults.java
│ │ │ │ ├── Tags.java
│ │ │ │ ├── TimelineResults.java
│ │ │ │ ├── Variable.java
│ │ │ │ └── When.java
│ │ │ ├── driver/
│ │ │ │ ├── DevToolsDriver.java
│ │ │ │ ├── DevToolsMessage.java
│ │ │ │ ├── DevToolsMock.java
│ │ │ │ ├── DevToolsWait.java
│ │ │ │ ├── DockerTarget.java
│ │ │ │ ├── Driver.java
│ │ │ │ ├── DriverElement.java
│ │ │ │ ├── DriverMouse.java
│ │ │ │ ├── DriverOptions.java
│ │ │ │ ├── DriverRunner.java
│ │ │ │ ├── Element.java
│ │ │ │ ├── ElementFinder.java
│ │ │ │ ├── Finder.java
│ │ │ │ ├── Frame.java
│ │ │ │ ├── Input.java
│ │ │ │ ├── Key.java
│ │ │ │ ├── Keys.java
│ │ │ │ ├── MissingElement.java
│ │ │ │ ├── MissingFinder.java
│ │ │ │ ├── Mouse.java
│ │ │ │ ├── Target.java
│ │ │ │ ├── WebDriver.java
│ │ │ │ ├── appium/
│ │ │ │ │ ├── AndroidDriver.java
│ │ │ │ │ ├── AppiumDriver.java
│ │ │ │ │ ├── IosDriver.java
│ │ │ │ │ └── MobileDriverOptions.java
│ │ │ │ ├── chrome/
│ │ │ │ │ ├── Chrome.java
│ │ │ │ │ └── ChromeWebDriver.java
│ │ │ │ ├── firefox/
│ │ │ │ │ └── GeckoWebDriver.java
│ │ │ │ ├── microsoft/
│ │ │ │ │ ├── EdgeChromium.java
│ │ │ │ │ ├── IeWebDriver.java
│ │ │ │ │ ├── MsEdgeDriver.java
│ │ │ │ │ ├── MsWebDriver.java
│ │ │ │ │ └── WinAppDriver.java
│ │ │ │ ├── playwright/
│ │ │ │ │ ├── PlaywrightDriver.java
│ │ │ │ │ ├── PlaywrightMessage.java
│ │ │ │ │ └── PlaywrightWait.java
│ │ │ │ └── safari/
│ │ │ │ └── SafariWebDriver.java
│ │ │ ├── graal/
│ │ │ │ ├── JsArray.java
│ │ │ │ ├── JsEngine.java
│ │ │ │ ├── JsFunction.java
│ │ │ │ ├── JsLambda.java
│ │ │ │ ├── JsList.java
│ │ │ │ ├── JsMap.java
│ │ │ │ ├── JsValue.java
│ │ │ │ ├── JsXml.java
│ │ │ │ └── Methods.java
│ │ │ ├── http/
│ │ │ │ ├── ApacheHttpClient.java
│ │ │ │ ├── ArmeriaHttpClient.java
│ │ │ │ ├── AwsLambdaHandler.java
│ │ │ │ ├── Cookies.java
│ │ │ │ ├── CustomHttpRequestRetryHandler.java
│ │ │ │ ├── GenericHttpHeaderTracking.java
│ │ │ │ ├── HttpClient.java
│ │ │ │ ├── HttpClientFactory.java
│ │ │ │ ├── HttpConstants.java
│ │ │ │ ├── HttpHeaderTracking.java
│ │ │ │ ├── HttpLogModifier.java
│ │ │ │ ├── HttpLogger.java
│ │ │ │ ├── HttpRequest.java
│ │ │ │ ├── HttpRequestBuilder.java
│ │ │ │ ├── HttpServer.java
│ │ │ │ ├── HttpServerHandler.java
│ │ │ │ ├── HttpUtils.java
│ │ │ │ ├── JvmSessionStore.java
│ │ │ │ ├── LenientTrustManager.java
│ │ │ │ ├── MultiPartBuilder.java
│ │ │ │ ├── ProxyClientHandler.java
│ │ │ │ ├── ProxyContext.java
│ │ │ │ ├── ProxyRemoteHandler.java
│ │ │ │ ├── ProxyRequest.java
│ │ │ │ ├── ProxyResponse.java
│ │ │ │ ├── ProxyServer.java
│ │ │ │ ├── RedirectException.java
│ │ │ │ ├── Request.java
│ │ │ │ ├── RequestCycle.java
│ │ │ │ ├── RequestFilter.java
│ │ │ │ ├── RequestHandler.java
│ │ │ │ ├── ResourceType.java
│ │ │ │ ├── Response.java
│ │ │ │ ├── ResponseBuilder.java
│ │ │ │ ├── ResponseFilter.java
│ │ │ │ ├── ServerConfig.java
│ │ │ │ ├── ServerContext.java
│ │ │ │ ├── ServerHandler.java
│ │ │ │ ├── Session.java
│ │ │ │ ├── SessionStore.java
│ │ │ │ ├── SslContextFactory.java
│ │ │ │ ├── WebSocketClient.java
│ │ │ │ ├── WebSocketClientHandler.java
│ │ │ │ ├── WebSocketListener.java
│ │ │ │ ├── WebSocketOptions.java
│ │ │ │ ├── WebSocketProxyHandler.java
│ │ │ │ ├── WebSocketProxyServer.java
│ │ │ │ ├── WebSocketServerBase.java
│ │ │ │ └── cert/
│ │ │ │ ├── SelfSignedCertGenerator.java
│ │ │ │ └── ThreadLocalInsecureRandom.java
│ │ │ ├── report/
│ │ │ │ ├── Report.java
│ │ │ │ ├── ReportUtils.java
│ │ │ │ ├── Resemble.js
│ │ │ │ ├── SuiteReports.java
│ │ │ │ ├── karate-feature.html
│ │ │ │ ├── karate-leftnav.html
│ │ │ │ ├── karate-posthog.html
│ │ │ │ ├── karate-report.css
│ │ │ │ ├── karate-report.js
│ │ │ │ ├── karate-step.html
│ │ │ │ ├── karate-summary.html
│ │ │ │ ├── karate-tags.html
│ │ │ │ └── karate-timeline.html
│ │ │ ├── resource/
│ │ │ │ ├── FileResource.java
│ │ │ │ ├── JarResource.java
│ │ │ │ ├── MemoryResource.java
│ │ │ │ ├── Resource.java
│ │ │ │ ├── ResourceResolver.java
│ │ │ │ └── ResourceUtils.java
│ │ │ ├── shell/
│ │ │ │ ├── Command.java
│ │ │ │ ├── Console.java
│ │ │ │ ├── FileLogAppender.java
│ │ │ │ ├── StopListenerThread.java
│ │ │ │ ├── Stoppable.java
│ │ │ │ └── StringLogAppender.java
│ │ │ └── template/
│ │ │ ├── KaHxAnyAttrProcessor.java
│ │ │ ├── KaHxMethodAttrProcessor.java
│ │ │ ├── KaHxValsAttrProcessor.java
│ │ │ ├── KaLinkAttrProcessor.java
│ │ │ ├── KaScriptAttrProcessor.java
│ │ │ ├── KaScriptElemProcessor.java
│ │ │ ├── KaSetElemProcessor.java
│ │ │ ├── KarateAttributeTagProcessor.java
│ │ │ ├── KarateEachTagProcessor.java
│ │ │ ├── KarateEngineContext.java
│ │ │ ├── KarateExpression.java
│ │ │ ├── KarateScriptDialect.java
│ │ │ ├── KarateServerDialect.java
│ │ │ ├── KarateStandardDialect.java
│ │ │ ├── KarateTemplateEngine.java
│ │ │ ├── KarateTemplateResource.java
│ │ │ ├── KarateWithTagProcessor.java
│ │ │ ├── ResourceHtmlTemplateResolver.java
│ │ │ ├── ServerHtmlTemplateResolver.java
│ │ │ ├── StringHtmlTemplateResolver.java
│ │ │ ├── StringTemplateResource.java
│ │ │ ├── TemplateContext.java
│ │ │ └── TemplateUtils.java
│ │ ├── karate-meta.properties
│ │ ├── logback-fatjar.xml
│ │ ├── logback-nofile.xml
│ │ └── nodebug/
│ │ └── io/
│ │ └── karatelabs/
│ │ └── LenientSslConnectionSocketFactory.java
│ └── test/
│ ├── java/
│ │ ├── com/
│ │ │ └── intuit/
│ │ │ └── karate/
│ │ │ ├── ComplexPojo.java
│ │ │ ├── FileUtilsTest.java
│ │ │ ├── ImageComparisonTest.java
│ │ │ ├── JsonTest.java
│ │ │ ├── JsonUtilsTest.java
│ │ │ ├── MainTest.java
│ │ │ ├── MatchStepTest.java
│ │ │ ├── MatchTest.java
│ │ │ ├── SimplePojo.java
│ │ │ ├── StringUtilsTest.java
│ │ │ ├── SystemPropertiesTest.java
│ │ │ ├── TestUtils.java
│ │ │ ├── ThreadCountTest.java
│ │ │ ├── XmlUtilsTest.java
│ │ │ ├── core/
│ │ │ │ ├── CallResponseTest.java
│ │ │ │ ├── Cat.java
│ │ │ │ ├── ComplexPojo.java
│ │ │ │ ├── DummyClient.java
│ │ │ │ ├── DummyUiTest.java
│ │ │ │ ├── FeatureFailRunner.java
│ │ │ │ ├── FeatureResultTest.java
│ │ │ │ ├── FeatureRuntimeTest.java
│ │ │ │ ├── HttpMockHandlerRunner.java
│ │ │ │ ├── HttpMockHandlerTest.java
│ │ │ │ ├── JsStubGenerator.java
│ │ │ │ ├── KarateHttpMockHandlerTest.java
│ │ │ │ ├── KarateMockHandlerTest.java
│ │ │ │ ├── MockClient.java
│ │ │ │ ├── MockHandlerTest.java
│ │ │ │ ├── MockUtils.java
│ │ │ │ ├── PaymentsMockRunner.java
│ │ │ │ ├── PaymentsRunner.java
│ │ │ │ ├── PerfHookTest.java
│ │ │ │ ├── PrintTest.java
│ │ │ │ ├── ScenarioBridgeTest.java
│ │ │ │ ├── ScenarioEngineTest.java
│ │ │ │ ├── ScenarioOutlineResultTest.java
│ │ │ │ ├── ScenarioRuntimeTest.java
│ │ │ │ ├── SimplePojo.java
│ │ │ │ ├── StaticUtils.java
│ │ │ │ ├── StepRuntimeTest.java
│ │ │ │ ├── TagsTest.java
│ │ │ │ ├── TestLogAppender.java
│ │ │ │ ├── VariableTest.java
│ │ │ │ ├── abort.feature
│ │ │ │ ├── align.feature
│ │ │ │ ├── big-decimal.feature
│ │ │ │ ├── call-arg-called.feature
│ │ │ │ ├── call-arg-common.feature
│ │ │ │ ├── call-arg-null-called.feature
│ │ │ │ ├── call-arg-null.feature
│ │ │ │ ├── call-arg.feature
│ │ │ │ ├── call-by-tag-called.feature
│ │ │ │ ├── call-by-tag.feature
│ │ │ │ ├── call-feature-called.feature
│ │ │ │ ├── call-feature.feature
│ │ │ │ ├── call-js-called.feature
│ │ │ │ ├── call-js.feature
│ │ │ │ ├── call-jsonpath-called.feature
│ │ │ │ ├── call-jsonpath.feature
│ │ │ │ ├── call-response-called.feature
│ │ │ │ ├── call-response-mock.feature
│ │ │ │ ├── call-response.feature
│ │ │ │ ├── call-self.feature
│ │ │ │ ├── call-single-fail-called.feature
│ │ │ │ ├── call-single-fail.feature
│ │ │ │ ├── call-single-tag-called.feature
│ │ │ │ ├── call-single-tag.feature
│ │ │ │ ├── callSingleFeature.feature
│ │ │ │ ├── callSingleScenario.feature
│ │ │ │ ├── called1.feature
│ │ │ │ ├── called2.feature
│ │ │ │ ├── called3-caller1.js
│ │ │ │ ├── called3-caller2.js
│ │ │ │ ├── called3.js
│ │ │ │ ├── callonce-bg-called.feature
│ │ │ │ ├── callonce-bg-outline.feature
│ │ │ │ ├── callonce-bg.feature
│ │ │ │ ├── callonce-config-called.feature
│ │ │ │ ├── callonce-config.feature
│ │ │ │ ├── callonce-global-called.feature
│ │ │ │ ├── callonce-global.feature
│ │ │ │ ├── configure-in-js.feature
│ │ │ │ ├── copy-called-nested.feature
│ │ │ │ ├── copy-called-overwrite.feature
│ │ │ │ ├── copy-called.feature
│ │ │ │ ├── copy.feature
│ │ │ │ ├── csv.feature
│ │ │ │ ├── data.json
│ │ │ │ ├── dummy-ui-google.feature
│ │ │ │ ├── dummy.feature
│ │ │ │ ├── eval-and-set.feature
│ │ │ │ ├── eval-assign.feature
│ │ │ │ ├── exec.feature
│ │ │ │ ├── extract.feature
│ │ │ │ ├── extract.html
│ │ │ │ ├── fail-api.feature
│ │ │ │ ├── fail-js.feature
│ │ │ │ ├── fail-tag-failure.feature
│ │ │ │ ├── fail-tag.feature
│ │ │ │ ├── fail1.feature
│ │ │ │ ├── feature-result-called.feature
│ │ │ │ ├── feature-result-cucumber.json
│ │ │ │ ├── feature-result.feature
│ │ │ │ ├── feature-result.json
│ │ │ │ ├── features/
│ │ │ │ │ ├── RemainingFeaturesTest.java
│ │ │ │ │ ├── feature1.feature
│ │ │ │ │ ├── feature2.feature
│ │ │ │ │ └── karate-config.js
│ │ │ │ ├── fork-listener.feature
│ │ │ │ ├── fork.feature
│ │ │ │ ├── ignore-step-failure.feature
│ │ │ │ ├── increment.js
│ │ │ │ ├── js-arrays-products.json
│ │ │ │ ├── js-arrays.feature
│ │ │ │ ├── js-map-repeat.feature
│ │ │ │ ├── jscall/
│ │ │ │ │ ├── JsCallTest.java
│ │ │ │ │ ├── JsCallonceTest.java
│ │ │ │ │ ├── dummy.feature
│ │ │ │ │ ├── js-call.feature
│ │ │ │ │ ├── js-called.feature
│ │ │ │ │ ├── js-callonce.feature
│ │ │ │ │ ├── karate-config.js
│ │ │ │ │ └── utils.feature
│ │ │ │ ├── jscall2/
│ │ │ │ │ ├── JsCall2Test.java
│ │ │ │ │ ├── all.feature
│ │ │ │ │ ├── call-once.feature
│ │ │ │ │ ├── call-single.feature
│ │ │ │ │ ├── call.feature
│ │ │ │ │ ├── karate-config.js
│ │ │ │ │ ├── local.feature
│ │ │ │ │ └── mock.feature
│ │ │ │ ├── jsread/
│ │ │ │ │ ├── js-read-2.feature
│ │ │ │ │ ├── js-read-2.json
│ │ │ │ │ ├── js-read-3.feature
│ │ │ │ │ ├── js-read-3.json
│ │ │ │ │ ├── js-read-4.feature
│ │ │ │ │ ├── js-read-4.json
│ │ │ │ │ ├── js-read-5.json
│ │ │ │ │ ├── js-read-called-2.feature
│ │ │ │ │ ├── js-read-called-3.feature
│ │ │ │ │ ├── js-read-called.feature
│ │ │ │ │ ├── js-read-reuse-2.feature
│ │ │ │ │ ├── js-read-reuse-only-background.feature
│ │ │ │ │ ├── js-read-reuse.feature
│ │ │ │ │ ├── js-read.feature
│ │ │ │ │ └── js-read.json
│ │ │ │ ├── karate-config-callonce.js
│ │ │ │ ├── karate-config-callsingle.js
│ │ │ │ ├── karate-config-callsingletag.js
│ │ │ │ ├── karate-config-csfail.js
│ │ │ │ ├── karate-config-dev.js
│ │ │ │ ├── karate-config-fn.feature
│ │ │ │ ├── karate-config-frombase.feature
│ │ │ │ ├── karate-config-frombase.js
│ │ │ │ ├── karate-config-getscenario.feature
│ │ │ │ ├── karate-config-getscenario.js
│ │ │ │ ├── karate-config-utils.feature
│ │ │ │ ├── karate-config.js
│ │ │ │ ├── karate-get-called.feature
│ │ │ │ ├── karate-get.feature
│ │ │ │ ├── lower-case.feature
│ │ │ │ ├── match-each-magic-variables.feature
│ │ │ │ ├── match-step.feature
│ │ │ │ ├── mock/
│ │ │ │ │ ├── MockRunner.java
│ │ │ │ │ ├── MockSslTest.java
│ │ │ │ │ ├── MockTest.java
│ │ │ │ │ ├── SimpleMockRunner.java
│ │ │ │ │ ├── _mock.feature
│ │ │ │ │ ├── _simple.feature
│ │ │ │ │ ├── binary.feature
│ │ │ │ │ ├── brotli.feature
│ │ │ │ │ ├── call.feature
│ │ │ │ │ ├── called.feature
│ │ │ │ │ ├── cookies.feature
│ │ │ │ │ ├── delete.feature
│ │ │ │ │ ├── download.feature
│ │ │ │ │ ├── form.feature
│ │ │ │ │ ├── german.feature
│ │ │ │ │ ├── headers.feature
│ │ │ │ │ ├── hello-data-driven.feature
│ │ │ │ │ ├── hello-world.feature
│ │ │ │ │ ├── html.feature
│ │ │ │ │ ├── invalid-cookie.feature
│ │ │ │ │ ├── json-bad.feature
│ │ │ │ │ ├── json-order-mock-test.feature
│ │ │ │ │ ├── json-order-mock.feature
│ │ │ │ │ ├── karate-config.js
│ │ │ │ │ ├── malformed.feature
│ │ │ │ │ ├── malformed.txt
│ │ │ │ │ ├── multi-params.feature
│ │ │ │ │ ├── no-headers.feature
│ │ │ │ │ ├── no-match.feature
│ │ │ │ │ ├── param-commas.feature
│ │ │ │ │ ├── patch.feature
│ │ │ │ │ ├── test.xlsx
│ │ │ │ │ ├── upload.feature
│ │ │ │ │ ├── url-encoding.feature
│ │ │ │ │ └── white-space.feature
│ │ │ │ ├── not-equals.feature
│ │ │ │ ├── ntlm-authentication.feature
│ │ │ │ ├── outline-background.feature
│ │ │ │ ├── outline-cat.json
│ │ │ │ ├── outline-cats.json
│ │ │ │ ├── outline-config-js.feature
│ │ │ │ ├── outline-csv.csv
│ │ │ │ ├── outline-csv.feature
│ │ │ │ ├── outline-dynamic-fail.feature
│ │ │ │ ├── outline-dynamic.feature
│ │ │ │ ├── outline-generator.feature
│ │ │ │ ├── outline-setup-once.feature
│ │ │ │ ├── outline.feature
│ │ │ │ ├── parajava/
│ │ │ │ │ ├── ParallelJavaTest.java
│ │ │ │ │ ├── karate-config.js
│ │ │ │ │ ├── parallel-java1.feature
│ │ │ │ │ ├── parallel-java2.feature
│ │ │ │ │ └── setup.feature
│ │ │ │ ├── parallel/
│ │ │ │ │ ├── Hello.java
│ │ │ │ │ ├── HelloTest.java
│ │ │ │ │ ├── ParallelCsvTest.java
│ │ │ │ │ ├── ParallelOutlineTest.java
│ │ │ │ │ ├── ParallelTest.java
│ │ │ │ │ ├── call-once-from-feature.feature
│ │ │ │ │ ├── call-single-from-config.feature
│ │ │ │ │ ├── call-single-from-config2.feature
│ │ │ │ │ ├── call-single-from-config3.js
│ │ │ │ │ ├── call-single-from-feature.feature
│ │ │ │ │ ├── called.feature
│ │ │ │ │ ├── cookies.js
│ │ │ │ │ ├── data.csv
│ │ │ │ │ ├── headers.js
│ │ │ │ │ ├── hello.feature
│ │ │ │ │ ├── karate-base.js
│ │ │ │ │ ├── karate-config.js
│ │ │ │ │ ├── mock.feature
│ │ │ │ │ ├── parallel-csv.feature
│ │ │ │ │ ├── parallel-outline-1.feature
│ │ │ │ │ ├── parallel-outline-2.feature
│ │ │ │ │ ├── parallel-outline-call-api.feature
│ │ │ │ │ └── parallel.feature
│ │ │ │ ├── parasimple/
│ │ │ │ │ ├── ParallelOutlineSimpleTest.java
│ │ │ │ │ ├── headers.feature
│ │ │ │ │ ├── headers.js
│ │ │ │ │ ├── karate-config.js
│ │ │ │ │ └── parallel-outline-simple.feature
│ │ │ │ ├── parser/
│ │ │ │ │ ├── FeatureParserTest.java
│ │ │ │ │ ├── test-comments.feature
│ │ │ │ │ ├── test-def-docstring.feature
│ │ │ │ │ ├── test-edge-cases.feature
│ │ │ │ │ ├── test-empty-background.feature
│ │ │ │ │ ├── test-empty-first-line1.feature
│ │ │ │ │ ├── test-empty-first-line2.feature
│ │ │ │ │ ├── test-empty-first-line3.feature
│ │ │ │ │ ├── test-empty.feature.txt
│ │ │ │ │ ├── test-error.feature
│ │ │ │ │ ├── test-feature-header-only.feature
│ │ │ │ │ ├── test-hide.feature
│ │ │ │ │ ├── test-ignore-feature.feature
│ │ │ │ │ ├── test-ignore-scenario.feature
│ │ │ │ │ ├── test-outline-dynamic.feature
│ │ │ │ │ ├── test-outline-examples-tags.feature
│ │ │ │ │ ├── test-outline-name-js.feature
│ │ │ │ │ ├── test-outline-name.feature
│ │ │ │ │ ├── test-scenario-description.feature
│ │ │ │ │ ├── test-set-table.feature
│ │ │ │ │ ├── test-simple-background.feature
│ │ │ │ │ ├── test-simple.feature
│ │ │ │ │ ├── test-table-pipe.feature
│ │ │ │ │ └── test-tags-multiline.feature
│ │ │ │ ├── payments-mock.feature
│ │ │ │ ├── payments.feature
│ │ │ │ ├── perf-mock.feature
│ │ │ │ ├── perf.feature
│ │ │ │ ├── print.feature
│ │ │ │ ├── read-expressions.json
│ │ │ │ ├── read-expressions.yml
│ │ │ │ ├── read-properties.feature
│ │ │ │ ├── read-properties.properties
│ │ │ │ ├── replace.feature
│ │ │ │ ├── retry/
│ │ │ │ │ ├── RetryTest.java
│ │ │ │ │ ├── retry-with-setup.feature
│ │ │ │ │ └── test.feature
│ │ │ │ ├── runner/
│ │ │ │ │ ├── FeatureResultTest.java
│ │ │ │ │ ├── FeatureReuseTest.java
│ │ │ │ │ ├── NoopDriver.java
│ │ │ │ │ ├── RunnerTest.java
│ │ │ │ │ ├── TagTest.java
│ │ │ │ │ ├── aborted.feature
│ │ │ │ │ ├── called-arg-loop.feature
│ │ │ │ │ ├── called-arg-null.feature
│ │ │ │ │ ├── called-arg-single.feature
│ │ │ │ │ ├── called-shared.feature
│ │ │ │ │ ├── called-shared2.feature
│ │ │ │ │ ├── called.feature
│ │ │ │ │ ├── called_2.feature
│ │ │ │ │ ├── caller-arg.feature
│ │ │ │ │ ├── caller-shared.feature
│ │ │ │ │ ├── caller-with-lambda-arg.feature
│ │ │ │ │ ├── caller.feature
│ │ │ │ │ ├── caller_2.feature
│ │ │ │ │ ├── failed.feature
│ │ │ │ │ ├── hooks/
│ │ │ │ │ │ ├── HooksTest.java
│ │ │ │ │ │ ├── MandatoryTagHook.java
│ │ │ │ │ │ ├── NoFeatureTestRuntimeHook.java
│ │ │ │ │ │ ├── NoScenarioTestRuntimeHook.java
│ │ │ │ │ │ ├── NoStepTestRuntimeHook.java
│ │ │ │ │ │ ├── ScenarioHookSkipTest.java
│ │ │ │ │ │ ├── ScenarioHookTest.java
│ │ │ │ │ │ ├── SkipHook.java
│ │ │ │ │ │ ├── TestRuntimeHook.java
│ │ │ │ │ │ ├── hook-dynamic-outline.feature
│ │ │ │ │ │ ├── hook-multiple-dynamic-outline.feature
│ │ │ │ │ │ ├── hook-multiple-outlines.feature
│ │ │ │ │ │ ├── hook-outline.feature
│ │ │ │ │ │ ├── hook-scenario.feature
│ │ │ │ │ │ ├── karate-base.js
│ │ │ │ │ │ ├── karate-config.js
│ │ │ │ │ │ ├── test-hook-multiexample.feature
│ │ │ │ │ │ ├── test-hook-notags.feature
│ │ │ │ │ │ └── test-hook-skip.feature
│ │ │ │ │ ├── multi-scenario-fail.feature
│ │ │ │ │ ├── multi-scenario.feature
│ │ │ │ │ ├── no-scenario-name.feature
│ │ │ │ │ ├── notEqualMatch.feature
│ │ │ │ │ ├── outline.feature
│ │ │ │ │ ├── run-arg.feature
│ │ │ │ │ ├── run-ignore.feature
│ │ │ │ │ ├── scenario.feature
│ │ │ │ │ ├── signin.feature
│ │ │ │ │ ├── stackoverflow-error.feature
│ │ │ │ │ ├── table.feature
│ │ │ │ │ ├── test-called-embedded-file.feature
│ │ │ │ │ ├── test-called-embedded.feature
│ │ │ │ │ ├── test-called.feature
│ │ │ │ │ ├── test.json
│ │ │ │ │ └── test.xml
│ │ │ │ ├── scenario-outline-result.feature
│ │ │ │ ├── scenario-variable-scope.feature
│ │ │ │ ├── schema-like-odds.json
│ │ │ │ ├── schema-like-time-validator.js
│ │ │ │ ├── schema-like.feature
│ │ │ │ ├── schema-read-inner.json
│ │ │ │ ├── schema-read.feature
│ │ │ │ ├── schema-read.json
│ │ │ │ ├── set-xml.feature
│ │ │ │ ├── set.feature
│ │ │ │ ├── single-scenario.feature
│ │ │ │ ├── sort-array.feature
│ │ │ │ ├── sort-array.js
│ │ │ │ ├── table.feature
│ │ │ │ ├── tags/
│ │ │ │ │ ├── TagsTest.java
│ │ │ │ │ ├── env-tags.feature
│ │ │ │ │ └── outline-tags.feature
│ │ │ │ ├── tags.feature
│ │ │ │ ├── to-bean-called.feature
│ │ │ │ ├── to-bean.feature
│ │ │ │ ├── type-conv-query.txt
│ │ │ │ ├── type-conv-query2.txt
│ │ │ │ ├── type-conv.feature
│ │ │ │ ├── type-conversion.feature
│ │ │ │ ├── ui-google.feature
│ │ │ │ ├── users-doc.feature
│ │ │ │ ├── users-single.html
│ │ │ │ ├── users.html
│ │ │ │ ├── utils-reuse-common.feature
│ │ │ │ ├── utils-reuse.feature
│ │ │ │ ├── uuid.js
│ │ │ │ ├── websocket.feature
│ │ │ │ ├── xml/
│ │ │ │ │ ├── XmlTest.java
│ │ │ │ │ ├── envelope1.xml
│ │ │ │ │ ├── envelope2.xml
│ │ │ │ │ ├── soap1.xml
│ │ │ │ │ ├── soap2.xml
│ │ │ │ │ ├── xml-and-xpath.feature
│ │ │ │ │ ├── xml-call.feature
│ │ │ │ │ ├── xml-called.feature
│ │ │ │ │ └── xml.feature
│ │ │ │ └── xml-pretty.feature
│ │ │ ├── driver/
│ │ │ │ ├── DriverElementTest.java
│ │ │ │ ├── DriverOptionsTest.java
│ │ │ │ ├── ElementFinderTest.java
│ │ │ │ ├── KeyTest.java
│ │ │ │ ├── appium/
│ │ │ │ │ └── MobileDriverOptionsTest.java
│ │ │ │ └── playwright/
│ │ │ │ └── PlaywrightDriverRunner.java
│ │ │ ├── fatjar/
│ │ │ │ ├── ClientRunner.java
│ │ │ │ ├── FeatureProxyRunner.java
│ │ │ │ ├── FeatureServerRunner.java
│ │ │ │ ├── FeatureServerTest.java
│ │ │ │ ├── MainRunner.java
│ │ │ │ ├── MainSslRunner.java
│ │ │ │ ├── ProxyServerRunner.java
│ │ │ │ ├── ProxyServerSslMain.java
│ │ │ │ ├── ProxyServerSslTest.java
│ │ │ │ ├── ProxyServerTest.java
│ │ │ │ ├── client.feature
│ │ │ │ ├── karate-config.js
│ │ │ │ ├── proxy.feature
│ │ │ │ ├── server.feature
│ │ │ │ └── temp.html
│ │ │ ├── graal/
│ │ │ │ ├── JsEngineTest.java
│ │ │ │ ├── JsValueTest.java
│ │ │ │ ├── SimplePojo.java
│ │ │ │ └── StaticPojo.java
│ │ │ ├── http/
│ │ │ │ ├── AwsLambdaHandlerTest.java
│ │ │ │ ├── GenericHttpHeaderTrackingTest.java
│ │ │ │ ├── HttpClientTester.java
│ │ │ │ ├── HttpHookTest.java
│ │ │ │ ├── HttpLoggerTest.java
│ │ │ │ ├── HttpRequestBuilderTest.java
│ │ │ │ ├── HttpUtilsTest.java
│ │ │ │ ├── MultiPartBuilderTest.java
│ │ │ │ ├── ProxyContextTest.java
│ │ │ │ ├── RequestHandlerTest.java
│ │ │ │ ├── WebSocketClientRunner.java
│ │ │ │ ├── WebSocketProxyRunner.java
│ │ │ │ ├── WebSocketTempRunner.java
│ │ │ │ ├── api.json
│ │ │ │ ├── cats.json
│ │ │ │ ├── form.json
│ │ │ │ ├── index.json
│ │ │ │ ├── mock.feature
│ │ │ │ └── root.json
│ │ │ ├── malformed.txt
│ │ │ ├── report/
│ │ │ │ ├── ReportUtilsTest.java
│ │ │ │ ├── called-loop.feature
│ │ │ │ ├── called.feature
│ │ │ │ ├── called2.feature
│ │ │ │ ├── called3.feature
│ │ │ │ ├── customTags.feature
│ │ │ │ ├── data.csv
│ │ │ │ └── test.feature
│ │ │ ├── resource/
│ │ │ │ ├── ResourceUtilsTest.java
│ │ │ │ ├── dir1/
│ │ │ │ │ └── dir1.log
│ │ │ │ ├── dir2/
│ │ │ │ │ └── dir2.log
│ │ │ │ ├── test.feature
│ │ │ │ ├── test1.txt
│ │ │ │ └── test2.log
│ │ │ ├── shell/
│ │ │ │ ├── CommandTest.java
│ │ │ │ └── CommandTester.java
│ │ │ ├── template/
│ │ │ │ ├── TemplateTest.java
│ │ │ │ ├── attr.html
│ │ │ │ ├── called1.html
│ │ │ │ ├── global.js
│ │ │ │ ├── ka-set.html
│ │ │ │ ├── local.js
│ │ │ │ ├── main.html
│ │ │ │ ├── nocache.html
│ │ │ │ ├── temp.html
│ │ │ │ ├── temp.js
│ │ │ │ ├── with-called.html
│ │ │ │ └── with.html
│ │ │ └── test/
│ │ │ └── file-utils-test.feature
│ │ ├── demo/
│ │ │ ├── ServerRunner.java
│ │ │ ├── api/
│ │ │ │ ├── cats.js
│ │ │ │ ├── demo.js
│ │ │ │ ├── payments.js
│ │ │ │ ├── render.js
│ │ │ │ └── test.html
│ │ │ ├── apidocs.html
│ │ │ ├── app.css
│ │ │ ├── cats.html
│ │ │ ├── details.html
│ │ │ ├── index.html
│ │ │ ├── person.html
│ │ │ ├── user.html
│ │ │ └── users.html
│ │ ├── karate-base.js
│ │ ├── karate-config.js
│ │ ├── logback-test.xml
│ │ └── payments.jmx
│ └── resources/
│ ├── analytics.md
│ └── readme.txt
├── karate-demo/
│ ├── README.md
│ ├── build.gradle
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── intuit/
│ │ │ └── karate/
│ │ │ └── demo/
│ │ │ ├── Application.java
│ │ │ ├── config/
│ │ │ │ ├── ServerStartedInitializingBean.java
│ │ │ │ ├── TomcatConfig.java
│ │ │ │ ├── WebSecurityConfig.java
│ │ │ │ └── WebSocketConfig.java
│ │ │ ├── controller/
│ │ │ │ ├── CatsController.java
│ │ │ │ ├── DogsController.java
│ │ │ │ ├── EchoController.java
│ │ │ │ ├── EncodingController.java
│ │ │ │ ├── GraphqlController.java
│ │ │ │ ├── GreetingController.java
│ │ │ │ ├── HeadersController.java
│ │ │ │ ├── RedirectController.java
│ │ │ │ ├── SearchController.java
│ │ │ │ ├── SignInController.java
│ │ │ │ ├── SoapController.java
│ │ │ │ ├── UploadController.java
│ │ │ │ ├── WebSocketController.java
│ │ │ │ └── WebSocketHandler.java
│ │ │ ├── domain/
│ │ │ │ ├── Binary.java
│ │ │ │ ├── Cat.java
│ │ │ │ ├── Dog.java
│ │ │ │ ├── FileInfo.java
│ │ │ │ ├── Greeting.java
│ │ │ │ ├── Message.java
│ │ │ │ └── SignIn.java
│ │ │ ├── exception/
│ │ │ │ ├── ErrorResponse.java
│ │ │ │ └── GlobalExceptionHandler.java
│ │ │ └── util/
│ │ │ ├── DbUtils.java
│ │ │ ├── FileChecker.java
│ │ │ ├── FizzBuzz.java
│ │ │ ├── JavaDemo.java
│ │ │ └── SchemaUtils.java
│ │ └── resources/
│ │ ├── application.properties
│ │ ├── graphql-1.json
│ │ ├── graphql-2.json
│ │ ├── schema.sql
│ │ ├── soap-1.xml
│ │ └── soap-2.xml
│ └── test/
│ └── java/
│ ├── demo/
│ │ ├── DemoRunner.java
│ │ ├── DemoTestParallel.java
│ │ ├── DemoTestSelected.java
│ │ ├── TestBase.java
│ │ ├── abort/
│ │ │ └── abort.feature
│ │ ├── binary/
│ │ │ └── binary.feature
│ │ ├── callarray/
│ │ │ ├── call-json-array.feature
│ │ │ ├── kitten-create.feature
│ │ │ └── kittens.json
│ │ ├── calldynamic/
│ │ │ ├── call-dynamic-json.feature
│ │ │ └── get-cat.feature
│ │ ├── callfeature/
│ │ │ ├── call-feature.feature
│ │ │ ├── called-arg.feature
│ │ │ ├── called-normal.feature
│ │ │ ├── create-cats-outline.feature
│ │ │ └── create-two-cats.feature
│ │ ├── callnested/
│ │ │ ├── call-nested.feature
│ │ │ ├── called1.feature
│ │ │ ├── called2.feature
│ │ │ └── called3.feature
│ │ ├── callonce/
│ │ │ └── call-once.feature
│ │ ├── calltable/
│ │ │ ├── call-table.feature
│ │ │ └── kitten-create.feature
│ │ ├── cats/
│ │ │ ├── CatsJava.java
│ │ │ ├── billie-expected.json
│ │ │ ├── cats-put.feature
│ │ │ ├── cats.feature
│ │ │ ├── kittens.feature
│ │ │ └── syntax-demo.feature
│ │ ├── cookies/
│ │ │ └── cookies.feature
│ │ ├── delete/
│ │ │ └── delete.feature
│ │ ├── dogs/
│ │ │ └── dogs.feature
│ │ ├── dsl/
│ │ │ ├── common.feature
│ │ │ ├── dsl.feature
│ │ │ ├── greet.js
│ │ │ └── login.feature
│ │ ├── embed/
│ │ │ ├── embed-pdf.js
│ │ │ └── embed.feature
│ │ ├── encoding/
│ │ │ └── encoding.feature
│ │ ├── error/
│ │ │ ├── error.feature
│ │ │ └── no-url.feature
│ │ ├── form/
│ │ │ └── form.feature
│ │ ├── graphql/
│ │ │ ├── graphql.feature
│ │ │ └── user-by-id.graphql
│ │ ├── greeting/
│ │ │ └── greeting.feature
│ │ ├── headers/
│ │ │ ├── DemoLogModifier.java
│ │ │ ├── call-isolated-config.feature
│ │ │ ├── call-isolated-headers.feature
│ │ │ ├── call-updates-config.feature
│ │ │ ├── callonce-background-multiscenario.feature
│ │ │ ├── common-multiple.feature
│ │ │ ├── common-noheaders.feature
│ │ │ ├── common.feature
│ │ │ ├── content-type.feature
│ │ │ ├── headers-alt.js
│ │ │ ├── headers-background-configure.feature
│ │ │ ├── headers-background.feature
│ │ │ ├── headers-form-get.feature
│ │ │ ├── headers-masking.feature
│ │ │ ├── headers-override.feature
│ │ │ ├── headers-single.feature
│ │ │ ├── headers-uuid.feature
│ │ │ ├── headers.feature
│ │ │ └── null-header.feature
│ │ ├── hooks/
│ │ │ ├── after-feature.feature
│ │ │ ├── after-scenario.feature
│ │ │ ├── called.feature
│ │ │ └── hooks.feature
│ │ ├── info/
│ │ │ └── info.feature
│ │ ├── java/
│ │ │ ├── JavaApiTest.java
│ │ │ ├── cats-java.feature
│ │ │ └── from-java.feature
│ │ ├── jwt/
│ │ │ └── jwt.feature
│ │ ├── oauth/
│ │ │ ├── Signer.java
│ │ │ ├── oauth1.feature
│ │ │ └── oauth2.feature
│ │ ├── outline/
│ │ │ ├── dynamic-csv.feature
│ │ │ ├── dynamic-generator.feature
│ │ │ ├── dynamic.feature
│ │ │ ├── examples.feature
│ │ │ ├── kittens.csv
│ │ │ └── setup-outline.feature
│ │ ├── params/
│ │ │ └── params.feature
│ │ ├── polling/
│ │ │ ├── get.feature
│ │ │ └── polling.feature
│ │ ├── read/
│ │ │ ├── read-files.feature
│ │ │ ├── sample.json
│ │ │ └── sample.xml
│ │ ├── redirect/
│ │ │ └── redirect.feature
│ │ ├── request/
│ │ │ └── request.feature
│ │ ├── schema/
│ │ │ ├── products-schema.json
│ │ │ ├── products.json
│ │ │ └── schema.feature
│ │ ├── search/
│ │ │ ├── dynamic-params.feature
│ │ │ ├── get-response-param.js
│ │ │ ├── search-complex.feature
│ │ │ └── search-simple.feature
│ │ ├── signin/
│ │ │ └── sign-in.feature
│ │ ├── soap/
│ │ │ ├── expected.xml
│ │ │ ├── request.xml
│ │ │ └── soap.feature
│ │ ├── tags/
│ │ │ ├── TagsRunner.java
│ │ │ ├── first.feature
│ │ │ └── second.feature
│ │ ├── unit/
│ │ │ ├── cat.feature
│ │ │ ├── common.feature
│ │ │ └── fizz-buzz.feature
│ │ ├── upload/
│ │ │ ├── upload-image.feature
│ │ │ ├── upload-multiple-fields.feature
│ │ │ ├── upload-multiple-files.feature
│ │ │ ├── upload-retry.feature
│ │ │ └── upload.feature
│ │ ├── websocket/
│ │ │ ├── WebSocketClientRunner.java
│ │ │ ├── echo.feature
│ │ │ └── websocket.feature
│ │ └── xml/
│ │ └── preserve-whitespace.feature
│ ├── driver/
│ │ ├── demo/
│ │ │ ├── Demo01JavaRunner.java
│ │ │ ├── demo-01.feature
│ │ │ ├── demo-02.feature
│ │ │ ├── demo-03.feature
│ │ │ ├── demo-04.feature
│ │ │ ├── demo-05.feature
│ │ │ └── demo-06.feature
│ │ ├── mock/
│ │ │ ├── demo-01.feature
│ │ │ ├── demo-02.feature
│ │ │ ├── mock-01.feature
│ │ │ ├── mock-02.feature
│ │ │ └── response.json
│ │ ├── screenshot/
│ │ │ ├── ChromeFullPageRunner.java
│ │ │ ├── ChromePdfRunner.java
│ │ │ ├── EdgeChromiumFullPageRunner.java
│ │ │ └── EdgeChromiumPdfRunner.java
│ │ └── windows/
│ │ └── calc.feature
│ ├── headers.js
│ ├── karate-config.js
│ ├── log4j2.properties
│ ├── logback-test.xml
│ ├── mock/
│ │ ├── async/
│ │ │ ├── AsyncTest.java
│ │ │ ├── QueueConsumer.java
│ │ │ ├── QueueUtils.java
│ │ │ ├── karate-config.js
│ │ │ ├── main.feature
│ │ │ └── mock.feature
│ │ ├── contract/
│ │ │ ├── Consumer.java
│ │ │ ├── ConsumerIntegrationTest.java
│ │ │ ├── ConsumerUsingMockTest.java
│ │ │ ├── ConsumerUsingProxyHttpTest.java
│ │ │ ├── ConsumerUsingProxyRewriteSslTest.java
│ │ │ ├── ConsumerUsingProxyRewriteTest.java
│ │ │ ├── Payment.java
│ │ │ ├── PaymentService.java
│ │ │ ├── PaymentServiceContractSslTest.java
│ │ │ ├── PaymentServiceContractTest.java
│ │ │ ├── PaymentServiceContractUsingMockSslTest.java
│ │ │ ├── PaymentServiceContractUsingMockTest.java
│ │ │ ├── PaymentServiceMockMain.java
│ │ │ ├── PaymentServiceMockSslMain.java
│ │ │ ├── QueueConsumer.java
│ │ │ ├── QueueUtils.java
│ │ │ ├── QueueUtilsTest.java
│ │ │ ├── Shipment.java
│ │ │ ├── increment.js
│ │ │ ├── karate-config.js
│ │ │ ├── payment-service-mock.feature
│ │ │ ├── payment-service-proxy.feature
│ │ │ ├── payment-service.feature
│ │ │ └── payments.html
│ │ ├── micro/
│ │ │ ├── CatsMockRunner.java
│ │ │ ├── cats-mock.feature
│ │ │ └── cats.feature
│ │ ├── proxy/
│ │ │ ├── DemoMockProceedRunner.java
│ │ │ ├── DemoMockProxyRunner.java
│ │ │ ├── DemoMockProxySslRunner.java
│ │ │ ├── DemoMockRunner.java
│ │ │ ├── DemoMockSslRunner.java
│ │ │ ├── demo-mock-proceed.feature
│ │ │ ├── demo-mock.feature
│ │ │ └── karate-config.js
│ │ └── web/
│ │ ├── CatsMockRunner.java
│ │ ├── CatsMockStarter.java
│ │ ├── CatsTestRunner.java
│ │ ├── cats-mock.feature
│ │ ├── cats-test.feature
│ │ └── cats.html
│ ├── mock-cert.pem
│ ├── mock-contract.jmx
│ ├── mock-key.pem
│ ├── server-keystore-cert.pem
│ ├── server-keystore-key.pem
│ ├── server-keystore.p12
│ ├── server-keystore.pem
│ ├── ssl/
│ │ ├── SslTest.java
│ │ ├── TestService.java
│ │ ├── ssl-keystore.feature
│ │ └── ssl-truststore.feature
│ └── test/
│ ├── MonitorThread.java
│ ├── ServerStart.java
│ ├── ServerStop.java
│ └── Stoppable.java
├── karate-docker/
│ ├── karate-chrome/
│ │ ├── Dockerfile
│ │ ├── entrypoint.sh
│ │ └── supervisord.conf
│ ├── karate-chromium/
│ │ ├── Dockerfile
│ │ ├── entrypoint.sh
│ │ └── supervisord.conf
│ └── karate-firefox/
│ ├── Dockerfile
│ ├── build.sh
│ ├── entrypoint.sh
│ ├── install.sh
│ └── supervisord.conf
├── karate-e2e-tests/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ └── test/
│ └── java/
│ ├── axe/
│ │ ├── AxeRunner.java
│ │ ├── axe-report.html
│ │ └── axe.feature
│ ├── driver/
│ │ ├── 00.feature
│ │ ├── 00_outline.feature
│ │ ├── 01.feature
│ │ ├── 02.feature
│ │ ├── 03.feature
│ │ ├── 04.feature
│ │ ├── 05.feature
│ │ ├── 05_mock.feature
│ │ ├── 06.feature
│ │ ├── 07.feature
│ │ ├── 08.feature
│ │ ├── 09.feature
│ │ ├── 10.feature
│ │ ├── 11.feature
│ │ ├── 12.feature
│ │ ├── 13.feature
│ │ ├── 14.feature
│ │ ├── 15.feature
│ │ ├── 16.feature
│ │ ├── 17.feature
│ │ ├── 18.feature
│ │ ├── 19.feature
│ │ ├── 99_bootstrap.feature
│ │ ├── DockerRunner.java
│ │ ├── JavaApiPlaywrightRunner.java
│ │ ├── JavaApiRunner.java
│ │ ├── LocalParallelRunner.java
│ │ ├── LocalPlaywrightRunner.java
│ │ ├── LocalSingleRunner.java
│ │ ├── ServerStarter.java
│ │ ├── html/
│ │ │ ├── 00.css
│ │ │ ├── 00.html
│ │ │ ├── 00.js
│ │ │ ├── 01.html
│ │ │ ├── 02.html
│ │ │ ├── 03.html
│ │ │ ├── 04.html
│ │ │ ├── 05.html
│ │ │ ├── 06.html
│ │ │ ├── 07.html
│ │ │ ├── 08.html
│ │ │ ├── 08_upload.html
│ │ │ ├── 09.html
│ │ │ ├── 10.html
│ │ │ ├── 11.html
│ │ │ ├── 11_tab.html
│ │ │ ├── 13.html
│ │ │ ├── 14.html
│ │ │ ├── 14_embedded.html
│ │ │ ├── 14_processing.html
│ │ │ ├── 15.html
│ │ │ ├── 16.html
│ │ │ ├── 17_a.html
│ │ │ ├── 17_b.html
│ │ │ ├── 18.html
│ │ │ ├── 19.html
│ │ │ ├── 99_bootstrap.html
│ │ │ ├── api/
│ │ │ │ └── 05.js
│ │ │ └── scratch.html
│ │ ├── karate-config-docker.js
│ │ ├── karate-config-playwright.js
│ │ ├── karate-config-single.js
│ │ ├── karate-config-xbrowser.js
│ │ ├── karate-config.js
│ │ └── scratch.feature
│ ├── logback-test.xml
│ └── regex/
│ ├── RegexRunner.java
│ └── regex.feature
├── karate-gatling/
│ ├── README.md
│ ├── dummy.txt
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── intuit/
│ │ │ └── karate/
│ │ │ └── gatling/
│ │ │ └── javaapi/
│ │ │ ├── KarateDsl.java
│ │ │ ├── KarateFeatureBuilder.java
│ │ │ ├── KarateProtocolBuilder.java
│ │ │ └── KarateUriPattern.java
│ │ └── scala/
│ │ └── com/
│ │ └── intuit/
│ │ └── karate/
│ │ └── gatling/
│ │ ├── KarateActions.scala
│ │ ├── KarateProtocol.scala
│ │ └── PreDef.scala
│ └── test/
│ ├── java/
│ │ ├── com/
│ │ │ └── intuit/
│ │ │ └── karate/
│ │ │ └── gatling/
│ │ │ └── javaapi/
│ │ │ └── KarateProtocolBuilderTest.java
│ │ └── mock/
│ │ ├── CatsChainedSimulation.java
│ │ ├── CatsSimulation.java
│ │ ├── MockUtils.java
│ │ ├── cats-chained.feature
│ │ ├── cats-create.feature
│ │ ├── cats-delete-one.feature
│ │ ├── cats-delete.feature
│ │ ├── custom-rpc.feature
│ │ └── mock.feature
│ ├── resources/
│ │ ├── gatling-akka.conf
│ │ ├── karate-config-perf.js
│ │ ├── karate-config.js
│ │ ├── logback-test.xml
│ │ └── test.feature
│ └── scala/
│ └── mock/
│ ├── CatsChainedScalaSimulation.scala
│ ├── CatsScalaSimulation.scala
│ └── CatsSimulationWithSilentWarmUp.scala
├── karate-junit5/
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── intuit/
│ │ └── karate/
│ │ └── junit5/
│ │ ├── FeatureNode.java
│ │ └── Karate.java
│ └── test/
│ └── java/
│ ├── karate/
│ │ ├── NoFeatureNoScenarioTest.java
│ │ ├── SampleCustomTagsTest.java
│ │ ├── SampleTest.java
│ │ ├── SetupDryRunTest.java
│ │ ├── customTags.feature
│ │ ├── embed.feature
│ │ ├── noFeatureNoScenario.feature
│ │ ├── sample.feature
│ │ ├── setup-with-dryrun.feature
│ │ └── tags.feature
│ ├── karate-config.js
│ └── logback-test.xml
├── karate-netty/
│ └── README.md
├── karate-playwright/
│ ├── .gitignore
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── intuit/
│ │ └── karate/
│ │ ├── driver/
│ │ │ └── playwright/
│ │ │ └── PlaywrightDriver.java
│ │ └── playwright/
│ │ └── driver/
│ │ ├── InvocationHandlers.java
│ │ ├── PlaywrightDriver.java
│ │ ├── PlaywrightDriverOptions.java
│ │ ├── PlaywrightElement.java
│ │ ├── PlaywrightFinder.java
│ │ ├── PlaywrightMouse.java
│ │ ├── PlaywrightToken.java
│ │ └── util/
│ │ └── KarateTokenParser.java
│ └── test/
│ ├── java/
│ │ └── com/
│ │ └── intuit/
│ │ └── karate/
│ │ └── playwright/
│ │ └── driver/
│ │ ├── PlaywrightDriverTest.java
│ │ └── PlaywrightElementTest.java
│ └── resources/
│ └── html/
│ └── 02.html
├── karate-robot/
│ ├── README.md
│ ├── pom.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── com/
│ │ └── intuit/
│ │ └── karate/
│ │ └── robot/
│ │ ├── Element.java
│ │ ├── ImageElement.java
│ │ ├── Location.java
│ │ ├── MissingElement.java
│ │ ├── OpenCvUtils.java
│ │ ├── Region.java
│ │ ├── Robot.java
│ │ ├── RobotBase.java
│ │ ├── RobotFactory.java
│ │ ├── RobotUtils.java
│ │ ├── StringMatcher.java
│ │ ├── Tesseract.java
│ │ ├── Window.java
│ │ ├── linux/
│ │ │ └── LinuxRobot.java
│ │ ├── mac/
│ │ │ └── MacRobot.java
│ │ └── win/
│ │ ├── ComAllocated.java
│ │ ├── ComAllocatedStr.java
│ │ ├── ComAllocatedVarInt.java
│ │ ├── ComAllocatedVarStr.java
│ │ ├── ComFunction.java
│ │ ├── ComInterface.java
│ │ ├── ComLibrary.java
│ │ ├── ComRef.java
│ │ ├── ComUtils.java
│ │ ├── ControlType.java
│ │ ├── IUIAutomation.java
│ │ ├── IUIAutomationBase.java
│ │ ├── IUIAutomationCondition.java
│ │ ├── IUIAutomationElement.java
│ │ ├── IUIAutomationElementArray.java
│ │ ├── IUIAutomationInvokePattern.java
│ │ ├── IUIAutomationScrollPattern.java
│ │ ├── IUIAutomationSelectionItemPattern.java
│ │ ├── IUIAutomationTreeWalker.java
│ │ ├── IUIAutomationValuePattern.java
│ │ ├── IUIAutomationWindowPattern.java
│ │ ├── PathSearch.java
│ │ ├── Pattern.java
│ │ ├── Property.java
│ │ ├── ScrollAmount.java
│ │ ├── TreeScope.java
│ │ ├── WinElement.java
│ │ ├── WinRobot.java
│ │ └── WinWindow.java
│ └── test/
│ └── java/
│ ├── com/
│ │ └── intuit/
│ │ └── karate/
│ │ └── robot/
│ │ ├── OpenCvUtilsTest.java
│ │ ├── TesseractRunner.java
│ │ └── win/
│ │ ├── IUIAutomationRunner.java
│ │ ├── PathSearchTest.java
│ │ └── WinRobotRunner.java
│ ├── logback-test.xml
│ └── robot/
│ └── core/
│ ├── ChromeJavaRunner.java
│ ├── CoreRunner.java
│ ├── calc.feature
│ ├── called.feature
│ ├── caller.feature
│ ├── chrome.feature
│ ├── dummy.feature
│ ├── iphone.feature
│ ├── upload.feature
│ └── wordpad.feature
└── pom.xml
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[karatelabs.io](https://www.karatelabs.io/karate-labs-contact).
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html - v2.1
================================================
FILE: .github/CONTRIBUTING.md
================================================
# Contribution Guidelines
First of all, thank you for your interest in contributing to this project !
* Before submitting a [Pull Request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) (PR), please make sure that you have had a discussion with the project-leads
* If a [relevant issue](https://github.com/karatelabs/karate/issues) already exists, have a discussion within that issue (by commenting) - and make sure that the project-leads are okay with your approach
* If no relevant issue exists, please [open a new issue](https://github.com/karatelabs/karate/issues) to start a discussion
* Please proceed with a PR only *after* the project admins or owners are okay with your approach. We don't want you to spend time and effort working on something - only to find out later that it was not aligned with how the project developers were thinking about it !
* You can refer to the [Developer Guide](https://github.com/karatelabs/karate/wiki/Developer-Guide) for information on how to build and test the project on your local / developer machine
* **IMPORTANT**: Submit your PR(s) against the [`develop`](https://github.com/karatelabs/karate/tree/develop) branch of this repository
If you are interested in project road-map items that you can potentially contribute to, please refer to the [Project Board](https://github.com/karatelabs/karate/projects/3).
================================================
FILE: .github/FUNDING.yml
================================================
github: [karatelabs]
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
IMPORTANT: If you have a general question please use Stack Overflow instead where Karate has a dedicated "tag": https://stackoverflow.com/questions/tagged/karate
If you are sure you have found a bug, please make sure you follow the instructions here: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
### Description
Thanks for contributing this Pull Request. Make sure that you submit this Pull Request against the `develop` branch of this repository, add a brief description, and tag the relevant issue(s) and PR(s) below.
- Relevant Issues : (compulsory)
- Relevant PRs : (optional)
- Type of change :
- [ ] New feature
- [ ] Bug fix for existing feature
- [ ] Code quality improvement
- [ ] Addition or Improvement of tests
- [ ] Addition or Improvement of documentation
================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
# Dependencies listed in .github/workflows/*.yml
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
================================================
FILE: .github/workflows/codeql.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "develop", "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
# schedule:
# - cron: '31 14 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: set up jdk 17
uses: actions/setup-java@v5
with:
distribution: adopt
java-version: 17
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
================================================
FILE: .github/workflows/delete-workflow-runs.yml
================================================
name: delete-workflow-runs
on:
workflow_dispatch:
inputs:
days:
description: 'no. of days'
required: true
default: 30
minimum_runs:
description: 'minimum runs to keep (per workflow)'
required: true
default: 6
# push:
# branches: [ develop ]
jobs:
del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: ${{ github.event.inputs.days }}
# retain_days: 30
keep_minimum_runs: ${{ github.event.inputs.minimum_runs }}
# keep_minimum_runs: 6
================================================
FILE: .github/workflows/jdk-compat.yml
================================================
name: jdk-compat
on:
push:
branches: [ develop ]
jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v6
- name: get latest jdk ga
uses: oracle-actions/setup-java@v1
with:
website: jdk.java.net
release: 25
- name: cache maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: build with maven
run: mvn -B clean install -P pre-release -Djavacpp.platform=linux-x86_64
================================================
FILE: .github/workflows/maven-build.yml
================================================
name: maven-build
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
build:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v6
- name: set up jdk 17
uses: actions/setup-java@v5
with:
distribution: adopt
java-version: 17
- name: cache maven packages
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: build with maven
run: mvn -B clean install -P pre-release -Djavacpp.platform=linux-x86_64
- name: build and test with docker
run: ./build-docker.sh
- name: upload workspace if build fails
# if: ${{ failure() }}
if: ${{ false }}
uses: actions/upload-artifact@v5
with:
name: build-results
path: .
retention-days: 5
================================================
FILE: .github/workflows/maven-release.yml
================================================
name: maven-release
on:
workflow_dispatch:
inputs:
version:
description: maven and docker release version
required: true
default: 'X.X.X.RCX'
docker:
description: push to docker
required: true
type: choice
options:
- 'enabled'
- 'disabled'
maven:
description: push to maven central
required: true
type: choice
options:
- 'enabled'
- 'disabled'
jobs:
build:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v6
- name: set up jdk 17
uses: actions/setup-java@v5
with:
distribution: adopt
java-version: 17
server-id: central
server-username: CENTRAL_TOKEN_USERNAME
server-password: CENTRAL_TOKEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: set maven version
run: |
mvn versions:set versions:commit -B -ntp -DnewVersion=${{ github.event.inputs.version }}
- name: docker build
if: ( github.event.inputs.docker == 'enabled' )
run: |
mvn clean install -B -ntp -DskipTests -P pre-release
./build-docker.sh
- name: docker login
if: ( github.event.inputs.docker == 'enabled' )
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: docker push
if: ( github.event.inputs.docker == 'enabled' )
run: |
docker tag karate-chrome karatelabs/karate-chrome:${{ github.event.inputs.version }}
docker tag karate-chrome karatelabs/karate-chrome:latest
docker push karatelabs/karate-chrome:${{ github.event.inputs.version }}
docker push karatelabs/karate-chrome:latest
- name: maven deploy to central
if: ( github.event.inputs.maven == 'enabled' )
env:
CENTRAL_TOKEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USER }}
CENTRAL_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
run: |
mvn -B -ntp deploy -DskipTests -P pre-release,release -pl "!karate-archetype,!karate-demo,!karate-e2e-tests"
- name: maven build binaries
run: |
mvn package -DskipTests -P fatjar -f karate-core/pom.xml
mvn package -DskipTests -P fatjar -f karate-robot/pom.xml
- name: upload binaries
uses: actions/upload-artifact@v5
with:
name: karate-release-${{ github.event.inputs.version }}
retention-days: 5
path: |
karate-core/target/*.jar
karate-robot/target/*.jar
================================================
FILE: .gitignore
================================================
.DS_Store
target/
.idea
.project
.settings
.classpath
.vscode
.java-version
*.iml
*.tokens
build/
bin/
.gradle
gradle
gradlew
gradlew.*
dependency-reduced-pom.xml
examples/zip-release/*.jar
karate-demo/activemq-data/
karate-demo/*.pem
karate-demo/*.jks
karate-demo/*.der
karate-core/gen
karate-core/*.pem
karate-core/*.jks
karate-core/*.der
karate-robot/tessdata
karate-junit4/src/test/java/com/intuit/karate/junit4/dev
karate-robot/src/test/java/robot/dev
================================================
FILE: LICENSE
================================================
Copyright 2022 Karate Labs Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# Karate
**The open-source tool that combines API testing, mocks, performance testing, and UI automation into a single, unified framework.**
[](https://central.sonatype.com/namespace/io.karatelabs)
[](https://github.com/karatelabs/karate/actions?query=workflow%3Amaven-build)
[](https://github.com/karatelabs/karate/releases)
[](https://twitter.com/getkarate)
[](https://github.com/karatelabs/karate/stargazers)
<table>
<tr>
<td>
<h2><strong>📖 Documentation:</strong>
<a href="https://docs.karatelabs.io">docs.karatelabs.io</a></h2>
<details>
<summary>Looking for the old README?</summary>
The previous README monolith is preserved at:
**[github.com/karatelabs/karate/blob/v1.5.2](https://github.com/karatelabs/karate/blob/v1.5.2)**
Anchor links (e.g. `#syntax-guide`, `#configuration`) can be appended to navigate directly to specific sections.
</details>
</td>
<td width="30%">
<a href="https://karatelabs.io">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/karatelabs/.github/main/profile/karate-labs-wide-black.png">
<img src="https://raw.githubusercontent.com/karatelabs/.github/main/profile/karate-labs-wide.png" />
</picture>
</a>
</td>
</tr>
</table>
<div>
<a href="https://github.com/karatelabs/karate/wiki/Support">
<img src="https://img.shields.io/badge/Support-Resources-red.svg"/>
</a>
</div>
================================================
FILE: SECURITY.md
================================================
# Security Policy
## Supported Versions
| Version | Supported |
| ------- | ------------------ |
| [latest (non-RC)](https://github.com/karatelabs/karate/releases) | :white_check_mark: |
| older versions | :x: |
## Reporting a Vulnerability
Private vulnerability reporting is enabled, please [follow these instructions](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability).
================================================
FILE: _config.yml
================================================
# Site settings
title: Karate
description: Test Automation Made Simple.
twitter_username: getkarate
github_username: ptrthomas
# Theme
remote_theme: pmarsceill/just-the-docs
# Theme settings
search_enabled: true
aux_links:
"Karate on Github":
- "//github.com/karatelabs/karate"
"Karate Labs":
- "//karatelabs.io"
================================================
FILE: _includes/nav.html
================================================
<nav>
<ul class="navigation-list">
{% assign pages_list = site.html_pages | sort:"nav_order" %}
{% for node in pages_list %}
{% unless node.nav_exclude %}
{% if node.parent == nil %}
<li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
{% if page.parent == node.title or page.grand_parent == node.title %}
{% assign first_level_url = node.url | absolute_url %}
{% endif %}
<a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
{% if page.url == node.url %}
{% include toc.html html=content sanitize=true h_max=2 %}
{% endif %}
{% if node.has_children %}
{% assign children_list = site.html_pages | sort:"nav_order" %}
<ul class="navigation-list-child-list ">
{% for child in children_list %}
{% if child.parent == node.title %}
<li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
{% if page.url == child.url or page.parent == child.title %}
{% assign second_level_url = child.url | absolute_url %}
{% endif %}
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
{% if child.has_children %}
{% assign grand_children_list = site.html_pages | sort:"nav_order" %}
<ul class="navigation-list-child-list">
{% for grand_child in grand_children_list %}
{% if grand_child.parent == child.title %}
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
<a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</li>
{% endif %}
{% endunless %}
{% endfor %}
</ul>
</nav>
================================================
FILE: _includes/toc.html
================================================
{% capture tocWorkspace %}
{% comment %}
Version 1.0.6
https://github.com/allejo/jekyll-toc
"...like all things liquid - where there's a will, and ~36 hours to spare, there's usually a/some way" ~jaybe
Usage:
{% include toc.html html=content sanitize=true class="inline_toc" id="my_toc" h_min=2 h_max=3 %}
Parameters:
* html (string) - the HTML of compiled markdown generated by kramdown in Jekyll
Optional Parameters:
* sanitize (bool) : false - when set to true, the headers will be stripped of any HTML in the TOC
* class (string) : '' - a CSS class assigned to the TOC
* id (string) : '' - an ID to assigned to the TOC
* h_min (int) : 1 - the minimum TOC header level to use; any header lower than this value will be ignored
* h_max (int) : 6 - the maximum TOC header level to use; any header greater than this value will be ignored
* ordered (bool) : false - when set to true, an ordered list will be outputted instead of an unordered list
* item_class (string) : '' - add custom class(es) for each list item; has support for '%level%' placeholder, which is the current heading level
* baseurl (string) : '' - add a base url to the TOC links for when your TOC is on another page than the actual content
* anchor_class (string) : '' - add custom class(es) for each anchor element
Output:
An ordered or unordered list representing the table of contents of a markdown block. This snippet will only
generate the table of contents and will NOT output the markdown given to it
{% endcomment %}
{% capture my_toc %}{% endcapture %}
{% assign orderedList = include.ordered | default: false %}
{% assign minHeader = include.h_min | default: 1 %}
{% assign maxHeader = include.h_max | default: 6 %}
{% assign nodes = include.html | split: '<h' %}
{% assign firstHeader = true %}
{% capture listModifier %}{% if orderedList %}1.{% else %}-{% endif %}{% endcapture %}
{% for node in nodes %}
{% if node == "" %}
{% continue %}
{% endif %}
{% assign headerLevel = node | replace: '"', '' | slice: 0, 1 | times: 1 %}
{% if headerLevel < minHeader or headerLevel > maxHeader %}
{% continue %}
{% endif %}
{% if firstHeader %}
{% assign firstHeader = false %}
{% assign minHeader = headerLevel %}
{% endif %}
{% assign indentAmount = headerLevel | minus: minHeader | add: 1 %}
{% assign _workspace = node | split: '</h' %}
{% assign _idWorkspace = _workspace[0] | split: 'id="' %}
{% assign _idWorkspace = _idWorkspace[1] | split: '"' %}
{% assign html_id = _idWorkspace[0] %}
{% capture _hAttrToStrip %}{{ _workspace[0] | split: '>' | first }}>{% endcapture %}
{% assign header = _workspace[0] | replace: _hAttrToStrip, '' %}
{% assign space = '' %}
{% for i in (1..indentAmount) %}
{% assign space = space | prepend: ' ' %}
{% endfor %}
{% unless include.item_class == blank %}
{% capture listItemClass %}{:.{{ include.item_class | replace: '%level%', headerLevel }}}{% endcapture %}
{% endunless %}
{% capture my_toc %}{{ my_toc }}
{{ space }}{{ listModifier }} {{ listItemClass }} [{% if include.sanitize %}{{ header | strip_html }}{% else %}{{ header }}{% endif %}]({% if include.baseurl %}{{ include.baseurl }}{% endif %}#{{ html_id }}){% if include.anchor_class %}{:.{{ include.anchor_class }}}{% endif %}{% endcapture %}
{% endfor %}
{% if include.class %}
{% capture my_toc %}{:.{{ include.class }}}
{{ my_toc | lstrip }}{% endcapture %}
{% endif %}
{% if include.id %}
{% capture my_toc %}{: #{{ include.id }}}
{{ my_toc | lstrip }}{% endcapture %}
{% endif %}
{% endcapture %}{% assign tocWorkspace = '' %}{{ my_toc | markdownify | strip }}
================================================
FILE: build-docker.sh
================================================
#!/bin/bash
#set -x -e
# assume that karate jars are installed in maven local repo
# mvn clean install -DskipTests -P pre-release
KARATE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
# run e2e test that depends on karate-gatling
mvn versions:set versions:commit -B -ntp -DnewVersion=${KARATE_VERSION} -f examples/gatling/pom.xml
mvn clean test -B -ntp -f examples/gatling/pom.xml
# copy only karate jars to a place where the docker image build can add from
KARATE_REPO=karate-docker/karate-chrome/target/repository/io/karatelabs
mkdir -p "${KARATE_REPO}"
cp -r ~/.m2/repository/io/karatelabs "${KARATE_REPO}"
# create / copy the karate fatjar so that the docker image build can add it
mvn package -B -ntp -P fatjar -DskipTests -f karate-core/pom.xml
cp "karate-core/target/karate-${KARATE_VERSION}.jar" karate-docker/karate-chrome/target/karate.jar
# setup multiplatform build (ignore error if builder doesn't exist)
docker buildx rm multiplatform-builder || true
docker buildx create --name multiplatform-builder
docker buildx use multiplatform-builder
# build karate-chrome docker image that includes karate fatjar + maven jars for convenience
# Only linux/amd64 is supported because google-chrome-stable is amd64-only
docker buildx build \
--platform linux/amd64 \
--cache-from=type=local,src=./target/docker \
--cache-to=type=local,dest=./target/docker \
-t karatelabs/karate-chrome:${{ github.event.inputs.version }} \
-t karatelabs/karate-chrome:latest \
karate-docker/karate-chrome
# Decide platform for local "load" build
PLATFORM_FLAG=""
if [[ "$OSTYPE" == "darwin"* ]]; then
# On Mac (including M1), force linux/amd64 so Chrome is available
PLATFORM_FLAG="--platform=linux/amd64"
fi
# Build local image (for running tests) and load into Docker
docker buildx build \
--load \
${PLATFORM_FLAG} \
--cache-from=type=local,src=./target/docker \
-t karate-chrome \
karate-docker/karate-chrome
# just in case a previous run had hung (likely only in local dev)
docker stop karate || true
# note that this command is run as a background process
docker run --name karate --rm --cap-add=SYS_ADMIN \
-v "$PWD":/karate \
-v "$HOME/.m2":/root/.m2 \
karate-chrome &
# just ensure that the docker container named "karate" exists after the above command
# it does not have to have completed startup, the command / karate test below will wait
sleep 5
# run a test to check a particular jar packaging issue
docker exec -w /karate karate mvn test -B -ntp -f karate-e2e-tests/pom.xml -Dtest=regex.RegexRunner
# run tests against chrome
docker exec -w /karate karate mvn test -B -ntp -f karate-e2e-tests/pom.xml -Dtest=driver.DockerRunner
docker stop karate
wait
================================================
FILE: examples/README.md
================================================
# Karate Examples
Karate Examples are being moved to this url: [Examples](https://github.com/karatelabs/karate-examples/blob/main/README.md). <-- please start here.
> The code in this folder are designed to be stand-alone Maven projects that you can use as a reference or as a starting point.
================================================
FILE: examples/consumer-driven-contracts/.gitignore
================================================
.DS_Store
target/
================================================
FILE: examples/consumer-driven-contracts/README.md
================================================
# Karate Consumer Driven Contracts Demo
## References
This is a simplified version of the [example in the Karate test-doubles documentation](https://github.com/karatelabs/karate/tree/master/karate-netty#consumer-provider-example) - with JMS / queues removed and simplified to be a stand-alone maven project.
These articles are recommended reading:
* [API Contract Testing - Visual Guide](https://www.linkedin.com/pulse/api-contract-testing-visual-guide-peter-thomas/)
* [Karate vs Pact](https://stackoverflow.com/a/64218355/143475)
## Instructions
* clone the project
* `mvn clean test`
## Main Artifacts
You can click on the links to view the source-code.
| File | Description | Comment |
| ---- | ----------- | ------- |
| [PaymentService.java](payment-producer/src/main/java/payment/producer/PaymentService.java) | Producer | A very simple [Spring Boot](https://spring.io/projects/spring-boot) app / REST service |
| [payment-contract.feature](payment-producer/src/test/java/payment/producer/contract/payment-contract.feature) | Contract + Functional Test | [Karate](https://github.com/karatelabs/karate) API test |
| [PaymentContractTest.java](payment-producer/src/test/java/payment/producer/contract/PaymentContractTest.java) | Producer Integration Test | JUnit runner for the above |
| [payment-mock.feature](payment-producer/src/test/java/payment/producer/mock/payment-mock.feature) | Mock / Stub | [Karate mock](https://github.com/karatelabs/karate/tree/master/karate-netty) that *perfectly* simulates the Producer ! |
| [PaymentContractAgainstMockTest.java](payment-producer/src/test/java/payment/producer/mock/PaymentContractAgainstMockTest.java) | Verify that the Mock is as per Contract | JUnit runner that points `payment-contract.feature` --> `payment-mock.feature` |
| [Consumer.java](payment-consumer/src/main/java/payment/consumer/Consumer.java) | Consumer | A simple Java app that calls the Producer to do some work |
| [ConsumerIntegrationTest.java](payment-consumer/src/test/java/payment/consumer/ConsumerIntegrationTest.java) | Consumer Integration Test | A JUnit *full* integration test, using the *real* Consumer and Producer |
| [ConsumerIntegrationAgainstMockTest.java](payment-consumer/src/test/java/payment/consumer/ConsumerIntegrationAgainstMockTest.java) | Consumer Integration Test but using the Mock | Like the above but using the mock Producer |
================================================
FILE: examples/consumer-driven-contracts/payment-consumer/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-cdc</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>examples-cdc-consumer</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-cdc-producer</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.7</version>
</dependency>
</dependencies>
</project>
================================================
FILE: examples/consumer-driven-contracts/payment-consumer/src/main/java/payment/consumer/Consumer.java
================================================
package payment.consumer;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import payment.producer.Payment;
/**
*
* @author pthomas3
*/
public class Consumer {
private static final Logger logger = LoggerFactory.getLogger(Consumer.class);
private final String paymentServiceUrl;
private final ObjectMapper mapper = new ObjectMapper();
public Consumer(String paymentServiceUrl) {
this.paymentServiceUrl = paymentServiceUrl;
}
private HttpURLConnection getConnection(String path) throws Exception {
URL url = new URL(paymentServiceUrl + path);
return (HttpURLConnection) url.openConnection();
}
public Payment create(Payment payment) {
try {
HttpURLConnection con = getConnection("/payments");
con.setRequestMethod("POST");
con.setDoOutput(true);
con.setRequestProperty("Content-Type", "application/json");
String json = mapper.writeValueAsString(payment);
IOUtils.write(json, con.getOutputStream(), "utf-8");
int status = con.getResponseCode();
if (status != 200) {
throw new RuntimeException("status code was " + status);
}
String content = IOUtils.toString(con.getInputStream(), StandardCharsets.UTF_8);
return mapper.readValue(content, Payment.class);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
================================================
FILE: examples/consumer-driven-contracts/payment-consumer/src/test/java/logback-test.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit.karate" level="DEBUG"/>
<logger name="com.mycompany" level="DEBUG"/>
<logger name="payment" level="DEBUG"/>
<root level="warn">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
================================================
FILE: examples/consumer-driven-contracts/payment-consumer/src/test/java/payment/consumer/ConsumerIntegrationAgainstMockTest.java
================================================
package payment.consumer;
import com.intuit.karate.core.MockServer;
import java.io.File;
import org.junit.jupiter.api.AfterAll;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import payment.producer.Payment;
/**
*
* @author pthomas3
*/
class ConsumerIntegrationAgainstMockTest {
static MockServer server;
static Consumer consumer;
@BeforeAll
static void beforeAll() {
File file = new File("../payment-producer/src/test/java/payment/producer/mock/payment-mock.feature");
server = MockServer.feature(file).http(0).build();
String paymentServiceUrl = "http://localhost:" + server.getPort();
consumer = new Consumer(paymentServiceUrl);
}
@Test
void testPaymentCreate() throws Exception {
Payment payment = new Payment();
payment.setAmount(5.67);
payment.setDescription("test one");
payment = consumer.create(payment);
assertTrue(payment.getId() > 0);
assertEquals(payment.getAmount(), 5.67, 0);
assertEquals(payment.getDescription(), "test one");
}
@AfterAll
static void afterAll() {
server.stop();
}
}
================================================
FILE: examples/consumer-driven-contracts/payment-consumer/src/test/java/payment/consumer/ConsumerIntegrationTest.java
================================================
package payment.consumer;
import org.junit.jupiter.api.AfterAll;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.context.ConfigurableApplicationContext;
import payment.producer.Payment;
import payment.producer.PaymentService;
/**
*
* @author pthomas3
*/
class ConsumerIntegrationTest {
static ConfigurableApplicationContext context;
static Consumer consumer;
@BeforeAll
static void beforeAll() {
context = PaymentService.start(0);
String paymentServiceUrl = "http://localhost:" + PaymentService.getPort(context);
consumer = new Consumer(paymentServiceUrl);
}
@Test
void testPaymentCreate() throws Exception {
Payment payment = new Payment();
payment.setAmount(5.67);
payment.setDescription("test one");
payment = consumer.create(payment);
assertTrue(payment.getId() > 0);
assertEquals(payment.getAmount(), 5.67, 0);
assertEquals(payment.getDescription(), "test one");
}
@AfterAll
static void afterAll() {
PaymentService.stop(context);
}
}
================================================
FILE: examples/consumer-driven-contracts/payment-producer/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-cdc</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>examples-cdc-producer</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
</dependencies>
</project>
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/main/java/payment/producer/Payment.java
================================================
package payment.producer;
/**
*
* @author pthomas3
*/
public class Payment {
private int id;
private double amount;
private String description;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public double getAmount() {
return amount;
}
public void setAmount(double amount) {
this.amount = amount;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
}
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/main/java/payment/producer/PaymentService.java
================================================
package payment.producer;
import java.util.Collection;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicInteger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.server.ResponseStatusException;
/**
*
* @author pthomas3
*/
@Configuration
@EnableAutoConfiguration
public class PaymentService {
@RestController
@RequestMapping("/payments")
class PaymentController {
private final AtomicInteger counter = new AtomicInteger();
private final Map<Integer, Payment> payments = new ConcurrentHashMap();
@PostMapping
public Payment create(@RequestBody Payment payment) {
int id = counter.incrementAndGet();
payment.setId(id);
payments.put(id, payment);
return payment;
}
@PutMapping("/{id:.+}")
public Payment update(@PathVariable("id") int id, @RequestBody Payment payment) {
payments.put(id, payment);
return payment;
}
@GetMapping
public Collection<Payment> list() {
return payments.values();
}
@GetMapping("/{id:.+}")
public Payment get(@PathVariable("id") int id) {
Payment payment = payments.get(id);
if (payment == null) {
throw new ResponseStatusException(HttpStatus.NOT_FOUND);
}
return payment;
}
@DeleteMapping("/{id:.+}")
public void delete(@PathVariable("id") int id) {
Payment payment = payments.remove(id);
if (payment == null) {
throw new RuntimeException("payment not found, id: " + id);
}
}
}
public static ConfigurableApplicationContext start(int port) {
return SpringApplication.run(PaymentService.class, new String[]{"--server.port=" + port});
}
public static void stop(ConfigurableApplicationContext context) {
SpringApplication.exit(context, () -> 0);
}
public static int getPort(ConfigurableApplicationContext context) {
ServerStartedInitializingBean ss = context.getBean(ServerStartedInitializingBean.class);
return ss.getLocalPort();
}
@Bean
public ServerStartedInitializingBean getInitializingBean() {
return new ServerStartedInitializingBean();
}
public static void main(String[] args) {
start(8090);
}
}
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/main/java/payment/producer/ServerStartedInitializingBean.java
================================================
package payment.producer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
/**
*
* @author pthomas3
*/
@Component
public class ServerStartedInitializingBean implements ApplicationRunner, ApplicationListener<WebServerInitializedEvent> {
private static final Logger logger = LoggerFactory.getLogger(ServerStartedInitializingBean.class);
private int localPort;
public int getLocalPort() {
return localPort;
}
@Override
public void run(ApplicationArguments aa) throws Exception {
logger.info("server started with args: {}", Arrays.toString(aa.getSourceArgs()));
}
@Override
public void onApplicationEvent(WebServerInitializedEvent e) {
localPort = e.getWebServer().getPort();
logger.info("after runtime init, local server port: {}", localPort);
}
}
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/test/java/karate-config.js
================================================
function() {
return { paymentServiceUrl: karate.properties['payment.service.url'] }
}
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/test/java/logback-test.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit.karate" level="DEBUG"/>
<logger name="com.mycompany" level="DEBUG"/>
<logger name="payment" level="DEBUG"/>
<root level="warn">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/contract/PaymentContractTest.java
================================================
package payment.producer.contract;
import com.intuit.karate.Results;
import com.intuit.karate.Runner;
import org.junit.jupiter.api.AfterAll;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.springframework.context.ConfigurableApplicationContext;
import payment.producer.PaymentService;
/**
*
* @author pthomas3
*/
class PaymentContractTest {
static ConfigurableApplicationContext context;
@BeforeAll
static void beforeAll() {
context = PaymentService.start(0);
}
@Test
void testReal() {
String paymentServiceUrl = "http://localhost:" + PaymentService.getPort(context);
Results results = Runner.path("classpath:payment/producer/contract/payment-contract.feature")
.systemProperty("payment.service.url", paymentServiceUrl)
.parallel(1);
assertTrue(results.getFailCount() == 0, results.getErrorMessages());
}
@AfterAll
static void afterAll() {
PaymentService.stop(context);
}
}
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/contract/payment-contract.feature
================================================
Feature: payment service contract test
Background:
* url paymentServiceUrl + '/payments'
Scenario: create, get, update, list and delete payments
Given request { amount: 5.67, description: 'test one' }
When method post
Then status 200
And match response == { id: '#number', amount: 5.67, description: 'test one' }
And def id = response.id
Given path id
When method get
Then status 200
And match response == { id: '#(id)', amount: 5.67, description: 'test one' }
Given path id
And request { id: '#(id)', amount: 5.67, description: 'test two' }
When method put
Then status 200
And match response == { id: '#(id)', amount: 5.67, description: 'test two' }
When method get
Then status 200
And match response contains { id: '#(id)', amount: 5.67, description: 'test two' }
Given path id
When method delete
Then status 200
When method get
Then status 200
And match response !contains { id: '#(id)', amount: '#number', description: '#string' }
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/mock/PaymentContractAgainstMockTest.java
================================================
package payment.producer.mock;
import com.intuit.karate.Results;
import com.intuit.karate.Runner;
import com.intuit.karate.core.MockServer;
import org.junit.jupiter.api.AfterAll;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
/**
*
* @author pthomas3
*/
class PaymentContractAgainstMockTest {
static MockServer server;
@BeforeAll
static void beforeAll() {
server = MockServer.feature("classpath:payment/producer/mock/payment-mock.feature").http(0).build();
}
@Test
void testMock() {
String paymentServiceUrl = "http://localhost:" + server.getPort();
Results results = Runner.path("classpath:payment/producer/contract/payment-contract.feature")
.systemProperty("payment.service.url", paymentServiceUrl)
.parallel(1);
assertTrue(results.getFailCount() == 0, results.getErrorMessages());
}
@AfterAll
static void afterAll() {
server.stop();
}
}
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/mock/payment-mock.feature
================================================
Feature: payment service mock
Background:
* def id = 0
* def payments = {}
Scenario: pathMatches('/payments') && methodIs('post')
* def payment = request
* def id = ~~(id + 1)
* payment.id = id
* payments[id + ''] = payment
* def response = payment
Scenario: pathMatches('/payments')
* def response = $payments.*
Scenario: pathMatches('/payments/{id}') && methodIs('put')
* payments[pathParams.id] = request
* def response = request
Scenario: pathMatches('/payments/{id}') && methodIs('delete')
* karate.remove('payments', pathParams.id)
Scenario: pathMatches('/payments/{id}')
* def response = payments[pathParams.id]
================================================
FILE: examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/mock/test.feature
================================================
Feature:
Scenario:
* print 'hello'
================================================
FILE: examples/consumer-driven-contracts/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-cdc</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>payment-producer</module>
<module>payment-consumer</module>
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.version>3.8.1</maven.compiler.version>
<maven.surefire.version>2.22.2</maven.surefire.version>
<spring.boot.version>3.2.2</spring.boot.version>
<junit5.version>5.7.0</junit5.version>
<java.version>17</java.version>
<karate.version>1.5.2</karate.version>
</properties>
<dependencies>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-core</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit5.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit5.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: examples/gatling/.gitignore
================================================
.DS_Store
target/
.idea/
================================================
FILE: examples/gatling/README.md
================================================
# karate-gatling-demo
demo sample project for karate [test-doubles](https://github.com/karatelabs/karate/tree/master/karate-netty) and [gatling integration](https://github.com/karatelabs/karate/tree/master/karate-gatling)
> Another example which demos the use of the Java DSL instead of Scala can be found here: [karate-todo](https://github.com/karatelabs/karate-todo).
## Instructions
```
mvn clean test
```
The above works because the `gatling-maven-plugin` has been configured to run as part of the Maven `test` phase automatically in the [`pom.xml`](pom.xml).
The file location of the Gatling HTML report should appear towards the end of the console log. Copy and paste it into your browser address-bar.
Here's a video of what to expect: https://twitter.com/ptrthomas/status/986463717465391104
================================================
FILE: examples/gatling/build.gradle
================================================
plugins {
id 'scala'
}
ext {
karateVersion = '1.5.2'
}
dependencies {
testImplementation "io.karatelabs:karate-gatling:${karateVersion}"
}
repositories {
mavenCentral()
// mavenLocal()
}
test {
systemProperty "karate.options", System.properties.getProperty("karate.options")
systemProperty "karate.env", System.properties.getProperty("karate.env")
outputs.upToDateWhen { false }
}
sourceSets {
test {
resources {
srcDir file('src/test/java')
exclude '**/*.java'
exclude '**/*.scala'
}
scala {
srcDirs = ['src/test/java']
}
}
}
// to run, type: "gradle gatling"
task gatlingRun(type: JavaExec) {
group = 'Web Tests'
description = 'Run Gatling Tests'
new File("${buildDir}/reports/gatling").mkdirs()
classpath = sourceSets.test.runtimeClasspath
main = "io.gatling.app.Gatling"
args = [
// change this to suit your simulation entry-point
'-s', 'mock.CatsKarateSimulation',
'-rf', "${buildDir}/reports/gatling"
]
systemProperties System.properties
}
================================================
FILE: examples/gatling/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-gatling</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<!-- please change this when running locally -->
<karate.version>${project.version}</karate.version>
<gatling.plugin.version>4.3.4</gatling.plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-core</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
<!-- next line is normally not required, but is here for testing karate release process -->
<classifier>all</classifier>
</dependency>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-gatling</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.5.6</version>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<arg>-Jbackend:GenBCode</arg>
<arg>-Jdelambdafy:method</arg>
<arg>-release:11</arg>
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-unchecked</arg>
<arg>-language:implicitConversions</arg>
<arg>-language:postfixOps</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling.plugin.version}</version>
<configuration>
<simulationsFolder>src/test/java</simulationsFolder>
<includes>
<include>mock.CatsKarateSimulation</include>
</includes>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: examples/gatling/src/test/java/karate-config.js
================================================
function(){
return {};
}
================================================
FILE: examples/gatling/src/test/java/logback-test.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<immediateFlush>false</immediateFlush>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<immediateFlush>false</immediateFlush>
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit.karate" level="DEBUG"/>
<root level="WARN">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
================================================
FILE: examples/gatling/src/test/java/mock/CatsGatlingSimulation.scala
================================================
package mock
import scala.language.postfixOps
import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
class CatsGatlingSimulation extends Simulation {
MockUtils.startServer()
val httpConf = http.baseUrl(System.getProperty("mock.cats.url"))
val create = scenario("create")
.pause(25 milliseconds)
.exec(http("POST /cats")
.post("/")
.body(StringBody("""{ "name": "Billie" }"""))
.check(status.is(200))
.check(jsonPath("$.name").is("Billie"))
.check(jsonPath("$.id")
.saveAs("id")))
.pause(10 milliseconds).exec(
http("GET /cats/{id}")
.get("/${id}")
.check(status.is(200))
.check(jsonPath("$.id").is("${id}"))
// intentional assertion failure
.check(jsonPath("$.name").is("Billi")))
.exitHereIfFailed
.exec(
http("PUT /cats/{id}")
.put("/${id}")
.body(StringBody("""{ "id":"${id}", "name": "Bob" }"""))
.check(status.is(200))
.check(jsonPath("$.id").is("${id}"))
.check(jsonPath("$.name").is("Bob")))
.pause(10 milliseconds).exec(
http("GET /cats/{id}")
.get("/${id}")
.check(status.is(200)))
val delete = scenario("delete")
.pause(15 milliseconds).exec(
http("GET /cats")
.get("/")
.check(status.is(200))
.check(jsonPath("$[*].id").findAll.optional
.saveAs("ids")))
.doIf(_.contains("ids")) {
foreach("${ids}", "id") {
pause(20 milliseconds).exec(
http("DELETE /cats/{id}")
.delete("/${id}")
.check(status.is(200))
.check(bodyString.is("")))
.pause(10 milliseconds).exec(
http("GET /cats/{id}")
.get("/${id}")
.check(status.is(404)))
}
}
setUp(
create.inject(rampUsers(10) during (5 seconds)).protocols(httpConf),
delete.inject(rampUsers(5) during (5 seconds)).protocols(httpConf)
)
}
================================================
FILE: examples/gatling/src/test/java/mock/CatsKarateSimulation.scala
================================================
package mock
import scala.language.postfixOps
import com.intuit.karate.gatling.PreDef._
import io.gatling.core.Predef._
import scala.concurrent.duration._
class CatsKarateSimulation extends Simulation {
MockUtils.startServer()
val feeder = Iterator.continually(Map("catName" -> MockUtils.getNextCatName))
val protocol = karateProtocol(
"/cats/{id}" -> Nil,
"/cats" -> pauseFor("get" -> 15, "post" -> 25)
)
protocol.nameResolver = (req, ctx) => req.getHeader("karate-name")
val create = scenario("create").feed(feeder).exec(karateFeature("classpath:mock/cats-create.feature"))
val delete = scenario("delete").group("delete cats") {
exec(karateFeature("classpath:mock/cats-delete.feature@name=delete"))
}
val custom = scenario("custom").exec(karateFeature("classpath:mock/custom-rpc.feature"))
setUp(
create.inject(rampUsers(10) during (5 seconds)).protocols(protocol),
delete.inject(rampUsers(5) during (5 seconds)).protocols(protocol),
custom.inject(rampUsers(10) during (5 seconds)).protocols(protocol)
)
}
================================================
FILE: examples/gatling/src/test/java/mock/MockUtils.java
================================================
package mock;
import com.intuit.karate.core.MockServer;
import com.intuit.karate.PerfContext;
import com.intuit.karate.Runner;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
/**
*
* @author pthomas3
*/
public class MockUtils {
public static void startServer() {
MockServer server = MockServer.feature("classpath:mock/mock.feature").build();
System.setProperty("mock.cats.url", "http://localhost:" + server.getPort() + "/cats");
}
private static final List<String> catNames = (List) Runner.runFeature("classpath:mock/feeder.feature", null, false).get("names");
private static final AtomicInteger counter = new AtomicInteger();
public static String getNextCatName() {
return catNames.get(counter.getAndIncrement() % catNames.size());
}
public static Map<String, Object> myRpc(Map<String, Object> map, PerfContext context) {
long startTime = System.currentTimeMillis();
// this is just an example, you can put any kind of code here
int sleepTime = (Integer) map.get("sleep");
try {
Thread.sleep(sleepTime);
} catch (Exception e) {
throw new RuntimeException(e);
}
long endTime = System.currentTimeMillis();
// and here is where you send the performance data to the reporting engine
context.capturePerfEvent("myRpc-" + sleepTime, startTime, endTime);
return Collections.singletonMap("success", true);
}
}
================================================
FILE: examples/gatling/src/test/java/mock/cats-create.feature
================================================
Feature: cats crud
Background:
* url karate.properties['mock.cats.url']
Scenario: create, get and update cat
# example of using the gatling session / feeder data
# note how this can still work as a normal test, without gatling
* def name = karate.get('__gatling.catName', 'Billie')
Given request { name: '#(name)' }
When method post
Then status 200
And match response == { id: '#uuid', name: '#(name)' }
* def id = response.id
Given path id
When method get
# this step may randomly fail because another thread is doing deletes
Then status 200
# intentional assertion failure
And match response == { id: '#(id)', name: 'Billi' }
# since we failed above, these lines will not be executed
Given path id
When request { id: '#(id)', name: 'Bob' }
When method put
Then status 200
And match response == { id: '#(id)', name: 'Bob' }
When method get
Then status 200
And match response contains { id: '#(id)', name: 'Bob' }
================================================
FILE: examples/gatling/src/test/java/mock/cats-delete-one.feature
================================================
@ignore
Feature: delete cat by id and verify
Scenario:
Given url karate.properties['mock.cats.url']
And path id
When method delete
Then status 200
And match response == ''
Given path id
And header karate-name = 'cats-get-404'
When method get
Then status 404
================================================
FILE: examples/gatling/src/test/java/mock/cats-delete.feature
================================================
Feature: delete all cats found
Background:
* url karate.properties['mock.cats.url']
Scenario: this scenario will be ignored because the gatling script looks for the tag @name=delete
* print 'this should not appear in the logs !'
When method get
Then status 400
@name=delete
Scenario: get all cats and then delete each by id
When method get
Then status 200
* def delete = read('cats-delete-one.feature')
* def result = call delete response
================================================
FILE: examples/gatling/src/test/java/mock/custom-rpc.feature
================================================
@ignore
Feature: even java interop performance test reports are possible
Background:
* def Utils = Java.type('mock.MockUtils')
Scenario: fifty
* def payload = { sleep: 50 }
* def response = Utils.myRpc(payload, karate)
* match response == { success: true }
Scenario: seventy five
* def payload = { sleep: 75 }
* def response = Utils.myRpc(payload, karate)
# this is deliberately set up to fail
* match response == { success: false }
Scenario: hundred
* def payload = { sleep: 100 }
* def response = Utils.myRpc(payload, karate)
* match response == { success: true }
================================================
FILE: examples/gatling/src/test/java/mock/feeder.feature
================================================
Feature: to generate a list of cat names
Scenario: any variables defined can be retrieved when called via the java api
* def names = ['Bob', 'Wild', 'Nyan', 'Ceiling']
================================================
FILE: examples/gatling/src/test/java/mock/mock.feature
================================================
Feature: cats stateful crud
Background:
* def uuid = function(){ return java.util.UUID.randomUUID() + '' }
* def cats = {}
Scenario: pathMatches('/cats') && methodIs('post')
* def cat = request
* def id = uuid()
* cat.id = id
* cats[id] = cat
* def response = cat
Scenario: pathMatches('/cats')
* def response = $cats.*
Scenario: pathMatches('/cats/{id}') && methodIs('put')
* cats[pathParams.id] = request
* def response = request
Scenario: pathMatches('/cats/{id}') && methodIs('delete')
* karate.remove('cats', pathParams.id)
* def responseDelay = 850
Scenario: pathMatches('/cats/{id}')
* def response = cats[pathParams.id]
* def responseStatus = response ? 200 : 404
================================================
FILE: examples/image-comparison/README.md
================================================
# Karate Image Comparison
This project is designed to demonstrate basic usage of the [Image Comparison](https://github.com/karatelabs/karate/#compare-image) feature. You can also watch a video explanation [here](https://youtu.be/wlvmNBraP60).
A more detailed video deep-dive can be viewed by skipping to 33:30 of this video: [Karate Version 1.3.0 Release Webinar
](https://youtu.be/oMsKNE_ctaM?t=2009)
## Overview
The [Image Comparison](https://github.com/karatelabs/karate/#compare-image) feature was introduced in [Karate 1.3.0](https://github.com/karatelabs/karate/wiki/1.3.0-Upgrade-Guide).
As a new feature with a number of options and a new UI component we wanted to provide a simple introduction to help users get started.
The included features are numbered 1 through 7 and build on each other.
They are intended to demonstrate how you might start from scratch without any baseline images on a new project:
* `1_establish_baseline.feature` establishes baseline images to use in future test runs
* `2_compare_baseline.feature` compares dynamic screenshots against our baseline images
* `3_custom_rebase.feature` demonstrates the use of the `onShowRebase` handler to customize the filename when rebasing
* `4_generic_rebase.feature` shows a slightly more advanced use of the `onShowRebase` handler that incorporates image comparison configuration options
* `5_custom_config.feature` shows a complete scenario that is similar to what you might use in real tests
* `6_outline.feature` explores a more complex use case with multiple browsers
* `7_api.feature` solves some issues identified in the outline feature above using the JS API
There is also a [screencast](https://youtu.be/wlvmNBraP60) that demonstrates basic usage of the diff UI in the Karate HTML report.
## Running
The `5_custom_config.feature` is a complete [Karate UI test](https://github.com/karatelabs/karate/tree/master/karate-core) that can be executed by running `ImageComparisonRunner` as a JUnit test.
You will be able to open the HTML report (the file-name will appear at the end of the console log) and refresh it when re-running the test.
To manually run the test execute the following commands:
* Install maven artifacts from the latest [develop](https://github.com/karatelabs/karate/tree/develop) branch locally
```
mvn clean install -P pre-release
```
* Run the test from the `examples/image-comparison` directory
```
mvn clean test -Dtest=ImageComparisonRunner
```
## Debugging
You should be able to use the [Karate extension for Visual Studio Code](https://github.com/karatelabs/karate/wiki/IDE-Support#vs-code-karate-plugin) for stepping-through a test for troubleshooting.
================================================
FILE: examples/image-comparison/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.karatelabs.examples</groupId>
<artifactId>image-comparison-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<maven.compiler.version>3.8.1</maven.compiler.version>
<karate.version>1.5.2</karate.version>
</properties>
<dependencies>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-junit5</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: examples/image-comparison/src/test/java/karate-config.js
================================================
function fn() {
karate.configure('retry', { count: 20, interval: 200 })
return {
baseUrl: karate.properties['web.url.base'] || 'http://localhost:8080/',
browsers: [
{
deviceType: 'phone',
width: 375,
height: 667,
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'
},
{
deviceType: 'tablet',
width: 820,
height: 1180,
useragent: 'Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1'
}
],
emulateBrowser(deviceType) {
const browser = karate.get('browsers').find(browser => browser.deviceType === deviceType)
return driver.emulateDevice(browser.width, browser.height, browser.userAgent)
}
}
}
================================================
FILE: examples/image-comparison/src/test/java/logback-test.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit.karate" level="DEBUG"/>
<logger name="ui" level="DEBUG"/>
<root level="warn">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
================================================
FILE: examples/image-comparison/src/test/java/ui/1_establish_baseline.feature
================================================
Feature: Image comparison demo
Background:
* configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailure: false }
* driver baseUrl + '?r=0.1'
* emulateBrowser('phone')
Scenario: Landing page
* configure imageComparison = { mismatchShouldPass: true }
* def loadingScreenshot = screenshot()
* compareImage { latest: #(loadingScreenshot) }
* waitFor('.welcome')
* def loadedScreenshot = screenshot()
* compareImage { latest: #(loadedScreenshot) }
================================================
FILE: examples/image-comparison/src/test/java/ui/2_compare_baseline.feature
================================================
Feature: Image comparison demo
Background:
* configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailure: false }
* driver baseUrl + '?r=0.75'
* emulateBrowser('phone')
Scenario: Landing page
* configure imageComparison = { mismatchShouldPass: true }
* def loadingScreenshot = screenshot()
* compareImage { baseline: 'this:screenshots/latest.png', latest: #(loadingScreenshot) }
* waitFor('.welcome')
* def loadedScreenshot = screenshot()
* compareImage { baseline: 'this:screenshots/latest.png', latest: #(loadedScreenshot) }
================================================
FILE: examples/image-comparison/src/test/java/ui/3_custom_rebase.feature
================================================
Feature: Image comparison demo
Background:
* configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailure: false }
* driver baseUrl + '?r=0.75'
* emulateBrowser('phone')
Scenario: Landing page
* def loadingScreenshot = screenshot()
* configure imageComparison = { onShowRebase: "(cfg, saveAs) => saveAs('loading.png')", mismatchShouldPass: true }
* compareImage { baseline: 'this:screenshots/latest.png', latest: #(loadingScreenshot) }
* waitFor('.welcome')
* def loadedScreenshot = screenshot()
* configure imageComparison = { onShowRebase: "(cfg, saveAs) => saveAs('loaded.png')", mismatchShouldPass: true }
* compareImage { baseline: 'this:screenshots/latest.png', latest: #(loadedScreenshot) }
================================================
FILE: examples/image-comparison/src/test/java/ui/4_generic_rebase.feature
================================================
Feature: Image comparison demo
Background:
* configure imageComparison = { onShowRebase: '(cfg, saveAs) => saveAs(cfg.name)', mismatchShouldPass: true }
* configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailure: false }
* driver baseUrl + '?r=1.2'
* emulateBrowser('phone')
Scenario: Landing page
* def loadingScreenshot = screenshot()
* def loadingOpts =
"""
{
name: 'loading.png'
}
"""
* compareImage { baseline: 'this:screenshots/loading.png', latest: #(loadingScreenshot), options: #(loadingOpts) }
* waitFor('.welcome')
* def loadedScreenshot = screenshot()
* def loadedOpts =
"""
{
name: 'loaded.png'
}
"""
* compareImage { baseline: 'this:screenshots/loaded.png', latest: #(loadedScreenshot), options: #(loadedOpts) }
================================================
FILE: examples/image-comparison/src/test/java/ui/5_custom_config.feature
================================================
Feature: Image comparison demo
Background:
* configure imageComparison = { onShowRebase: '(cfg, saveAs) => saveAs(cfg.name)' }
* configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailure: false }
* driver baseUrl + '?r=1.2'
* emulateBrowser('phone')
Scenario: Landing page
* def loadingScreenshot = screenshot()
* def loadingOpts =
"""
{
name: 'loading.png',
"ignoredBoxes": [{
"top": 278,
"left": 131,
"bottom": 391,
"right": 246
}]
}
"""
* compareImage { baseline: 'this:screenshots/loading.png', latest: #(loadingScreenshot), options: #(loadingOpts) }
* waitFor('.welcome')
* def loadedScreenshot = screenshot()
* def loadedOpts =
"""
{
name: 'loaded.png',
"ignoredBoxes": [{
"top": 73,
"left": 17,
"bottom": 125,
"right": 188
}]
}
"""
* compareImage { baseline: 'this:screenshots/loaded.png', latest: #(loadedScreenshot), options: #(loadedOpts) }
================================================
FILE: examples/image-comparison/src/test/java/ui/6_outline.feature
================================================
Feature: Image comparison demo
Background:
* configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailure: false }
@setup
Scenario:
* copy data = browsers
Scenario Outline: Landing page - <deviceType>
# change to `false` after establishing baseline images... it would be nice if the baseline was created automatically
* def firstRun = true
* configure imageComparison = { onShowRebase: '(cfg, saveAs) => saveAs(cfg.name)', mismatchShouldPass: #(firstRun) }
* driver baseUrl + (firstRun ? '?r=0.75' : '?r=1.5')
* emulateBrowser('<deviceType>')
# we have a problem below: the `tablet` device has a different screen size and our `ignoredBoxes` will be off
* def loadingScreenshot = screenshot()
* def loadingOpts =
"""
{
name: 'loading_<deviceType>.png',
"ignoredBoxes": [{
"top": 278,
"left": 131,
"bottom": 391,
"right": 246
}]
}
"""
* def loadingBaselinePath = firstRun ? null : `this:screenshots/${loadingOpts.name}`
* compareImage { baseline: #(loadingBaselinePath), latest: #(loadingScreenshot), options: #(loadingOpts) }
* waitFor('.welcome')
* def loadedScreenshot = screenshot()
* def loadedOpts =
"""
{
name: 'loaded_<deviceType>.png',
"ignoredBoxes": [{
"top": 73,
"left": 17,
"bottom": 125,
"right": 188
}]
}
"""
* def loadedBaselinePath = firstRun ? null : `this:screenshots/${loadedOpts.name}`
* compareImage { baseline: #(loadedBaselinePath), latest: #(loadedScreenshot), options: #(loadedOpts) }
Examples:
| karate.setup().data |
================================================
FILE: examples/image-comparison/src/test/java/ui/7_api.feature
================================================
Feature: Image comparison demo
Background:
# `screenGrab` processes a named image comparison by:
# - capturing a screenshot to use as the latest image
# - locating the correct baseline image from the filesystem (if one exists)
# - fetching comparison options from the filesystem (if they exist)
# - automatically copying the latest image to be the new baseline when no baseline exists
# - executing `compareImage` using the named baseline image, the latest screenshot, and dynamically-loaded options
* def screenGrab =
"""
function (name) {
const latestBytes = screenshot(false)
const File = Java.type('java.io.File')
const latestFile = karate.write(latestBytes, `screenshots/${name}.png`)
const baselineFile = new File(karate.toAbsolutePath('this:screenshots'), `${name}.png`)
const optionsFile = new File(karate.toAbsolutePath('this:screenshots/config'), `${name}.json`)
// read options from browser-specific config JSON (if exists)
const options = optionsFile.exists() ? karate.read('file:' + optionsFile.getPath()) : {}
options.baselinePath = baselineFile.getPath()
options.latestPath = new File(karate.toAbsolutePath('this:' + latestFile.getPath())).getPath()
options.optionsPath = optionsFile.getPath()
let baselinePath = 'file:' + options.baselinePath
if (!baselineFile.exists()) {
// automatically copy latest image to baseline when no baseline exists
java.nio.file.Files.copy(latestFile.toPath(), baselineFile.toPath())
baselinePath = null
}
const result = karate.compareImage(baselinePath, latestBytes, options)
if (result.error && !result.isBaselineMissing) throw new Error(result.error)
return result
}
"""
# instead of manually downloading / managing rebased images we'll provide a shell command to copy/paste
* def rebaseFn = 'cfg => `cp \\\\\n ${cfg.latestPath} \\\\\n ${cfg.baselinePath}`'
# since we now want the configuration to be stored on the filesystem we'll provide a shell command to copy/paste
* def configFn = '(imgConfigStr, cfg) => `cat << EOF > ${cfg.optionsPath}\n${imgConfigStr}\nEOF`'
* configure imageComparison = { mismatchShouldPass: true, onShowRebase: #(rebaseFn), onShowConfig: #(configFn) }
* configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailure: false }
* driver baseUrl
@setup
Scenario:
* copy data = browsers
Scenario Outline: Landing page - <deviceType>
* emulateBrowser('<deviceType>')
* screenGrab('loading_<deviceType>')
* waitFor('.welcome')
* screenGrab('loaded_<deviceType>')
Examples:
| karate.setup().data |
================================================
FILE: examples/image-comparison/src/test/java/ui/ImageComparisonRunner.java
================================================
package ui;
import com.intuit.karate.http.HttpServer;
import com.intuit.karate.junit5.Karate;
import org.junit.jupiter.api.BeforeAll;
class ImageComparisonRunner {
@BeforeAll
public static void beforeAll() {
HttpServer server = MockRunner.start(0);
System.setProperty("web.url.base", "http://localhost:" + server.getPort());
}
@Karate.Test
Karate testUi() {
return Karate.run("classpath:ui/7_api.feature");
}
}
================================================
FILE: examples/image-comparison/src/test/java/ui/MockRunner.java
================================================
package ui;
import com.intuit.karate.http.HttpServer;
import com.intuit.karate.http.ServerConfig;
import org.junit.jupiter.api.Test;
/**
* run this as a junit test to start an http server at port 8080 the html page
* can be viewed at http://localhost:8080/ kill / stop this process when done
*/
class MockRunner {
@Test
public void testStart() {
start(8080).waitSync();
}
public static HttpServer start(int port) {
ServerConfig config = new ServerConfig("src/test/java/ui/html")
.autoCreateSession(true);
return HttpServer.config(config).http(port).build();
}
}
================================================
FILE: examples/image-comparison/src/test/java/ui/html/index.html
================================================
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Karate Image Comparison</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400&display=swap" rel="stylesheet">
<style>
html, body {
font-family: 'Roboto Mono', monospace;
text-shadow: 0 0 2px #858585;
background-color: black;
color: #f9f9f9;
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
article {
flex-direction: column;
align-items: stretch;
min-height: 100%;
display: flex;
}
main {
align-items: center;
text-align: center;
display: flex;
flex-grow: 1;
}
header, main, footer {
flex-shrink: 0;
}
header {
align-items: center;
flex-wrap: wrap;
display: flex;
}
header span {
text-shadow: 0 0 2px #858585;
font-size: 35px;
opacity: 0.95;
}
footer {
display: flex;
}
footer span {
opacity: 0.95;
margin: 20px;
}
a, a:visited {
color: #f9f9f9;
}
h2 {
font-size: 40px;
opacity: 0.95;
flex-grow: 1;
}
@media (max-width:768px) {
header span {
margin: -40px 0 20px 20px;
font-size: 23px;
}
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/spin.js/4.1.1/spin.min.css" integrity="sha512-ssYEuK9Epo/48VIlBWTFosf1izrgGZqEMELJP+L7Clh0nvaOSTg87dM+Z8L+KKjrPdMbMvKYOOnzBOkNMhWFsg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script type="module">
import {Spinner} from 'https://cdnjs.cloudflare.com/ajax/libs/spin.js/4.1.0/spin.min.js';
const randomSeed = parseFloat(new URLSearchParams(window.location.search).get('r')) || Math.random()
const loadingEl = document.getElementsByTagName('main')[0]
new Spinner({
lines: 13,
length: 38,
width: 17,
radius: 45,
scale: 0.5,
corners: 1,
speed: 1 + randomSeed,
rotate: 0,
animation: 'spinner-line-fade-quick',
direction: 1,
color: '#ffffff',
fadeColor: 'transparent',
top: '50%',
left: '50%',
shadow: '0 0 1px transparent',
zIndex: 2000000000,
className: 'spinner',
position: 'absolute',
}).spin(loadingEl);
setTimeout(() => loadingEl.innerHTML = '<h2 class="welcome">Welcome!</h2>', 1000 + (randomSeed * 1000))
</script>
</head>
<body>
<article>
<header>
<img src="logo.gif" alt="Karate" id="logo">
<span>Image Comparison Demo</span>
</header>
<main></main>
<footer>
<span>© <a href="https://github.com/karatelabs/karate">Karate 2022</a></span>
</footer>
</article>
</body>
</html>
================================================
FILE: examples/image-comparison/src/test/java/ui/screenshots/config/loaded_phone.json
================================================
{
"ignoredBoxes": [
{
"top": 75,
"left": 13,
"bottom": 128,
"right": 191
}
]
}
================================================
FILE: examples/image-comparison/src/test/java/ui/screenshots/config/loaded_tablet.json
================================================
{
"ignoredBoxes": [
{
"top": 59,
"left": 10,
"bottom": 139,
"right": 195
}
]
}
================================================
FILE: examples/image-comparison/src/test/java/ui/screenshots/config/loading_phone.json
================================================
{
"ignoredBoxes": [
{
"top": 262,
"left": 108,
"bottom": 396,
"right": 261
}
]
}
================================================
FILE: examples/image-comparison/src/test/java/ui/screenshots/config/loading_tablet.json
================================================
{
"ignoredBoxes": [
{
"top": 531,
"left": 344,
"bottom": 652,
"right": 471
}
]
}
================================================
FILE: examples/mobile-test/README.md
================================================
# Examples - Karate Mobile (Appium)
> Please consider Mobile support as experimental. But we are very close and there are some teams that use Karate for simple use-cases. Please contribute code if you can.
## Overview
This project is to replicate issues with the [Karate UI framework](https://github.com/karatelabs/karate/tree/develop/karate-core) for mobile app testing using appium.
## Running
> Before running:
> * change `karate.version` in [`pom.xml`](pom.xml)
> * change `platformVersion`,`avd` in [`karate-config.js`](src/test/java/karate-config.js) according to your local android `avd` setup and add/remove the desiredCapabilities according to your requirement.
> * start appium server manually when `android.feature` has `configure driver` with `start: false`
> * change `configure driver` to `start: true` if you want karate to start appium driver automatically (this is experimental and needs appium pre-installed via `npm`)
The [`android.feature`](src/test/java/android/android.feature) is a simple [Karate UI test](https://github.com/karatelabs/karate/tree/develop/karate-core), and executing `AndroidRunner` as a JUnit test will run it.
Refer [`Documentation`](https://github.com/karatelabs/karate/tree/develop/karate-core#appium) for currently supported methods
================================================
FILE: examples/mobile-test/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.karatelabs.examples</groupId>
<artifactId>mobile-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<maven.compiler.version>3.8.1</maven.compiler.version>
<maven.surefire.version>2.22.2</maven.surefire.version>
<karate.version>1.5.2</karate.version>
</properties>
<dependencies>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-junit5</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: examples/mobile-test/src/test/java/android/AndroidTest.java
================================================
package android;
import com.intuit.karate.junit5.Karate;
/**
* @author babusekaran
*/
class AndroidTest {
@Karate.Test
public Karate test() {
return Karate.run("classpath:android/android.feature");
}
}
================================================
FILE: examples/mobile-test/src/test/java/android/android.feature
================================================
Feature: android test
Background: App Preset
* configure driver = { type: 'android', webDriverPath : "/wd/hub", start: false, httpConfig : { readTimeout: 120000 }}
Scenario: android mobile app UI tests
Given driver { webDriverSession: { desiredCapabilities : "#(android.desiredConfig)"} }
And driver.click('#com.bs.droidaction:id/showTextCheckBox')
And driver.clear('#com.bs.droidaction:id/showTextOnDelay').input("10000")
And driver.input('#com.bs.droidaction:id/editTextBox', "KarateDSL")
And driver.click('#com.bs.droidaction:id/showTextCheckBox')
And retry(10, 1000).waitForAny("#com.bs.droidaction:id/nameTextView", "//android.widget.TextView[@text='KarateDSL']")
Then match driver.text('#com.bs.droidaction:id/nameTextView') == 'KarateDSL'
And driver.click('#com.bs.droidaction:id/showTextCheckBox')
And assert (optional('#com.bs.droidaction:id/nameTextView').present != true)
================================================
FILE: examples/mobile-test/src/test/java/karate-config.js
================================================
function fn() {
var config = {}
var android = {}
android["desiredConfig"] = {
"app" : "https://github.com/babusekaran/droidAction/raw/main/build/UiDemo.apk",
"newCommandTimeout" : 300,
"platformVersion" : "9.0",
"platformName" : "Android",
"connectHardwareKeyboard" : true,
"deviceName" : "emulator-5554",
"avd" : "Pixel2_PIE",
"automationName" : "UiAutomator2"
}
config["android"] = android
return config;
}
================================================
FILE: examples/mobile-test/src/test/java/logback-test.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit" level="DEBUG"/>
<root level="info">
<appender-ref ref="STDOUT"/>
<appender-ref ref="FILE"/>
</root>
</configuration>
================================================
FILE: examples/profiling-test/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.karatelabs.examples</groupId>
<artifactId>profiling-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<karate.version>1.5.2</karate.version>
<gatling.plugin.version>4.1.1</gatling.plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-gatling</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>4.5.6</version>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<arg>-Jbackend:GenBCode</arg>
<arg>-Jdelambdafy:method</arg>
<arg>-target:jvm-1.8</arg>
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-unchecked</arg>
<arg>-language:implicitConversions</arg>
<arg>-language:postfixOps</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling.plugin.version}</version>
<configuration>
<simulationsFolder>src/test/java</simulationsFolder>
<includes>
<include>perf.TestSimulation</include>
</includes>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<name>profiling-test</name>
</project>
================================================
FILE: examples/profiling-test/src/test/java/karate-config.js
================================================
function fn() {
var config = karate.call('classpath:perf/called.feature');
karate.log('config:', config);
return config;
}
================================================
FILE: examples/profiling-test/src/test/java/logback-test.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<immediateFlush>false</immediateFlush>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<immediateFlush>false</immediateFlush>
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit.karate" level="WARN"/>
<root level="WARN">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
================================================
FILE: examples/profiling-test/src/test/java/perf/Main.java
================================================
package perf;
import com.intuit.karate.PerfHook;
import com.intuit.karate.Runner;
import com.intuit.karate.core.FeatureResult;
import com.intuit.karate.core.PerfEvent;
import com.intuit.karate.core.ScenarioRuntime;
import com.intuit.karate.http.HttpRequest;
/**
*
* @author pthomas3
*/
public class Main {
public static void main(String[] args) {
TestUtils.startServer();
int count = 0;
PerfHook hook = new PerfHook() {
@Override
public String getPerfEventName(HttpRequest request, ScenarioRuntime sr) {
return request.getMethod() + " " + request.getUrl();
}
@Override
public void reportPerfEvent(PerfEvent event) {
}
@Override
public void submit(Runnable runnable) {
runnable.run();
}
@Override
public void afterFeature(FeatureResult fr) {
}
@Override
public void pause(Number millis) {
}
};
Runner.Builder builder = Runner.builder();
while (true) {
Runner.callAsync(builder, "classpath:perf/test.feature", null, hook);
count++;
System.out.print(count + " ");
if (count % 100 == 0) {
System.out.println("");
}
}
}
}
================================================
FILE: examples/profiling-test/src/test/java/perf/TestSimulation.scala
================================================
package perf
import com.intuit.karate.gatling.PreDef._
import io.gatling.core.Predef._
import scala.concurrent.duration._
class TestSimulation extends Simulation {
val protocol = karateProtocol()
TestUtils.startServer()
val main = scenario("main").exec(karateFeature("classpath:perf/main.feature"))
val called = scenario("called").exec(karateFeature("classpath:perf/called.feature"))
val chained = scenario("chained")
.exec(main)
.exec(karateSet("extraKey", s => "extraValue"))
.exec(called)
setUp(
chained.inject(
rampUsers(20).during(5.seconds),
constantUsersPerSec(20).during(10.minutes)
).protocols(protocol)
)
}
================================================
FILE: examples/profiling-test/src/test/java/perf/TestUtils.java
================================================
package perf;
import com.intuit.karate.core.MockServer;
/**
*
* @author pthomas3
*/
public class TestUtils {
public static void startServer() {
MockServer server = MockServer.feature("classpath:perf/mock.feature").build();
System.setProperty("mock.server.url", "http://localhost:" + server.getPort());
}
}
================================================
FILE: examples/profiling-test/src/test/java/perf/called.feature
================================================
Feature:
Scenario:
* def var1 = { foo: 'bar' }
* def var2 = { baz: { hello: 'world' } }
* def var3 = function(name){ return 'hello ' + name }
* def extraKey = karate.get('extraKey')
# to see the next line in the log, change level to warn
* if (extraKey) karate.logger.info('called from gatling:', extraKey)
================================================
FILE: examples/profiling-test/src/test/java/perf/main.feature
================================================
Feature:
Background:
* def backgroundData = callonce read('called.feature')
* url karate.properties['mock.server.url']
Scenario:
* path 'test'
* method get
* match response == { success: true }
* match backgroundData contains { var1: { foo: 'bar' } }
* def scenarioData = call read('called.feature') { callArgData: '#backgroundData' }
* match scenarioData contains { var2: { baz: { hello: 'world' } } }
================================================
FILE: examples/profiling-test/src/test/java/perf/mock.feature
================================================
Feature:
Scenario: pathMatches('/test')
* def response = { success: true }
================================================
FILE: examples/robot-test/README.md
================================================
# Examples - Karate Robot
This is designed to be a simple Maven project to get started with [`karate-robot`](https://github.com/karatelabs/karate/tree/master/karate-robot).
* [`chrome.feature`](src/test/java/chrome/chrome.feature) - this example will switch to Google Chrome (assumed to be open) and perform a search using only keystrokes and navigation using image-detection
================================================
FILE: examples/robot-test/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-robot-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<maven.compiler.version>3.8.1</maven.compiler.version>
<maven.surefire.version>2.22.2</maven.surefire.version>
<karate.version>1.5.2</karate.version>
</properties>
<dependencies>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-robot</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-junit5</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: examples/robot-test/src/test/java/karate-config.js
================================================
function fn() {
return {};
}
================================================
FILE: examples/robot-test/src/test/java/logback-test.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit" level="DEBUG"/>
<root level="info">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
================================================
FILE: examples/robot-test/src/test/java/mac/ChromeRunner.java
================================================
package mac;
import com.intuit.karate.junit5.Karate;
/**
*
* @author pthomas3
*/
class ChromeRunner {
@Karate.Test
Karate testChrome() {
return Karate.run("classpath:mac/chrome.feature");
}
}
================================================
FILE: examples/robot-test/src/test/java/mac/chrome.feature
================================================
Feature: mac - robot and chrome
Scenario:
# * karate.exec('Chrome')
# or make sure Chrome is open
* robot { window: '^Chrome', highlight: true, highlightDuration: 500 }
* input(Key.META + 't')
* input('karate dsl' + Key.ENTER)
* waitFor('tams.png').click()
* delay(2000)
* screenshot()
================================================
FILE: examples/robot-test/src/test/java/win/CalcRunner.java
================================================
package win;
import com.intuit.karate.junit5.Karate;
/**
*
* @author pthomas3
*/
class CalcRunner {
@Karate.Test
Karate testCalc() {
return Karate.run("classpath:win/calc.feature");
}
}
================================================
FILE: examples/robot-test/src/test/java/win/calc.feature
================================================
Feature: windows calculator
Scenario:
* robot { window: 'Calculator', fork: 'calc', highlight: true, highlightDuration: 500 }
* click('Clear')
* click('One')
* click('Plus')
* click('Two')
* click('Equals')
* match locate('#CalculatorResults').name == 'Display is 3'
* screenshot()
* click('Close Calculator')
================================================
FILE: examples/ui-test/README.md
================================================
# Karate UI Test
This project is designed to be the simplest way to replicate issues with the [Karate UI framework](https://github.com/karatelabs/karate/tree/master/karate-core) for web-browser testing. It includes an HTTP mock that serves HTML and JavaScript, which you can easily modify to simulate complex situations such as a slow-loading element. To submit an issue after you have a way to replicate the scenario, follow these instructions: [How to Submit an Issue](https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue).
## Overview
To point to a specifc version of Karate, edit the `pom.xml`. If you are working with the source-code of Karate, follow the [developer guide](https://github.com/karatelabs/karate/wiki/Developer-Guide).
You can view the HTML source of `page-01.html` to see how it works. It depends on `karate.js` which is very simple, so you can see how to add any JS (if required) along the same lines.
The code in [`MockRunner.java`](src/test/java/ui/MockRunner.java) starts a Karate HTTP server. Note how it is very simple - but able to serve both HTML and JS. If you need to include navigation to a second page, you can easily add a second HTML file. To manually verify the HTML that will be served, you can start the mock-server by running `MockRunner` as a JUnit test, and then opening [`http://localhost:8080/page-01`](http://localhost:8080/page-01) in a browser. And yes, hot-reloading is possible !
## Running
The `test.feature` is a simple [Karate UI test](https://github.com/karatelabs/karate/tree/master/karate-core) that can be executed by running `UiRunner` as a JUnit test. You will be able to open the HTML report (the file-name will appear at the end of the console log) and refresh it when re-running the test. For convenience, this test is a `Scenario Outline` - set up so that you can add multiple browser targets or driver implementations. This makes it easy to validate cross-browser compatibility.
## Debugging
You should be able to use the [Karate extension for Visual Studio Code](https://github.com/karatelabs/karate/wiki/IDE-Support#vs-code-karate-plugin) for stepping-through a test for troubleshooting.
## WebDriver Tips
If you are targeting a WebDriver implementation, you may need to experiment with HTTP calls. Don't forget that that is Karate's core competency ! So you can use a "scratchpad" Karate test on the side, like this, after you have manually started a "driver executable", [`chromedriver`](https://chromedriver.chromium.org) in this case:
```cucumber
Feature:
Scenario:
* url 'http://localhost:9515'
* path 'session'
* request {"capabilities":{"browserName":"msedge"}}
* method post
```
Within a test script, as a convenience, the `driver` object exposes an `http` property, which makes it easy to make custom-crafted WebDriver requests using the [`Http` helper / class](../../karate-core/src/main/java/com/intuit/karate/Http.java). Note that this will be available only after the [`driver` keyword](https://github.com/karatelabs/karate/tree/master/karate-core#driver) has been used, and thus a WebDriver session has been initialized.
Here is an example of [getting the page title](https://w3c.github.io/webdriver/#get-title):
```cucumber
* def temp = driver.http.path('title').get().body().asMap()
* print 'temp:', temp
```
Which results in a `GET` request to: `http://localhost:9515/session/{sessionId}/title` - and the response body will be printed. Now you can easily extract data out of the response JSON.
And here is how you can make a `POST` request, to [navigate to a given URL](https://w3c.github.io/webdriver/#navigate-to):
```cucumber
* driver.http.path('url').post({ url: 'https://github.com' })
```
And note that the [official Karate plugins](https://github.com/karatelabs/karate/wiki/IDE-Support) are really convenient for re-running tests - or you can pause a test using a break-point and [type in interactive commands](https://twitter.com/getkarate/status/1546468347826827264).
## DevTools Protocol Tips
When using the driver type `chrome`, you can call the `send()` method and pass a raw JSON message that will be sent to the Chrome browser using a WebSocket connection. For example here is how to get the [metadata about frames](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-getFrameTree):
```cucumber
* def temp = driver.send({ method: 'Page.getFrameTree' })
* print 'temp:', temp
```
This will result in the following raw message sent (Karate will supply the `id` automatically):
```
{"method":"Page.getFrameTree","id":7}
```
Chrome will respond with something like this, which should be viewable in the log / console:
```
{"id":7,"result":{"frameTree":{"frame":{"id":"11B3A5ABDEE5802201D84389EE0215B8","loaderId":"D2241AD7B86ED533F095F907A78A1208","url":"http://localhost:52664/page-01","securityOrigin":"http://localhost:52664","mimeType":"text/html"}}}}
```
You can do more, but this should be sufficient for exploring the possible commands and troubleshooting via trial and error. And then you can suggest / contribute changes to be made to the code, e.g. the [DevToolsDriver](../../karate-core/src/main/java/com/intuit/karate/driver/DevToolsDriver.java).
================================================
FILE: examples/ui-test/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.karatelabs.examples</groupId>
<artifactId>examples-ui-test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<karate.version>1.5.2</karate.version>
</properties>
<dependencies>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-junit5</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgument>-Werror</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: examples/ui-test/src/test/java/logback-test.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit.karate" level="DEBUG"/>
<logger name="ui" level="DEBUG"/>
<root level="warn">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
================================================
FILE: examples/ui-test/src/test/java/ui/MockRunner.java
================================================
package ui;
import com.intuit.karate.http.HttpServer;
import com.intuit.karate.http.ServerConfig;
import org.junit.jupiter.api.Test;
/**
* run this as a junit test to start an http server at port 8080 the html page
* can be viewed at http://localhost:8080/page-01 kill / stop this process when
* done
*/
class MockRunner {
@Test
public void testStart() {
start(8080).waitSync();
}
public static HttpServer start(int port) {
ServerConfig config = new ServerConfig("src/test/java/ui/html")
.autoCreateSession(true);
return HttpServer.config(config).port(port).build();
}
}
================================================
FILE: examples/ui-test/src/test/java/ui/UiRunner.java
================================================
package ui;
import com.intuit.karate.http.HttpServer;
import com.intuit.karate.junit5.Karate;
import org.junit.jupiter.api.BeforeAll;
class UiRunner {
@BeforeAll
public static void beforeAll() {
HttpServer server = MockRunner.start(0);
System.setProperty("web.url.base", "http://localhost:" + server.getPort());
}
@Karate.Test
Karate testUi() {
return Karate.run("classpath:ui/test.feature");
}
}
================================================
FILE: examples/ui-test/src/test/java/ui/html/index.html
================================================
<!doctype html>
<html>
<head>
<title>Index</title>
</head>
<body>
<p><a href="/page-01">Page 01</a></p>
</body>
</html>
================================================
FILE: examples/ui-test/src/test/java/ui/html/karate.js
================================================
var karate = {};
karate.get = function(id) { return document.getElementById(id) };
karate.setHtml = function(id, value) { this.get(id).innerHTML = value };
================================================
FILE: examples/ui-test/src/test/java/ui/html/page-01.html
================================================
<!doctype html>
<html>
<head>
<title>Page One</title>
<style>
.foo { color: blue };
</style>
<script src="karate.js"></script>
<script>
function setPlaceholder(){ karate.setHtml('placeholder', 'After') }
// simulate an element that appears in the DOM only after 5 seconds
setTimeout(function(){ karate.setHtml('slowparent', '<div id="slowelement">APPEARED!</div>') }, 5000);
</script>
</head>
<body>
<button onclick="setPlaceholder()">Click Me</button>
<div id="placeholder" class="foo">Before</div>
<div id="slowparent">Waiting</div>
</body>
</html>
================================================
FILE: examples/ui-test/src/test/java/ui/test.feature
================================================
Feature: ui test
Scenario Outline: <type>
* def webUrlBase = karate.properties['web.url.base']
* configure driver = { type: '#(type)', showDriverLog: true }
* driver webUrlBase + '/page-01'
* match text('#placeholder') == 'Before'
* click('{}Click Me')
* match text('#placeholder') == 'After'
Examples:
| type |
| chrome |
#| chromedriver |
#| geckodriver |
#| safaridriver |
================================================
FILE: examples/zip-release/src/demo/api/httpbin.feature
================================================
Feature: simple requests
Scenario: simple sequence
Given url 'https://httpbin.org/anything'
And request { myKey: 'myValue' }
When method post
Then status 200
And match response contains { json: { myKey: 'myValue' } }
* path response.json.myKey
* method get
* status 200
================================================
FILE: examples/zip-release/src/demo/api/users.feature
================================================
Feature: sample karate api test script
Background:
* url 'https://jsonplaceholder.typicode.com'
Scenario: get all users and then get the first user by id
Given path 'users'
When method get
Then status 200
* def first = response[0]
Given path 'users', first.id
When method get
Then status 200
Scenario: create a user and then get it by id
* def user =
"""
{
"name": "Test User",
"username": "testuser",
"email": "test@user.com",
"address": {
"street": "Has No Name",
"suite": "Apt. 123",
"city": "Electri",
"zipcode": "54321-6789"
}
}
"""
Given url 'https://jsonplaceholder.typicode.com/users'
And request user
When method post
Then status 201
* def id = response.id
* print 'created id is: ', id
Given path id
# When method get
# Then status 200
# And match response contains user
================================================
FILE: examples/zip-release/src/demo/mock/cats-mock.feature
================================================
@ignore
Feature: stateful mock server
Background:
* configure cors = true
* def uuid = function(){ return java.util.UUID.randomUUID() + '' }
* def cats = {}
Scenario: pathMatches('/cats') && methodIs('post')
* def cat = request
* def id = uuid()
* cat.id = id
* cats[id] = cat
* def response = cat
Scenario: pathMatches('/cats')
* def response = $cats.*
Scenario: pathMatches('/cats/{id}')
* def response = cats[pathParams.id]
Scenario: pathMatches('/hardcoded')
* def response = { hello: 'world' }
Scenario:
# catch-all
* def responseStatus = 404
* def responseHeaders = { 'Content-Type': 'text/html; charset=utf-8' }
* def response = <html><body>Not Found</body></html>
================================================
FILE: examples/zip-release/src/demo/mock/cats-test.feature
================================================
Feature: integration test for the mock
Background:
* def port = karate.env == 'mock' ? karate.start('cats-mock.feature').port : 8080
* url 'http://localhost:' + port + '/cats'
Scenario: create cat
Given request { name: 'Billie' }
When method post
Then status 200
And match response == { id: '#uuid', name: 'Billie' }
And def id = response.id
Given path id
When method get
Then status 200
And match response == { id: '#(id)', name: 'Billie' }
When method get
Then status 200
And match response contains [{ id: '#(id)', name: 'Billie' }]
Given request { name: 'Bob' }
When method post
Then status 200
And match response == { id: '#uuid', name: 'Bob' }
And def id = response.id
Given path id
When method get
Then status 200
And match response == { id: '#(id)', name: 'Bob' }
When method get
Then status 200
And match response contains [{ id: '#uuid', name: 'Billie' },{ id: '#(id)', name: 'Bob' }]
================================================
FILE: examples/zip-release/src/demo/mock/cats.html
================================================
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cats</title>
<script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
</head>
<body>
<div>
<a href="http://localhost:8080/cats">GET /cats</a> | <a href="http://localhost:8080/hardcoded">GET /hardcoded</a>
</div>
<p/>
<div>
<label for="catName">Name: <input id="catName" value="Billie"/></label>
<button onclick="createCat()">Create Cat</button>
</div>
<p/>
<div id="response"></div>
<script>
var createCat = function() {
var name = $('#catName').val();
$.ajax({
url: 'http://localhost:8080/cats',
data: JSON.stringify({ name: name }),
method: 'POST',
success: function(result) {
$('#response').html('created cat: ' + JSON.stringify(result));
}
});
};
</script>
</body>
</html>
================================================
FILE: examples/zip-release/src/demo/robot/calc-old.feature
================================================
Feature: windows calculator
depending on your version of windows, if "calc.feature" doesn't work, try this one instead
also refer docs: https://github.com/karatelabs/karate/wiki/ZIP-Release#karate-robot
Scenario:
* robot { window: 'Calculator', fork: 'calc', highlight: true, highlightDuration: 500 }
* click('Clear')
* click('1')
* click('Add')
* click('2')
* click('Equals')
* match locate('//text{3}').name == '3'
* screenshot()
================================================
FILE: examples/zip-release/src/demo/robot/calc.feature
================================================
Feature: windows calculator
did you know that Karate can do Windows desktop / app automation ?
you are almost set - just download one more JAR file
instructions here: https://github.com/karatelabs/karate/wiki/ZIP-Release#karate-robot
Scenario:
* robot { window: 'Calculator', fork: 'calc', highlight: true, highlightDuration: 500 }
* click('Clear')
* click('One')
* click('Plus')
* click('Two')
* click('Equals')
* match locate('#CalculatorResults').name == 'Display is 3'
* screenshot()
* click('Close Calculator')
================================================
FILE: examples/zip-release/src/demo/web/google.feature
================================================
Feature: web-browser automation
Background:
* configure driver = { type: 'chrome' }
Scenario: try to login to github
and then do a google search
Given driver 'https://github.com/login'
And input('#login_field', 'dummy')
And input('#password', 'world')
When submit().click("input[name=commit]")
Then match html('.flash-error') contains 'Incorrect username or password.'
Given driver 'https://google.com'
And input("textarea[name=q]", 'karate dsl')
When submit().click("input[name=btnI]")
# this may fail depending on which part of the world you are in !
Then waitForUrl('https://github.com/karatelabs/karate')
================================================
FILE: jbang-catalog.json
================================================
{
"catalogs": {},
"aliases": {
"karate": {
"script-ref": "io.karatelabs:karate-core:1.5.0:all"
}
}
}
================================================
FILE: karate-archetype/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.karatelabs</groupId>
<artifactId>karate-parent</artifactId>
<version>1.5.2</version>
</parent>
<artifactId>karate-archetype</artifactId>
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central.publishing.maven.plugin.version}</version>
<configuration>
<skipPublishing>true</skipPublishing>
</configuration>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: karate-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
================================================
<archetype-descriptor name="karate-archetype">
<fileSets>
<fileSet filtered="false" packaged="false" encoding="UTF-8">
<directory>src</directory>
<includes>
<include>**/**</include>
</includes>
</fileSet>
</fileSets>
</archetype-descriptor>
================================================
FILE: karate-archetype/src/main/resources/archetype-resources/.gitignore
================================================
.DS_Store
.vscode
.idea
.project
.settings
.classpath
*.iml
target/
================================================
FILE: karate-archetype/src/main/resources/archetype-resources/pom.xml
================================================
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<maven.compiler.version>3.11.0</maven.compiler.version>
<maven.surefire.version>3.0.0</maven.surefire.version>
<karate.version>1.5.2</karate.version>
</properties>
<dependencies>
<dependency>
<groupId>io.karatelabs</groupId>
<artifactId>karate-junit5</artifactId>
<version>${karate.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: karate-archetype/src/main/resources/archetype-resources/src/test/java/examples/ExamplesTest.java
================================================
package examples;
import com.intuit.karate.Results;
import com.intuit.karate.Runner;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class ExamplesTest {
@Test
void testParallel() {
Results results = Runner.path("classpath:examples")
//.outputCucumberJson(true)
.parallel(5);
assertEquals(0, results.getFailCount(), results.getErrorMessages());
}
}
================================================
FILE: karate-archetype/src/main/resources/archetype-resources/src/test/java/examples/users/UsersRunner.java
================================================
package examples.users;
import com.intuit.karate.junit5.Karate;
class UsersRunner {
@Karate.Test
Karate testUsers() {
return Karate.run("users").relativeTo(getClass());
}
}
================================================
FILE: karate-archetype/src/main/resources/archetype-resources/src/test/java/examples/users/users.feature
================================================
Feature: sample karate test script
for help, see: https://github.com/karatelabs/karate/wiki/IDE-Support
Background:
* url 'https://jsonplaceholder.typicode.com'
Scenario: get all users and then get the first user by id
Given path 'users'
When method get
Then status 200
* def first = response[0]
Given path 'users', first.id
When method get
Then status 200
Scenario: create a user and then get it by id
* def user =
"""
{
"name": "Test User",
"username": "testuser",
"email": "test@user.com",
"address": {
"street": "Has No Name",
"suite": "Apt. 123",
"city": "Electri",
"zipcode": "54321-6789"
}
}
"""
Given url 'https://jsonplaceholder.typicode.com/users'
And request user
When method post
Then status 201
* def id = response.id
* print 'created id is: ', id
Given path id
# When method get
# Then status 200
# And match response contains user
================================================
FILE: karate-archetype/src/main/resources/archetype-resources/src/test/java/karate-config.js
================================================
function fn() {
var env = karate.env; // get system property 'karate.env'
karate.log('karate.env system property was:', env);
if (!env) {
env = 'dev';
}
var config = {
env: env,
myVarName: 'someValue'
}
if (env == 'dev') {
// customize
// e.g. config.foo = 'bar';
} else if (env == 'e2e') {
// customize
}
return config;
}
================================================
FILE: karate-archetype/src/main/resources/archetype-resources/src/test/java/logback-test.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>target/karate.log</file>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="com.intuit" level="DEBUG"/>
<root level="info">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
================================================
FILE: karate-core/README.md
================================================
# Karate UI
## UI Test Automation Made `Simple.`
### Hello World
<a href="https://twitter.com/getkarate/status/1167533484560142336"><img src="src/test/resources/driver-hello-world.jpg" height="230"/></a>
# Index
<table>
<tr>
<th>Start</th>
<td>
<a href="https://github.com/karatelabs/karate/wiki/IDE-Support">IDE Support</a>
| <a href="https://github.com/karatelabs/karate#quickstart">Maven Quickstart</a>
| <a href="https://github.com/karatelabs/karate#index">Karate - Main Index</a>
</td>
</tr>
<tr>
<th>Config</th>
<td>
<a href="#driver"><code>driver</code></a>
| <a href="#configure-driver"><code>configure driver</code></a>
| <a href="#configure-drivertarget"><code>configure driverTarget</code></a>
| <a href="#karate-chrome">Docker / <code>karate-chrome</code></a>
| <a href="#driver-types">Driver Types</a>
| <a href="#playwright">Playwright</a>
| <a href="#playwright-legacy">Playwright Legacy</a>
| <a href="#timeout"><code>timeout()</code></a>
| <a href="#driversessionid"><code>driver.sessionId</code></a>
</td>
</tr>
<tr>
<th>Concepts</th>
<td>
<a href="#syntax">Syntax</a>
| <a href="#special-keys">Special Keys</a>
| <a href="#short-cuts">Short Cuts</a>
| <a href="#chaining">Chaining</a>
| <a href="#function-composition">Function Composition</a>
| <a href="#script">Browser JavaScript</a>
| <a href="#looping">Looping</a>
| <a href="#drop-downs">Drop Downs</a>
| <a href="#debugging">Debugging</a>
| <a href="#retry">Retries</a>
| <a href="#wait-api">Waits</a>
| <a href="#proxy">Proxy</a>
| <a href="#intercepting-http-requests">Intercepting HTTP Requests</a>
| <a href="#file-upload">File Upload</a>
| <a href="#code-reuse">Code Reuse</a>
| <a href="#hybrid-tests">Hybrid Tests</a>
| <a href="#java-api">Java API</a>
| <a href="#visual-testing">Visual Testing</a>
</td>
</tr>
<tr>
<th>Locators</th>
<td>
<a href="#locators">Locator Types</a>
| <a href="#wildcard-locators">Wildcards</a>
| <a href="#friendly-locators">Friendly Locators</a>
| <a href="#tree-walking">Tree Walking</a>
| <a href="#rightof"><code>rightOf()</code></a>
| <a href="#leftOf"><code>leftOf()</code></a>
| <a href="#above"><code>above()</code></a>
| <a href="#below"><code>below()</code></a>
| <a href="#near"><code>near()</code></a>
| <a href="#locator-lookup">Locator Lookup</a>
</td>
</tr>
<tr>
<th>Browser</th>
<td>
<a href="#driverurl"><code>driver.url</code></a>
| <a href="#driverdimensions"><code>driver.dimensions</code></a>
| <a href="#refresh"><code>refresh()</code></a>
| <a href="#reload"><code>reload()</code></a>
| <a href="#back"><code>back()</code></a>
| <a href="#forward"><code>forward()</code></a>
| <a href="#maximize"><code>maximize()</code></a>
| <a href="#minimize"><code>minimize()</code></a>
| <a href="#fullscreen"><code>fullscreen()</code></a>
| <a href="#quit"><code>quit()</code></a>
</td>
</tr>
<tr>
<th>Page</th>
<td>
<a href="#dialog"><code>dialog()</code></a>
| <a href="#switchpage"><code>switchPage()</code></a>
| <a href="#switchFrame"><code>switchFrame()</code></a>
| <a href="#close"><code>close()</code></a>
| <a href="#drivertitle"><code>driver.title</code></a>
| <a href="#screenshot"><code>screenshot()</code></a>
| <a href="#pdf"><code>pdf()</code></a>
</td>
</tr>
<tr>
<th>Actions</th>
<td>
<a href="#click"><code>click()</code></a>
| <a href="#input"><code>input()</code></a>
| <a href="#submit"><code>submit()</code></a>
| <a href="#focus"><code>focus()</code></a>
| <a href="#clear"><code>clear()</code></a>
| <a href="#valueset"><code>value(set)</code></a>
| <a href="#select"><code>select()</code></a>
| <a href="#scroll"><code>scroll()</code></a>
| <a href="#mouse"><code>mouse()</code></a>
| <a href="#highlight"><code>highlight()</code></a>
| <a href="#highlightall"><code>highlightAll()</code></a>
</td>
</tr>
<tr>
<th>State</th>
<td>
<a href="#html"><code>html()</code></a>
| <a href="#text"><code>text()</code></a>
| <a href="#value"><code>value()</code></a>
| <a href="#attribute"><code>attribute()</code></a>
| <a href="#enabled"><code>enabled()</code></a>
| <a href="#exists"><code>exists()</code></a>
| <a href="#optional"><code>optional()</code></a>
| <a href="#locate"><code>locate()</code></a>
| <a href="#locateall"><code>locateAll()</code></a>
| <a href="#position"><code>position()</code></a>
</td>
</tr>
<tr>
<th>Wait / JS</th>
<td>
<a href="#retry"><code>retry()</code></a>
| <a href="#waitfor"><code>waitFor()</code></a>
| <a href="#waitforany"><code>waitForAny()</code></a>
| <a href="#waitforurl"><code>waitForUrl()</code></a>
| <a href="#waitfortext"><code>waitForText()</code></a>
| <a href="#waitforenabled"><code>waitForEnabled()</code></a>
| <a href="#waitforresultcount"><code>waitForResultCount()</code></a>
| <a href="#waituntil"><code>waitUntil()</code></a>
| <a href="#delay"><code>delay()</code></a>
| <a href="#script"><code>script()</code></a>
| <a href="#scriptall"><code>scriptAll()</code></a>
| <a href="#karate-vs-the-browser">Karate vs the Browser</a>
</td>
</tr>
<tr>
<th>Cookies</th>
<td>
<a href="#cookie"><code>cookie()</code></a>
<a href="#cookieset"><code>cookie(set)</code></a>
| <a href="#drivercookies"><code>driver.cookies</code></a>
| <a href="#deletecookie"><code>deleteCookie()</code></a>
| <a href="#clearcookies"><code>clearCookies()</code></a>
</td>
</tr>
<tr>
<th>Chrome</th>
<td>
<a href="#java-api">Java API</a>
| <a href="#driverpdf"><code>driver.pdf()</code></a>
| <a href="#driverscreenshotfull"><code>driver.screenshotFull()</code></a>
| <a href="#driverintercept"><code>driver.intercept()</code></a>
| <a href="#driverinputfile"><code>driver.inputFile()</code></a>
| <a href="#driveremulatedevice"><code>driver.emulateDevice()</code></a>
| <a href="#driverscriptawait"><code>driver.scriptAwait()</code></a>
</td>
</tr>
<tr>
<th>Appium</th>
<td>
<a href="#screen-recording">Screen Recording</a>
| <a href="#screen-recording"><code>driver.startRecordingScreen()</code></a>
| <a href="#screen-recording"><code>driver.saveRecordingScreen()</code></a>
| <a href="#driverhidekeyboard"><code>driver.hideKeyboard()</code></a>
</td>
</tr>
</table>
## Capabilities
* Simple, clean syntax that is well suited for people new to programming or test-automation
* All-in-one framework that includes [parallel-execution](https://github.com/karatelabs/karate#parallel-execution), [HTML reports](https://github.com/karatelabs/karate#junit-html-report), [environment-switching](https://github.com/karatelabs/karate#switching-the-environment), [Visual Testing](#visual-testing), and [CI integration](https://github.com/karatelabs/karate#test-reports)
* Cross-platform - with even the option to run as a programming-language *neutral* [stand-alone executable](https://github.com/karatelabs/karate/wiki/ZIP-Release)
* Support for [`iframe`-s](#switchframe), [switching tabs](#switchpage), multiple URL domains, and [uploading files](#driverinputfile)
* No need to learn complicated programming concepts such as "callbacks", "`async` / `await`" and "promises"
* Option to use [wildcard](#wildcard-locators) and ["friendly" locators](#friendly-locators) without needing to inspect the HTML-page source, CSS, or internal XPath structure
* Chrome-native automation using the [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/) (equivalent to [Puppeteer](https://pptr.dev))
* [W3C WebDriver](https://w3c.github.io/webdriver/) support built-in, which can also use [remote / grid providers](https://twitter.com/ptrthomas/status/1222790566598991873)
* [Cross-Browser support](https://twitter.com/ptrthomas/status/1048260573513666560) including [Microsoft Edge on Windows](https://twitter.com/ptrthomas/status/1046459965668388866) and [Safari on Mac](https://twitter.com/ptrthomas/status/1047152170468954112)
* [Playwright](https://playwright.dev) support (experimental) for even more cross-browser and headless options, that can connect to a server or Docker container using the Playwright wire-protocol
* [Parallel execution on a single node](https://twitter.com/ptrthomas/status/1159295560794308609), cloud-CI environment or [Docker](#configure-drivertarget) - without needing a "master node" or "grid"
* Embed [video-recordings of tests](#karate-chrome) into the HTML report from a Docker container
* [experimental] [Android and iOS mobile support](https://github.com/karatelabs/karate/issues/743) via [Appium](http://appium.io)
* Seamlessly mix API and UI tests within the same script, for example [sign-in using an API](https://github.com/karatelabs/karate#http-basic-authentication-example) and speed-up your tests
* [Intercept HTTP requests](#intercepting-http-requests) made by the browser and re-use [Karate mocks](https://github.com/karatelabs/karate/tree/master/karate-netty) to stub / modify server responses and even replace HTML content
* Use the power of Karate's [`match`](https://github.com/karatelabs/karate#prepare-mutate-assert) assertions and [core capabilities](https://github.com/karatelabs/karate#features) for UI assertions
* Simple [retry](#retry) and [wait](#wait-api) strategy, no need to graduate from any test-automation university to understand the difference between "implicit waits", "explicit waits" and "fluent waits" :)
* Simpler, [elegant, and *DRY* alternative](#locator-lookup) to the so-called "Page Object Model" pattern
* Carefully designed [fluent-API](#chaining) to handle common combinations such as a [`submit()` + `click()`](#submit) action
* Elegant syntax for typical web-automation challenges such as waiting for a [page-load](#waitforurl-instead-of-submit) or [element to appear](#waitfor)
* Execute JavaScript in the browser with [one-liners](#script) - for example to [get data out of an HTML table](#scriptall)
* [Compose re-usable functions](#function-composition) based on your specific environment or application needs
* Comprehensive support for user-input types including [key-combinations](#special-keys) and [`mouse()`](#mouse) actions
* Step-debug and even *"go back in time"* to edit and re-play steps - using the unique, innovative [Karate Extension for Visual Studio Code](https://twitter.com/KarateDSL/status/1167533484560142336)
* Traceability: detailed [wire-protocol logs](https://twitter.com/ptrthomas/status/1155958170335891467) can be enabled *in-line* with test-steps in the HTML report
* Convert HTML to PDF and capture the *entire* (scrollable) web-page as an image using the [Chrome Java API](#chrome-java-api)
## Comparison
To understand how Karate compares to other UI automation frameworks, this article can be a good starting point: [The world needs an alternative to Selenium - *so we built one*](https://hackernoon.com/the-world-needs-an-alternative-to-selenium-so-we-built-one-zrk3j3nyr).
# Examples
## Web Browser
* [Example 1](../karate-demo/src/test/java/driver/demo/demo-01.feature) - simple example that navigates to GitHub and Google Search
* [Example 2](../karate-demo/src/test/java/driver/demo/demo-02.feature) - simple but *very* relevant and meaty example ([see video](https://twitter.com/ptrthomas/status/1160680240781262851)) that shows how to
* wait for [page-navigation](#waitforurl-instead-of-submit)
* use a friendly [wildcard locator](#wildcard-locators)
* wait for an element to [be ready](#waitfor)
* [compose functions](#function-composition) for elegant *custom* "wait" logic
* assert on tabular [results in the HTML](#scriptall)
* [Example 3](../karate-e2e-tests/src/test/java/driver/00.feature) - which is a single modular script that exercises *all* capabilities of Karate Driver
* a handy reference that can give you ideas on how to structure your tests
* run as part of Karate's [regression suite](https://stackoverflow.com/a/66005331/143475) via GitHub Actions
## Mobile / Appium
> Please consider Mobile support as experimental. But we are very close and there are some teams that use Karate for simple use-cases. Please contribute code if you can.
* Refer to this [example project](../examples/mobile-test)
## Windows
* [Example](../karate-demo/src/test/java/driver/windows/calc.feature) - but also see the [`karate-robot`](https://github.com/karatelabs/karate/tree/master/karate-robot) for an alternative approach.
# Driver Configuration
## `configure driver`
This below declares that the native (direct) Chrome integration should be used, on both Mac OS and Windows - from the default installed location.
```cucumber
* configure driver = { type: 'chrome' }
```
If you want to customize the start-up, you can use a batch-file:
```cucumber
* configure driver = { type: 'chrome', executable: 'chrome' }
```
Here a batch-file called `chrome` can be placed in the system [`PATH`](https://www.java.com/en/download/help/path.xml) (and made executable) with the following contents:
```bash
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" $*
```
For Windows it would be `chrome.bat` in the system [`PATH`](https://www.java.com/en/download/help/path.xml) as follows:
```bat
"C:\Program Files (x86)\Google\Chrome\Application\chrome" %*
```
Another example for WebDriver, again assuming that `chromedriver` is in the [`PATH`](https://www.java.com/en/download/help/path.xml):
```cucumber
{ type: 'chromedriver', port: 9515, executable: 'chromedriver' }
```
key | description
--- | -----------
`type` | see [driver types](#driver-types)
`executable` | if present, Karate will attempt to invoke this, if not in the system [`PATH`](https://www.java.com/en/download/help/path.xml), you can use a full-path instead of just the name of the executable. batch files should also work
`start` | default `true`, Karate will attempt to start the `executable` - and if the `executable` is not defined, Karate will even try to assume the default for the OS in use
`stop` | optional, defaults to `true` *very* rarely needed, only in cases where you want the browser to remain open after your tests have completed, typically when you write a custom [`Target`](#custom-target)
`port` | optional, and Karate would choose the "traditional" port for the given `type`
`host` | optional, will default to `localhost` and you normally never need to change this
`pollAttempts` | optional, will default to `20`, you normally never need to change this (and changing `pollInterval` is preferred), and this is the number of attempts Karate will make to wait for the `port` to be ready and accepting connections before proceeding
`pollInterval` | optional, will default to `250` (milliseconds) and you normally never need to change this (see `pollAttempts`) unless the driver `executable` takes a *very* long time to start
`headless` | [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome) only applies to `{ type: 'chrome' }` for now, also see [`DockerTarget`](#dockertarget) and [`webDriverSession`](#webdriversession)
`showDriverLog` | default `false`, will include webdriver HTTP traffic in Karate report, useful for troubleshooting or bug reports
`showProcessLog` | default `false`, will include even executable (webdriver or browser) logs in the Karate report
`showBrowserLog` | default `true`, only applies to `{ type: 'chrome' }` which shows the browser console log in the HTML report for convenience
`addOptions` | default `null`, has to be a list / JSON array that will be appended as additional CLI arguments to the `executable`, e.g. `['--no-sandbox', '--windows-size=1920,1080']`
`beforeStart` | default `null`, an OS command that will be executed before commencing a `Scenario` (and before the `executable` is invoked if applicable) typically used to start video-recording
`afterStop` | default `null`, an OS command that will be executed after a `Scenario` completes, typically used to stop video-recording and save the video file to an output folder
`videoFile` | default `null`, the path to the video file that will be added to the end of the test report, if it does not exist, it will be ignored
`httpConfig` | optional, and typically only used for remote WebDriver usage where the HTTP client [configuration](https://github.com/karatelabs/karate#configure) needs to be tweaked, e.g. `{ readTimeout: 120000 }` (also see `timeout` below)
`timeout` | default `30000`, amount of time (in milliseconds) that type `chrome` will wait for an operation that takes time (typically navigating to a new page) - and as a convenience for WebDriver, this will be equivalent to setting the `readTimeout` for the `httpConfig` (see above) - also see [`timeout()`](#timeout)
`playwrightUrl` | only applies for `{ type: 'playwright', start: false }`, the [Playwright](https://playwright.dev) wire-protocol (websockets) server URL, also see [`playwrightOptions`](#playwrightoptions)
`playwrightOptions` | optional, see [`playwrightOptions`](#playwrightoptions)
`webDriverUrl` | see [`webDriverUrl`](#webdriverurl)
`webDriverSession` | see [`webDriverSession`](#webdriversession)
`webDriverPath` | optional, and rarely used only in case you need to append a path such as `/wd/hub` - typically needed for Appium (or a Selenium Grid) on `localhost`, where `host`, `port` / `executable` etc. are involved.
`highlight` | default `false`, useful for demos or for running a test in "slow motion" where before each navigation action, the HTML element for the current [locator](#locators) is highlighted for a duration of `highlightDuration`
`highlightDuration` | default 3000 (milliseconds), duration to apply the `highlight`
`attach` | optional, only for `type: 'chrome'` and `start: false` when you want to attach to an existing page in a Chrome DevTools session, uses a "contains" match against the URL
`userDataDir` | optional, by default Karate will auto-create a [user dir](https://chromium.googlesource.com/chromium/src.git/+/master/docs/user_data_dir.md) for Chrome and other browsers, but if you want to provide the path to an existing folder (which can reduce disk space usage in some situations), note that for Chrome, this will pass the command line option `--user-data-dir`. if `null`, Chrome will use the system defaults (the `--user-data-dir` command-line option will *not* be passed)
For more advanced options such as for Docker, CI, headless, cloud-environments or custom needs, see [`configure driverTarget`](#configure-drivertarget).
## webDriverUrl
Karate implements the [W3C WebDriver spec](https://w3c.github.io/webdriver), which means that you can point Karate to a remote "grid" such as [Zalenium](https://opensource.zalando.com/zalenium/) or a SaaS provider such as [the AWS Device Farm](https://docs.aws.amazon.com/devicefarm/latest/testgrid/what-is-testgrid.html). The `webDriverUrl` driver configuration key is optional, but if specified, will be used as the W3C WebDriver remote server. Note that you typically would set `start: false` as well, or use a [Custom `Target`](#custom-target).
For example, once you run the [couple of Docker commands](https://opensource.zalando.com/zalenium/#try-it) to get Zalenium running, you can do this:
```cucumber
* configure driver = { type: 'chromedriver', start: false, webDriverUrl: 'http://localhost:4444/wd/hub' }
```
Note that you can add `showDriverLog: true` to the above for troubleshooting if needed. You should be able to [run tests in parallel](https://github.com/karatelabs/karate#parallel-execution) with ease !
## `webDriverSession`
When targeting a W3C WebDriver implementation, either as a local executable or [Remote WebDriver](https://selenium.dev/documentation/en/remote_webdriver/remote_webdriver_client/), you can specify the JSON that will be passed as the payload to the [Create Session](https://w3c.github.io/webdriver/#new-session) API. The most important part of this payload is the [`capabilities`](https://w3c.github.io/webdriver/#capabilities). It will default to `{ browserName: '<name>' }` for convenience where `<name>` will be `chrome`, `firefox` etc.
So most of the time this would be sufficient:
```cucumber
* configure driver = { type: 'chromedriver' }
```
Since it will result in the following request to the WebDriver `/session`:
```js
{"capabilities":{"alwaysMatch":{"browserName":"chrome"}}}
```
But in some cases, especially when you need to talk to remote driver instances, you need to pass specific "shapes" of JSON expected by the particular implementation - or you may need to pass custom data or "extension" properties. Use the `webDriverSession` property in those cases.
> Note: `desiredCapabilities` has been deprecated and not recommended for use.
For example:
```cucumber
* def session = { capabilities: { alwaysMatch: { browserName: 'chrome', 'goog:chromeOptions': { args: [ '--headless', 'window-size=1280,720' ] } } } }
* configure driver = { type: 'chromedriver', webDriverSession: '#(session)', start: false, webDriverUrl: 'http://localhost:9515/wd/hub' }
```
Another example is that for the new Microsoft Edge browser (based on Chromium), the Karate default `alwaysMatch` is not supported, so this is what works:
```cucumber
* configure driver = { type: 'msedgedriver', webDriverSession: { capabilities: { browserName: 'edge' } } }
```
Here are some of the things that you can customize, but note that these depend on the driver implementation.
* [`proxy`](#proxy)
* [`acceptInsecureCerts`](https://w3c.github.io/webdriver/#dfn-insecure-tls-certificates)
* [`moz:firefoxOptions`](https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions#firefoxOptions) - e.g. for headless FireFox
Note that some capabilities such as "headless" may be possible via the command-line to the local executable, so using [`addOptions`](#configure-driver) may work instead.
Also see [`driver.sessionId`](#driversessionid).
### Playwright
Driver that leverages [Playwright](https://playwright.dev) java native APIs.
To use it, add the following dependency:
```xml
<dependency>
<groupId>io.karate</groupId>
<artifactId>karate-playwright</artifactId>
<scope>test</scope>
</dependency>
```
And make sure it is declared before `io.karate:karate-core`.
A server will be automatically started and made available to Karate without any extra-script. If you have one pre-started, you can still use the [`playwrightUrl`](#configure-driver) driver config.
### `playwrightOptions`
When using [Playwright](#playwright) you can omit this in which case Karate will default to Chrome (within Playwright) and the default browser window size.
This can take the following keys:
* `browserType` - defaults to `chromium`, can be set to the other [types that Playwright supports](https://playwright.dev/docs/core-concepts#browser), e.g. `firefox` and `webkit`
* `context` - JSON which will be passed as the argument of the Playwright [`browser.newContext()`](https://playwright.dev/docs/api/class-browser#browsernewcontextoptions) call, needed typically to set the page dimensions
* `channel` - defaults to chrome, for the `chromium` browserType, allows to specify which [flavor](https://playwright.dev/docs/browsers#google-chrome--microsoft-edge) to use
* `installBrowsers` - defaults to `true`, whether or not all the supported browsers will be downloaded and installed by Playwright (once).
Note that there is a top-level config flag for `headless` mode. The default is: `* configure driver = { headless: false }`
### Playwright Legacy
To use [Playwright](https://playwright.dev), you need to start a Playwright server. If you have one pre-started, you need to use the [`playwrightUrl`](#configure-driver) driver config.
Or you can set up an executable that can do it and log the URL to the console when the server is ready. The websocket URL will look like this: `ws://127.0.0.1:4444/0e0bd1c0bb2d4eb550d02c91046dd6e0`.
Here's a simple recipe to set up this mechanism on your local machine. NodeJS is a pre-requisite and you can choose a folder (e.g. `playwright`) for the "start scripts" to live. Within that folder, [you can run](https://playwright.dev/docs/intro#installation):
```
npm i -D playwright
```
Now create a file called `playwright/server.js` with the following code:
```js
const playwright = require('playwright');
const port = process.argv[2] || 4444;
const browserType = process.argv[3] || 'chromium';
const headless = process.argv[4] == 'true';
console.log('using port:', port, 'browser:', browserType, 'headless:', headless);
const serverPromise = playwright[browserType].launchServer({ headless: headless, port: port });
serverPromise.then(bs => console.log(bs.wsEndpoint()));
```
The main thing here is that the server URL should be logged to the console when it starts. Karate will scan the log for any string that starts with `ws://` and kick things off from there.
Also Karate will call the executable with three arguments in this order:
* `port`
* `browserType`
* `headless`
So this is how you can communicate your cross-browser config from your Karate test to the executable.
The final piece of the puzzle is to set up a batch file to start the server:
```bash
#!/bin/bash
exec node /some/path/playwright/server.js $*
```
The [`exec`](http://veithen.io/2014/11/16/sigterm-propagation.html) is important here so that Karate can stop the `node` process cleanly.
Now you can use the path of the batch file in the driver `executable` config.
```cucumber
* configure driver = { type: 'playwright', executable: 'path/to/start-server' }
```
For convenience, Karate assumes by default that the executable name is `playwright` and that it exists in the System [`PATH`](https://www.java.com/en/download/help/path.xml). Make sure that the batch file is made executable depending on your OS.
Based on the above details, you should be able to come up with a custom strategy to connect Karate to Playwright. And you can consider a [`driverTarget`](#custom-target) approach for complex needs such as using a Docker container for CI.
## `configure driverTarget`
The [`configure driver`](#configure-driver) options are fine for testing on "`localhost`" and when not in `headless` mode. But when the time comes for running your web-UI automation tests on a continuous integration server, things get interesting. To support all the various options such as Docker, headless Chrome, cloud-providers etc., Karate introduces the concept of a pluggable [`Target`](src/main/java/com/intuit/karate/driver/Target.java) where you just have to implement two methods:
```java
public interface Target {
Map<String, Object> start(com.intuit.karate.core.ScenarioRuntime sr);
Map<String, Object> stop(com.intuit.karate.core.ScenarioRuntime sr);
}
```
* `start()`: The `Map` returned will be used as the generated [driver configuration](#driver-configuration). And the `start()` method will be invoked as soon as any `Scenario` requests for a web-browser instance (for the first time) via the [`driver`](#driver) keyword.
* `stop()`: Karate will call this method at the end of every top-level `Scenario` (that has not been `call`-ed by another `Scenario`).
If you use the provided `ScenarioRuntime.logger` instance in your `Target` code, any logging you perform will nicely appear in-line with test-steps in the HTML report, which is great for troubleshooting or debugging tests.
Combined with Docker, headless Chrome and Karate's [parallel-execution capabilities](https://github.com/karatelabs/karate#parallel-execution) - this simple `start()` and `stop()` lifecycle can effectively run web UI automation tests in parallel on a single node.
### `DockerTarget`
Karate has a built-in implementation for Docker ([`DockerTarget`](src/main/java/com/intuit/karate/driver/DockerTarget.java)) that supports 2 existing Docker images out of the box:
* [`justinribeiro/chrome-headless`](https://hub.docker.com/r/justinribeiro/chrome-headless/) - for Chrome "native" in [headless mode](https://developers.google.com/web/updates/2017/04/headless-chrome)
* [`karatelabs/karate-chrome`](#karate-chrome) - for Chrome "native" but with an option to connect to the container and view via VNC, and with video-recording
To use either of the above, you do this in a Karate test:
```cucumber
* configure driverTarget = { docker: 'justinribeiro/chrome-headless', showDriverLog: true }
```
Or for more flexibility, you could do this in [`karate-config.js`](https://github.com/karatelabs/karate#configuration) and perform conditional logic based on [`karate.env`](https://github.com/karatelabs/karate#switching-the-environment). One very convenient aspect of `configure driverTarget` is that *if* in-scope, it will over-ride any `configure driver` directives that exist. This means that you can have the below snippet activate *only* for your CI build, and you can leave your feature files set to point to what you would use in "dev-local" mode.
```javascript
function fn() {
var config = {
baseUrl: 'https://qa.mycompany.com'
};
if (karate.env == 'ci') {
karate.configure('driverTarget', { docker: 'karatelabs/karate-chrome' });
}
return config;
}
```
To use the [recommended `--security-opt seccomp=chrome.json` Docker option](https://hub.docker.com/r/justinribeiro/chrome-headless/), add a `secComp` property to the `driverTarget` configuration. And if you need to view the container display via VNC, set the `vncPort` to map the port exposed by Docker.
```javascript
karate.configure('driverTarget', { docker: 'karatelabs/karate-chrome', secComp: 'src/test/java/chrome.json', vncPort: 5900 });
```
### Custom `Target`
If you have a custom implementation of a `Target`, you can easily [construct any custom Java class](https://github.com/karatelabs/karate#calling-java) and pass it to `configure driverTarget`. Here below is the equivalent of the above, done the "hard way":
```javascript
var DockerTarget = Java.type('com.intuit.karate.driver.DockerTarget');
var options = { showDriverLog: true };
var target = new DockerTarget(options);
target.command = function(port){ return 'docker run -d -p '
+ port + ':9222 --security-opt seccomp=./chrome.json justinribeiro/chrome-headless' };
karate.configure('driverTarget', target);
```
The built-in [`DockerTarget`](src/main/java/com/intuit/karate/driver/DockerTarget.java) is a good example of how to:
* perform any pre-test set-up actions
* provision a free port and use it to shape the `start()` command dynamically
* execute the command to start the target process
* perform an HTTP health check to wait until we are ready to receive connections
* and when `stop()` is called, indicate if a video recording is present (after retrieving it from the stopped container)
Controlling this flow from Java can take a lot of complexity out your build pipeline and keep things cross-platform. And you don't need to line-up an assortment of shell-scripts to do all these things. You can potentially include the steps of deploying (and un-deploying) the application-under-test using this approach - but probably the top-level [JUnit test-suite](https://github.com/karatelabs/karate#parallel-execution) would be the right place for those.
If the machine where you are running Karate is not the same as your target host (e.g. a sibling Docker container or a Chrome browser in a different machine) you might need to configure `DockerTarget` with the `remoteHost` and/or `useDockerHost` properties. The `DockerTarget` implementation has an example [and you can find more details here](https://github.com/karatelabs/karate/pull/1603#issuecomment-846420716).
Another (simple) example of a custom `Target` you can use as a reference is this one: [`karate-devicefarm-demo`](https://github.com/ptrthomas/karate-devicefarm-demo) - which demonstrates how Karate can be used to drive tests on [AWS DeviceFarm](https://docs.aws.amazon.com/devicefarm/latest/testgrid/what-is-testgrid.html). The same approach should apply to any Selenium "grid" provider such as [Zalenium](https://opensource.zalando.com/zalenium/).
### `karate-chrome`
The [`karate-chrome`](https://hub.docker.com/r/karatelabs/karate-chrome) Docker is an image created from scratch, using a Java / Maven image as a base and with the following features:
* Chrome in "full" mode (non-headless)
* [Chrome DevTools protocol](https://chromedevtools.github.io/devtools-protocol/) exposed on port 9222
* VNC server exposed on port 5900 so that you can watch the browser in real-time
* a video of the entire test is saved to `/tmp/karate.mp4`
* after the test, when `stop()` is called, the [`DockerTarget`](src/main/java/com/intuit/karate/driver/DockerTarget.java) will embed the video into the HTML report (expand the last step in the `Scenario` to view)
To try this or especially when you need to investigate why a test is not behaving properly when running within Docker, these are the steps:
* start the container:
* `docker run --name karate --rm -p 9222:9222 -p 5900:5900 -e KARATE_SOCAT_START=true --cap-add=SYS_ADMIN karatelabs/karate-chrome`
* it is recommended to use [`--security-opt seccomp=chrome.json`](https://hub.docker.com/r/justinribeiro/chrome-headless/) instead of `--cap-add=SYS_ADMIN`
* point your VNC client to `localhost:5900` (password: `karate`)
* for example on a Mac you can use this command: `open vnc://localhost:5900`
* run a test using the following [`driver` configuration](#configure-driver), and this is one of the few times you would ever need to set the [`start` flag](#configure-driver) to `false`
* `* configure driver = { type: 'chrome', start: false, showDriverLog: true }`
* you can even use the [Karate VS Code extension](https://github.com/karatelabs/karate/wiki/IDE-Support#vs-code-karate-plugin) to debug and step-through a test
* if you omit the `--rm` part in the start command, after stopping the container, you can dump the logs and video recording using this command (here `.` stands for the current working folder, change it if needed):
* `docker cp karate:/tmp .`
* this would include the `stderr` and `stdout` logs from Chrome, which can be helpful for troubleshooting
For more information on the Docker containers for Karate and how to use them, refer to the wiki: [Docker](https://github.com/karatelabs/karate/wiki/Docker).
## Driver Types
The recommendation is that you prefer `chrome` for development, and once you have the tests running smoothly - you can switch to a different WebDriver implementation.
type | default port | default executable | description
---- | ------------ | ------------------ | -----------
[`chrome`](https://chromedevtools.github.io/devtools-protocol/) | 9222 | mac: `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome` <br/>win: `C:/Program Files (x86)/Google/Chrome/Application/chrome.exe` | "native" Chrome automation via the [DevTools protocol](https://chromedevtools.github.io/devtools-protocol/)
[`playwright`](https://playwright.dev) | 4444 | `playwright` | see [`playwrightOptions`](#playwrightoptions) and [Playwright](#playwright)
[`msedge`](https://docs.microsoft.com/en-us/microsoft-edge/) | 9222 | mac: `/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge` <br/>win: `C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe` | the new Chromium based Microsoft Edge, using the [DevTools protocol](https://docs.microsoft.com/en-us/microsoft-edge/devtools-protocol-chromium)
[`chromedriver`](https://sites.google.com/a/chromium.org/chromedriver/home) | 9515 | `chromedriver` | W3C Chrome Driver
[`geckodriver`](https://github.com/mozilla/geckodriver) | 4444 | `geckodriver` | W3C Gecko Driver (Firefox)
[`safaridriver`](https://webkit.org/blog/6900/webdriver-support-in-safari-10/) | 5555 | `safaridriver` | W3C Safari Driver
[`msedgedriver`](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/) | 9515 | `msedgedriver` | W3C Microsoft Edge WebDriver (the new one based on Chromium), also see [`webDriverSession`](#webdriversession)
[`mswebdriver`](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/) | 17556 | `MicrosoftWebDriver` | Microsoft Edge "Legacy" WebDriver
[`iedriver`](https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver) | 5555 | `IEDriverServer` | IE (11 only) Driver
[`winappdriver`](https://github.com/Microsoft/WinAppDriver) | 4727 | `C:/Program Files (x86)/Windows Application Driver/WinAppDriver` | Windows Desktop automation, similar to Appium
[`android`](https://github.com/appium/appium/) | 4723 | `appium` | android automation via [Appium](https://github.com/appium/appium/)
[`ios`](https://github.com/appium/appium/) | 4723 |`appium` | iOS automation via [Appium](https://github.com/appium/appium/)
# Distributed Testing
Karate can split a test-suite across multiple machines or Docker containers for execution and aggregate the results. Please refer to the wiki: [Distributed Testing](https://github.com/karatelabs/karate/wiki/Distributed-Testing).
# Locators
The standard locator syntax is supported. For example for web-automation, a `/` prefix means XPath and else it would be evaluated as a "CSS selector".
```cucumber
And input('input[name=someName]', 'test input')
When submit().click("//input[@name='commit']")
```
platform | prefix | means | example
----- | ------ | ----- | -------
web | (none) | css selector | `input[name=someName]`
web <br/> android <br/> ios | `/` | xpath | `//input[@name='commit']`
web | `{}` | [exact text content](#wildcard-locators) | `{a}Click Me`
web | `{^}` | [partial text content](#wildcard-locators) | `{^a}Click Me`
win <br/> android <br/> ios| (none) | name | `Submit`
win <br/> android <br/> ios | `@` | accessibility id | `@CalculatorResults`
win <br/> android <br/> ios | `#` | id | `#MyButton`
ios| `:` | -ios predicate string | `:name == 'OK' type == XCUIElementTypeButton`
ios| `^` | -ios class chain | `^**/XCUIElementTypeTable[name == 'dataTable']`
android| `-` | -android uiautomator | `-input[name=someName]`
## Wildcard Locators
The "`{}`" and "`{^}`" locator-prefixes are designed to make finding an HTML element by *text content* super-easy. You will typically also match against a specific HTML tag (which is preferred, and faster at run-time). But even if you use "`{*}`" (or "`{}`" which is the equivalent short-cut) to match *any* tag, you are selecting based on what the user *sees on the page*.
When you use CSS and XPath, you need to understand the internal CSS class-names and XPath structure of the page. But when you use the visible text-content, for example the text within a `<button>` or hyperlink (`<a>`), performing a "selection" can be far easier. And this kind of locator is likely to be more stable and resistant to cosmetic changes to the underlying HTML.
You have the option to adjust the "scope" of the match, and here are examples:
Locator | Description
------- | -----------
`click('{a}Click Me')` | the first `<a>` where the text-content is *exactly*: `Click Me`
`click('{}Click Me')` | the first element (*any* tag name) where the text-content is *exactly*: `Click Me`
`click('{^}Click')` | the first element (*any* tag name) where the text-content *contains*: `Click`
`click('{^span}Click')` | the first `<span>` where the text-content *contains*: `Click`
`click('{div:2}Click Me')` | the second `<div>` where the text-content is *exactly*: `Click Me`
`click('{span/a}Click Me')` | the first `<a>` where a `<span>` is the immediate parent, and where the text-content is *exactly*: `Click Me`
`click('{^*:4}Me')` | the fourth HTML element (of *any* tag name) where the text-content *contains*: `Me`
Note that "`{:4}`" can be used as a short-cut instead of "`{*:4}`".
You can experiment by using XPath snippets like the "`span/a`" seen above for even more "narrowing down", but try to expand the "scope modifier" (the part within curly braces) only when you need to do "de-duping" in case the same *user-facing* text appears multiple times on a page.
## Friendly Locators
The ["wildcard" locators](#wildcard-locators) are great when the human-facing visible text is *within* the HTML element that you want to interact with. But this approach doesn't work when you have to deal with data-entry and `<input>` fields. This is where the "friendly locators" come in. You can ask for an element by its *relative position* to another element which is visible - such as a `<span>`, `<div>` or `<label>` and for which the [locator](#locators) is easy to obtain.
> Also see [Tree Walking](#tree-walking).
Method | Finds Element
------ | -----------
[`rightOf()`](#rightof) | to *right* of given locator
[`leftOf()`](#leftof) | to *left* of given locator
[`above()`](#above) | *above* given locator
[`below()`](#below) | *below* given locator
[`near()`](#near) | *near* given locator in any direction
The above methods return a [chainable](#chaining) [`Finder`](src/main/java/com/intuit/karate/driver/Finder.java) instance. For example if you have HTML like this:
```html
<input type="checkbox"><span>Check Three</span>
```
To click on the checkbox, you just need to do this:
```cucumber
* leftOf('{}Check Three').click()
```
By default, the HTML tag that will be searched for will be `input`. While rarely needed, you can over-ride this by calling the `find(tagName)` method like this:
```cucumber
* rightOf('{}Some Text').find('span').click()
```
One more variation supported is that instead of an HTML tag name, you can look for the `textContent`:
```cucumber
* rightOf('{}Some Text').find('{}Click Me').click()
```
One thing to watch out for is that the "origin" of the search will be the mid-point of the whole HTML element, not just the text. So especially when doing `above()` or `below()`, ensure that the "search path" is aligned the way you expect. If you get stuck trying to align the search path, especially if the "origin" is a small chunk of text that is aligned right or left - try [`near()`](#near).
In addition to `<input>` fields, `<select>` boxes are directly supported like this, so internally a `find('select')` is "[chained](#chaining)" automatically:
```cucumber
* below('{}State').select(0)
```
### `rightOf()`
```cucumber
* rightOf('{}Input On Right').input('input right')
```
### `leftOf()`
```cucumber
* leftOf('{}Input On Left').clear().input('input left')
```
### `above()`
```cucumber
* above('{}Input On Right').click()
```
### `below()`
```cucumber
* below('{}Input On Right').input('input below')
```
### `near()`
One reason why you would need `near()` is because an `<input>` field may either be on the right or below the label depending on whether the "container" element had enough width to fit both on the same horizontal line. Of course this can be useful if the element you are seeking is diagonally offset from the [locator](#locators) you have.
```cucumber
* near('{}Go to Page One').click()
```
# Visual Testing
See [`compareImage`](https://github.com/karatelabs/karate#compare-image).
# Keywords
Only one keyword sets up UI automation in Karate, typically by specifying the URL to open in a browser. And then you would use the built-in [`driver`](#syntax) JS object for all other operations, combined with Karate's [`match`](https://github.com/karatelabs/karate#prepare-mutate-assert) syntax for assertions where needed.
## `driver`
Navigates to a new page / address. If this is the first instance in a test, this step also initializes the [`driver`](#syntax) instance for all subsequent steps - using what is [configured](#configure-driver).
```cucumber
Given driver 'https://github.com/login'
```
And yes, you can use [variable expressions](https://github.com/karatelabs/karate#karate-expressions) from [`karate-config.js`](https://github.com/karatelabs/karate#configuration). For example:
```cucumber
* driver webUrlBase + '/page-01'
```
> As seen above, you don't have to force all your steps to use the `Given`, `When`, `Then` BDD convention, and you can [just use "`*`" instead](https://github.com/karatelabs/karate#given-when-then).
### `driver` JSON
A variation where the argument is JSON instead of a URL / address-string, used typically if you are testing a desktop (or mobile) application. This example is for Windows, and you can provide the `app`, `appArguments` and other parameters expected by the [WinAppDriver](https://github.com/Microsoft/WinAppDriver) via the [`webDriverSession`](#webdriversession). For example:
```cucumber
* def session = { desiredCapabilities: { app: 'Microsoft.WindowsCalculator_8wekyb3d8bbwe!App' } }
Given driver { webDriverSession: '#(session)' }
```
So this is just for convenience and readability, using [`configure driver`](#configure-driver) can do the same thing like this:
```cucumber
* def session = { desiredCapabilities: { app: 'Microsoft.WindowsCalculator_8wekyb3d8bbwe!App' } }
* configure driver = { webDriverSession: '#(session)' }
Given driver {}
```
This design is so that you can use (and data-drive) all the capabilities supported by the target driver - which can vary a lot depending on whether it is local, remote, for desktop or mobile etc.
# Syntax
The built-in `driver` JS object is where you script UI automation. It will be initialized only after the [`driver`](#driver) keyword has been used to navigate to a web-page (or application).
You can refer to the [Java interface definition](src/main/java/com/intuit/karate/driver/Driver.java) of the `driver` object to better understand what the various operations are. Note that `Map<String, Object>` [translates to JSON](https://github.com/karatelabs/karate#type-conversion), and JavaBean getters and setters translate to JS properties - e.g. `driver.getTitle()` becomes `driver.title`.
## Methods
As a convenience, *all* the methods on the `driver` have been injected into the context as special (JavaScript) variables so you can omit the "`driver.`" part and save a lot of typing. For example instead of:
```cucumber
And driver.input('#eg02InputId', Key.SHIFT)
Then match driver.text('#eg02DivId') == '16'
```
You can shorten all that to:
```cucumber
And input('#eg02InputId', Key.SHIFT)
Then match text('#eg02DivId') == '16'
```
When it comes to JavaBean getters and setters, you could call them directly, but the `driver.propertyName` form is much better to read, and you save the trouble of typing out round brackets. So instead of doing this:
```cucumber
And match getUrl() contains 'page-01'
When setUrl(webUrlBase + '/page-02')
```
You should prefer this form, which is more readable:
```cucumber
And match driver.url contains 'page-01'
When driver.url = webUrlBase + '/page-02'
```
Note that to navigate to a new address you can use [`driver`](#driver) - which is more concise.
### Chaining
All the methods that return the following Java object types are "chain-able". This means that you can combine them to concisely express certain types of "intent" - without having to repeat the [locator](#locators).
* [`Driver`](src/main/java/com/intuit/karate/driver/Driver.java)
* [`Element`](src/main/java/com/intuit/karate/driver/Element.java)
* [`Mouse`](src/main/java/com/intuit/karate/driver/Mouse.java)
* [`Finder`](src/main/java/com/intuit/karate/driver/Finder.java)
For example, to [`retry()`](#retry) until an HTML element is present and then [`click()`](#click) it:
```cucumber
# retry returns a "Driver" instance
* retry().click('#someId')
```
Or to [wait until a button is enabled](#waitForEnabled) using the default retry configuration:
```cucumber
# waitForEnabled() returns an "Element" instance
* waitForEnabled('#someBtn').click()
```
Or to temporarily [over-ride the retry configuration](#retry) *and* wait:
```cucumber
* retry(5, 10000).waitForEnabled('#someBtn').click()
```
Or to move the [mouse()](#mouse) to a given `[x, y]` co-ordinate *and* perform a click:
```cucumber
* mouse(100, 200).click()
```
Or to use [Friendly Locators](#friendly-locators):
```cucumber
* rightOf('{}Input On Right').input('input right')
```
Also see [waits](#wait-api).
# Syntax
## `driver.url`
Get the current URL / address for matching. Example:
```cucumber
Then match driver.url == webUrlBase + '/page-02'
```
Note that if you do this as soon as you navigate to a new page, there is a chance that this returns the old / stale URL. To avoid "flaky" tests, use [`waitForUrl()`](#waitforurl)
This can also be used as a "setter" to navigate to a new URL *during* a test. But always use the [`driver`](#driver) keyword when you *start* a test and you can choose to prefer that shorter form in general.
```cucumber
* driver.url = 'http://localhost:8080/test'
```
## `driver.title`
Get the current page title for matching. Example:
```cucumber
Then match driver.title == 'Test Page'
```
Note that if you do this immediately after a page-load, in some cases you need to wait for the page to fully load. You can use a [`waitForUrl()`](#waitforurl) before attempting to access `driver.title` to make sure it works.
## `driver.dimensions`
Set the size of the browser window:
```cucumber
And driver.dimensions = { x: 0, y: 0, width: 300, height: 800 }
```
This also works as a "getter" to get the current window dimensions.
```cucumber
* def dims = driver.dimensions
```
The result JSON will be in the form: `{ x: '#number', y: '#number', width: '#number', height: '#number' }`
## `position()`
Get the absolute position and size of an element by [locator](#locators) as follows:
```cucumber
* def pos = position('#someid')
```
The absolute position returns the coordinate from the top left corner of the page. If you need the position of an element relative to the current viewport, you can pass an extra boolean argument set to 'true' ('false' will return the absolute position) :
```cucumber
* def pos = position('#someid', true)
```
The result JSON will be in the form: `{ x: '#number', y: '#number', width: '#number', height: '#number' }`
## `input()`
2 string arguments: [locator](#locators) and value to enter.
```cucumber
* input('input[name=someName]', 'test input')
```
As a convenience, there is a second form where you can pass an array as the second argument:
```cucumber
* input('input[name=someName]', ['test', ' input', Key.ENTER])
```
And an extra convenience third argument is a time-delay (in milliseconds) that will be applied before each array value. This is sometimes needed to "slow down" keystrokes, especially when there is a lot of JavaScript or security-validation behind the scenes.
```cucumber
* input('input[name=someName]', ['a', 'b', 'c', Key.ENTER], 200)
```
And for extra convenience, you can pass a string as the second argument above, in which case Karate will split the string and fire the delay before each character:
```cucumber
* input('input[name=someName]', 'type this slowly', 100)
```
If you need to send input to the "whole page" (not a specific input field), just use `body` as the selector:
```cucumber
* input('body', Key.ESCAPE)
```
### Special Keys
Special keys such as `ENTER`, `TAB` etc. can be specified like this:
```cucumber
* input('#someInput', 'test input' + Key.ENTER)
```
A special variable called `Key` will be available and you can see all the possible key codes [here](src/main/java/com/intuit/karate/driver/Key.java).
Also see [`value(locator, value)`](#valueset) and [`clear()`](#clear)
## `submit()`
Karate has an [elegant approach](#chaining) to handling any action such as [`click()`](#click) that results in a new page load. You "signal" that a submit is expected by calling the `submit()` function (which returns a `Driver` object) and then "[chaining](#chaining)" the action that is expected to trigger a page load.
```cucumber
When submit().click('*Page Three')
```
The advantage of this approach is that it works with any of the actions. So even if your next step is the [`ENTER` key](#special-keys), you can do this:
```cucumber
When submit().input('#someform', Key.ENTER)
```
Karate will do the best it can to detect a page change and wait for the load to complete before proceeding to *any* step that follows.
You can even mix this into [`mouse()`](#mouse) actions.
For some SPAs (Single Page Applications) the detection of a "page load" may be difficult because page-navigation (and the browser history) is taken over by JavaScript. In such cases, you can always fall-back to a [`waitForUrl()`](#waitforurl) or a more generic [`waitFor()`](#waitfor).
### `waitForUrl()` instead of `submit()`
Sometimes, because of an HTTP re-direct, it can be difficult for
gitextract_0ovktbaz/ ├── .github/ │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE.md │ ├── PULL_REQUEST_TEMPLATE.md │ ├── dependabot.yml │ └── workflows/ │ ├── codeql.yml │ ├── delete-workflow-runs.yml │ ├── jdk-compat.yml │ ├── maven-build.yml │ └── maven-release.yml ├── .gitignore ├── LICENSE ├── README.md ├── SECURITY.md ├── _config.yml ├── _includes/ │ ├── nav.html │ └── toc.html ├── build-docker.sh ├── examples/ │ ├── README.md │ ├── consumer-driven-contracts/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── payment-consumer/ │ │ │ ├── pom.xml │ │ │ └── src/ │ │ │ ├── main/ │ │ │ │ └── java/ │ │ │ │ └── payment/ │ │ │ │ └── consumer/ │ │ │ │ └── Consumer.java │ │ │ └── test/ │ │ │ └── java/ │ │ │ ├── logback-test.xml │ │ │ └── payment/ │ │ │ └── consumer/ │ │ │ ├── ConsumerIntegrationAgainstMockTest.java │ │ │ └── ConsumerIntegrationTest.java │ │ ├── payment-producer/ │ │ │ ├── pom.xml │ │ │ └── src/ │ │ │ ├── main/ │ │ │ │ └── java/ │ │ │ │ └── payment/ │ │ │ │ └── producer/ │ │ │ │ ├── Payment.java │ │ │ │ ├── PaymentService.java │ │ │ │ └── ServerStartedInitializingBean.java │ │ │ └── test/ │ │ │ └── java/ │ │ │ ├── karate-config.js │ │ │ ├── logback-test.xml │ │ │ └── payment/ │ │ │ └── producer/ │ │ │ ├── contract/ │ │ │ │ ├── PaymentContractTest.java │ │ │ │ └── payment-contract.feature │ │ │ └── mock/ │ │ │ ├── PaymentContractAgainstMockTest.java │ │ │ ├── payment-mock.feature │ │ │ └── test.feature │ │ └── pom.xml │ ├── gatling/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── build.gradle │ │ ├── pom.xml │ │ └── src/ │ │ └── test/ │ │ └── java/ │ │ ├── karate-config.js │ │ ├── logback-test.xml │ │ └── mock/ │ │ ├── CatsGatlingSimulation.scala │ │ ├── CatsKarateSimulation.scala │ │ ├── MockUtils.java │ │ ├── cats-create.feature │ │ ├── cats-delete-one.feature │ │ ├── cats-delete.feature │ │ ├── custom-rpc.feature │ │ ├── feeder.feature │ │ └── mock.feature │ ├── image-comparison/ │ │ ├── README.md │ │ ├── pom.xml │ │ └── src/ │ │ └── test/ │ │ └── java/ │ │ ├── karate-config.js │ │ ├── logback-test.xml │ │ └── ui/ │ │ ├── 1_establish_baseline.feature │ │ ├── 2_compare_baseline.feature │ │ ├── 3_custom_rebase.feature │ │ ├── 4_generic_rebase.feature │ │ ├── 5_custom_config.feature │ │ ├── 6_outline.feature │ │ ├── 7_api.feature │ │ ├── ImageComparisonRunner.java │ │ ├── MockRunner.java │ │ ├── html/ │ │ │ └── index.html │ │ └── screenshots/ │ │ └── config/ │ │ ├── loaded_phone.json │ │ ├── loaded_tablet.json │ │ ├── loading_phone.json │ │ └── loading_tablet.json │ ├── mobile-test/ │ │ ├── README.md │ │ ├── pom.xml │ │ └── src/ │ │ └── test/ │ │ └── java/ │ │ ├── android/ │ │ │ ├── AndroidTest.java │ │ │ └── android.feature │ │ ├── karate-config.js │ │ └── logback-test.xml │ ├── profiling-test/ │ │ ├── pom.xml │ │ └── src/ │ │ └── test/ │ │ └── java/ │ │ ├── karate-config.js │ │ ├── logback-test.xml │ │ └── perf/ │ │ ├── Main.java │ │ ├── TestSimulation.scala │ │ ├── TestUtils.java │ │ ├── called.feature │ │ ├── main.feature │ │ └── mock.feature │ ├── robot-test/ │ │ ├── README.md │ │ ├── pom.xml │ │ └── src/ │ │ └── test/ │ │ └── java/ │ │ ├── karate-config.js │ │ ├── logback-test.xml │ │ ├── mac/ │ │ │ ├── ChromeRunner.java │ │ │ └── chrome.feature │ │ └── win/ │ │ ├── CalcRunner.java │ │ └── calc.feature │ ├── ui-test/ │ │ ├── README.md │ │ ├── pom.xml │ │ └── src/ │ │ └── test/ │ │ └── java/ │ │ ├── logback-test.xml │ │ └── ui/ │ │ ├── MockRunner.java │ │ ├── UiRunner.java │ │ ├── html/ │ │ │ ├── index.html │ │ │ ├── karate.js │ │ │ └── page-01.html │ │ └── test.feature │ └── zip-release/ │ └── src/ │ └── demo/ │ ├── api/ │ │ ├── httpbin.feature │ │ └── users.feature │ ├── mock/ │ │ ├── cats-mock.feature │ │ ├── cats-test.feature │ │ └── cats.html │ ├── robot/ │ │ ├── calc-old.feature │ │ └── calc.feature │ └── web/ │ └── google.feature ├── jbang-catalog.json ├── karate-archetype/ │ ├── pom.xml │ └── src/ │ └── main/ │ └── resources/ │ ├── META-INF/ │ │ └── maven/ │ │ └── archetype-metadata.xml │ └── archetype-resources/ │ ├── .gitignore │ ├── pom.xml │ └── src/ │ └── test/ │ └── java/ │ ├── examples/ │ │ ├── ExamplesTest.java │ │ └── users/ │ │ ├── UsersRunner.java │ │ └── users.feature │ ├── karate-config.js │ └── logback-test.xml ├── karate-core/ │ ├── README.md │ ├── pom.xml │ └── src/ │ ├── main/ │ │ ├── antlr4/ │ │ │ └── com/ │ │ │ └── intuit/ │ │ │ └── karate/ │ │ │ └── core/ │ │ │ ├── KarateLexer.g4 │ │ │ └── KarateParser.g4 │ │ └── java/ │ │ ├── com/ │ │ │ └── intuit/ │ │ │ └── karate/ │ │ │ ├── Actions.java │ │ │ ├── Constants.java │ │ │ ├── FileUtils.java │ │ │ ├── Http.java │ │ │ ├── ImageComparison.java │ │ │ ├── Json.java │ │ │ ├── JsonUtils.java │ │ │ ├── KarateException.java │ │ │ ├── LogAppender.java │ │ │ ├── Logger.java │ │ │ ├── Main.java │ │ │ ├── Match.java │ │ │ ├── MatchOperation.java │ │ │ ├── MatchOperator.java │ │ │ ├── MatchStep.java │ │ │ ├── PerfContext.java │ │ │ ├── PerfHook.java │ │ │ ├── Results.java │ │ │ ├── Runner.java │ │ │ ├── RuntimeHook.java │ │ │ ├── ScenarioActions.java │ │ │ ├── StringUtils.java │ │ │ ├── Suite.java │ │ │ ├── XmlUtils.java │ │ │ ├── core/ │ │ │ │ ├── Action.java │ │ │ │ ├── AfterHookType.java │ │ │ │ ├── AssignType.java │ │ │ │ ├── AutoDef.java │ │ │ │ ├── Background.java │ │ │ │ ├── Channel.java │ │ │ │ ├── ChannelFactory.java │ │ │ │ ├── Config.java │ │ │ │ ├── Embed.java │ │ │ │ ├── ExamplesTable.java │ │ │ │ ├── Feature.java │ │ │ │ ├── FeatureCall.java │ │ │ │ ├── FeatureParser.java │ │ │ │ ├── FeatureResult.java │ │ │ │ ├── FeatureRuntime.java │ │ │ │ ├── FeatureSection.java │ │ │ │ ├── MockHandler.java │ │ │ │ ├── MockInterceptor.java │ │ │ │ ├── MockServer.java │ │ │ │ ├── ParallelProcessor.java │ │ │ │ ├── ParserErrorListener.java │ │ │ │ ├── PerfEvent.java │ │ │ │ ├── Plugin.java │ │ │ │ ├── PluginFactory.java │ │ │ │ ├── Result.java │ │ │ │ ├── RuntimeHookFactory.java │ │ │ │ ├── Scenario.java │ │ │ │ ├── ScenarioBridge.java │ │ │ │ ├── ScenarioCall.java │ │ │ │ ├── ScenarioEngine.java │ │ │ │ ├── ScenarioFileReader.java │ │ │ │ ├── ScenarioIterator.java │ │ │ │ ├── ScenarioOutline.java │ │ │ │ ├── ScenarioOutlineResult.java │ │ │ │ ├── ScenarioResult.java │ │ │ │ ├── ScenarioRuntime.java │ │ │ │ ├── Step.java │ │ │ │ ├── StepResult.java │ │ │ │ ├── StepRuntime.java │ │ │ │ ├── SyncExecutorService.java │ │ │ │ ├── Table.java │ │ │ │ ├── Tag.java │ │ │ │ ├── TagResults.java │ │ │ │ ├── Tags.java │ │ │ │ ├── TimelineResults.java │ │ │ │ ├── Variable.java │ │ │ │ └── When.java │ │ │ ├── driver/ │ │ │ │ ├── DevToolsDriver.java │ │ │ │ ├── DevToolsMessage.java │ │ │ │ ├── DevToolsMock.java │ │ │ │ ├── DevToolsWait.java │ │ │ │ ├── DockerTarget.java │ │ │ │ ├── Driver.java │ │ │ │ ├── DriverElement.java │ │ │ │ ├── DriverMouse.java │ │ │ │ ├── DriverOptions.java │ │ │ │ ├── DriverRunner.java │ │ │ │ ├── Element.java │ │ │ │ ├── ElementFinder.java │ │ │ │ ├── Finder.java │ │ │ │ ├── Frame.java │ │ │ │ ├── Input.java │ │ │ │ ├── Key.java │ │ │ │ ├── Keys.java │ │ │ │ ├── MissingElement.java │ │ │ │ ├── MissingFinder.java │ │ │ │ ├── Mouse.java │ │ │ │ ├── Target.java │ │ │ │ ├── WebDriver.java │ │ │ │ ├── appium/ │ │ │ │ │ ├── AndroidDriver.java │ │ │ │ │ ├── AppiumDriver.java │ │ │ │ │ ├── IosDriver.java │ │ │ │ │ └── MobileDriverOptions.java │ │ │ │ ├── chrome/ │ │ │ │ │ ├── Chrome.java │ │ │ │ │ └── ChromeWebDriver.java │ │ │ │ ├── firefox/ │ │ │ │ │ └── GeckoWebDriver.java │ │ │ │ ├── microsoft/ │ │ │ │ │ ├── EdgeChromium.java │ │ │ │ │ ├── IeWebDriver.java │ │ │ │ │ ├── MsEdgeDriver.java │ │ │ │ │ ├── MsWebDriver.java │ │ │ │ │ └── WinAppDriver.java │ │ │ │ ├── playwright/ │ │ │ │ │ ├── PlaywrightDriver.java │ │ │ │ │ ├── PlaywrightMessage.java │ │ │ │ │ └── PlaywrightWait.java │ │ │ │ └── safari/ │ │ │ │ └── SafariWebDriver.java │ │ │ ├── graal/ │ │ │ │ ├── JsArray.java │ │ │ │ ├── JsEngine.java │ │ │ │ ├── JsFunction.java │ │ │ │ ├── JsLambda.java │ │ │ │ ├── JsList.java │ │ │ │ ├── JsMap.java │ │ │ │ ├── JsValue.java │ │ │ │ ├── JsXml.java │ │ │ │ └── Methods.java │ │ │ ├── http/ │ │ │ │ ├── ApacheHttpClient.java │ │ │ │ ├── ArmeriaHttpClient.java │ │ │ │ ├── AwsLambdaHandler.java │ │ │ │ ├── Cookies.java │ │ │ │ ├── CustomHttpRequestRetryHandler.java │ │ │ │ ├── GenericHttpHeaderTracking.java │ │ │ │ ├── HttpClient.java │ │ │ │ ├── HttpClientFactory.java │ │ │ │ ├── HttpConstants.java │ │ │ │ ├── HttpHeaderTracking.java │ │ │ │ ├── HttpLogModifier.java │ │ │ │ ├── HttpLogger.java │ │ │ │ ├── HttpRequest.java │ │ │ │ ├── HttpRequestBuilder.java │ │ │ │ ├── HttpServer.java │ │ │ │ ├── HttpServerHandler.java │ │ │ │ ├── HttpUtils.java │ │ │ │ ├── JvmSessionStore.java │ │ │ │ ├── LenientTrustManager.java │ │ │ │ ├── MultiPartBuilder.java │ │ │ │ ├── ProxyClientHandler.java │ │ │ │ ├── ProxyContext.java │ │ │ │ ├── ProxyRemoteHandler.java │ │ │ │ ├── ProxyRequest.java │ │ │ │ ├── ProxyResponse.java │ │ │ │ ├── ProxyServer.java │ │ │ │ ├── RedirectException.java │ │ │ │ ├── Request.java │ │ │ │ ├── RequestCycle.java │ │ │ │ ├── RequestFilter.java │ │ │ │ ├── RequestHandler.java │ │ │ │ ├── ResourceType.java │ │ │ │ ├── Response.java │ │ │ │ ├── ResponseBuilder.java │ │ │ │ ├── ResponseFilter.java │ │ │ │ ├── ServerConfig.java │ │ │ │ ├── ServerContext.java │ │ │ │ ├── ServerHandler.java │ │ │ │ ├── Session.java │ │ │ │ ├── SessionStore.java │ │ │ │ ├── SslContextFactory.java │ │ │ │ ├── WebSocketClient.java │ │ │ │ ├── WebSocketClientHandler.java │ │ │ │ ├── WebSocketListener.java │ │ │ │ ├── WebSocketOptions.java │ │ │ │ ├── WebSocketProxyHandler.java │ │ │ │ ├── WebSocketProxyServer.java │ │ │ │ ├── WebSocketServerBase.java │ │ │ │ └── cert/ │ │ │ │ ├── SelfSignedCertGenerator.java │ │ │ │ └── ThreadLocalInsecureRandom.java │ │ │ ├── report/ │ │ │ │ ├── Report.java │ │ │ │ ├── ReportUtils.java │ │ │ │ ├── Resemble.js │ │ │ │ ├── SuiteReports.java │ │ │ │ ├── karate-feature.html │ │ │ │ ├── karate-leftnav.html │ │ │ │ ├── karate-posthog.html │ │ │ │ ├── karate-report.css │ │ │ │ ├── karate-report.js │ │ │ │ ├── karate-step.html │ │ │ │ ├── karate-summary.html │ │ │ │ ├── karate-tags.html │ │ │ │ └── karate-timeline.html │ │ │ ├── resource/ │ │ │ │ ├── FileResource.java │ │ │ │ ├── JarResource.java │ │ │ │ ├── MemoryResource.java │ │ │ │ ├── Resource.java │ │ │ │ ├── ResourceResolver.java │ │ │ │ └── ResourceUtils.java │ │ │ ├── shell/ │ │ │ │ ├── Command.java │ │ │ │ ├── Console.java │ │ │ │ ├── FileLogAppender.java │ │ │ │ ├── StopListenerThread.java │ │ │ │ ├── Stoppable.java │ │ │ │ └── StringLogAppender.java │ │ │ └── template/ │ │ │ ├── KaHxAnyAttrProcessor.java │ │ │ ├── KaHxMethodAttrProcessor.java │ │ │ ├── KaHxValsAttrProcessor.java │ │ │ ├── KaLinkAttrProcessor.java │ │ │ ├── KaScriptAttrProcessor.java │ │ │ ├── KaScriptElemProcessor.java │ │ │ ├── KaSetElemProcessor.java │ │ │ ├── KarateAttributeTagProcessor.java │ │ │ ├── KarateEachTagProcessor.java │ │ │ ├── KarateEngineContext.java │ │ │ ├── KarateExpression.java │ │ │ ├── KarateScriptDialect.java │ │ │ ├── KarateServerDialect.java │ │ │ ├── KarateStandardDialect.java │ │ │ ├── KarateTemplateEngine.java │ │ │ ├── KarateTemplateResource.java │ │ │ ├── KarateWithTagProcessor.java │ │ │ ├── ResourceHtmlTemplateResolver.java │ │ │ ├── ServerHtmlTemplateResolver.java │ │ │ ├── StringHtmlTemplateResolver.java │ │ │ ├── StringTemplateResource.java │ │ │ ├── TemplateContext.java │ │ │ └── TemplateUtils.java │ │ ├── karate-meta.properties │ │ ├── logback-fatjar.xml │ │ ├── logback-nofile.xml │ │ └── nodebug/ │ │ └── io/ │ │ └── karatelabs/ │ │ └── LenientSslConnectionSocketFactory.java │ └── test/ │ ├── java/ │ │ ├── com/ │ │ │ └── intuit/ │ │ │ └── karate/ │ │ │ ├── ComplexPojo.java │ │ │ ├── FileUtilsTest.java │ │ │ ├── ImageComparisonTest.java │ │ │ ├── JsonTest.java │ │ │ ├── JsonUtilsTest.java │ │ │ ├── MainTest.java │ │ │ ├── MatchStepTest.java │ │ │ ├── MatchTest.java │ │ │ ├── SimplePojo.java │ │ │ ├── StringUtilsTest.java │ │ │ ├── SystemPropertiesTest.java │ │ │ ├── TestUtils.java │ │ │ ├── ThreadCountTest.java │ │ │ ├── XmlUtilsTest.java │ │ │ ├── core/ │ │ │ │ ├── CallResponseTest.java │ │ │ │ ├── Cat.java │ │ │ │ ├── ComplexPojo.java │ │ │ │ ├── DummyClient.java │ │ │ │ ├── DummyUiTest.java │ │ │ │ ├── FeatureFailRunner.java │ │ │ │ ├── FeatureResultTest.java │ │ │ │ ├── FeatureRuntimeTest.java │ │ │ │ ├── HttpMockHandlerRunner.java │ │ │ │ ├── HttpMockHandlerTest.java │ │ │ │ ├── JsStubGenerator.java │ │ │ │ ├── KarateHttpMockHandlerTest.java │ │ │ │ ├── KarateMockHandlerTest.java │ │ │ │ ├── MockClient.java │ │ │ │ ├── MockHandlerTest.java │ │ │ │ ├── MockUtils.java │ │ │ │ ├── PaymentsMockRunner.java │ │ │ │ ├── PaymentsRunner.java │ │ │ │ ├── PerfHookTest.java │ │ │ │ ├── PrintTest.java │ │ │ │ ├── ScenarioBridgeTest.java │ │ │ │ ├── ScenarioEngineTest.java │ │ │ │ ├── ScenarioOutlineResultTest.java │ │ │ │ ├── ScenarioRuntimeTest.java │ │ │ │ ├── SimplePojo.java │ │ │ │ ├── StaticUtils.java │ │ │ │ ├── StepRuntimeTest.java │ │ │ │ ├── TagsTest.java │ │ │ │ ├── TestLogAppender.java │ │ │ │ ├── VariableTest.java │ │ │ │ ├── abort.feature │ │ │ │ ├── align.feature │ │ │ │ ├── big-decimal.feature │ │ │ │ ├── call-arg-called.feature │ │ │ │ ├── call-arg-common.feature │ │ │ │ ├── call-arg-null-called.feature │ │ │ │ ├── call-arg-null.feature │ │ │ │ ├── call-arg.feature │ │ │ │ ├── call-by-tag-called.feature │ │ │ │ ├── call-by-tag.feature │ │ │ │ ├── call-feature-called.feature │ │ │ │ ├── call-feature.feature │ │ │ │ ├── call-js-called.feature │ │ │ │ ├── call-js.feature │ │ │ │ ├── call-jsonpath-called.feature │ │ │ │ ├── call-jsonpath.feature │ │ │ │ ├── call-response-called.feature │ │ │ │ ├── call-response-mock.feature │ │ │ │ ├── call-response.feature │ │ │ │ ├── call-self.feature │ │ │ │ ├── call-single-fail-called.feature │ │ │ │ ├── call-single-fail.feature │ │ │ │ ├── call-single-tag-called.feature │ │ │ │ ├── call-single-tag.feature │ │ │ │ ├── callSingleFeature.feature │ │ │ │ ├── callSingleScenario.feature │ │ │ │ ├── called1.feature │ │ │ │ ├── called2.feature │ │ │ │ ├── called3-caller1.js │ │ │ │ ├── called3-caller2.js │ │ │ │ ├── called3.js │ │ │ │ ├── callonce-bg-called.feature │ │ │ │ ├── callonce-bg-outline.feature │ │ │ │ ├── callonce-bg.feature │ │ │ │ ├── callonce-config-called.feature │ │ │ │ ├── callonce-config.feature │ │ │ │ ├── callonce-global-called.feature │ │ │ │ ├── callonce-global.feature │ │ │ │ ├── configure-in-js.feature │ │ │ │ ├── copy-called-nested.feature │ │ │ │ ├── copy-called-overwrite.feature │ │ │ │ ├── copy-called.feature │ │ │ │ ├── copy.feature │ │ │ │ ├── csv.feature │ │ │ │ ├── data.json │ │ │ │ ├── dummy-ui-google.feature │ │ │ │ ├── dummy.feature │ │ │ │ ├── eval-and-set.feature │ │ │ │ ├── eval-assign.feature │ │ │ │ ├── exec.feature │ │ │ │ ├── extract.feature │ │ │ │ ├── extract.html │ │ │ │ ├── fail-api.feature │ │ │ │ ├── fail-js.feature │ │ │ │ ├── fail-tag-failure.feature │ │ │ │ ├── fail-tag.feature │ │ │ │ ├── fail1.feature │ │ │ │ ├── feature-result-called.feature │ │ │ │ ├── feature-result-cucumber.json │ │ │ │ ├── feature-result.feature │ │ │ │ ├── feature-result.json │ │ │ │ ├── features/ │ │ │ │ │ ├── RemainingFeaturesTest.java │ │ │ │ │ ├── feature1.feature │ │ │ │ │ ├── feature2.feature │ │ │ │ │ └── karate-config.js │ │ │ │ ├── fork-listener.feature │ │ │ │ ├── fork.feature │ │ │ │ ├── ignore-step-failure.feature │ │ │ │ ├── increment.js │ │ │ │ ├── js-arrays-products.json │ │ │ │ ├── js-arrays.feature │ │ │ │ ├── js-map-repeat.feature │ │ │ │ ├── jscall/ │ │ │ │ │ ├── JsCallTest.java │ │ │ │ │ ├── JsCallonceTest.java │ │ │ │ │ ├── dummy.feature │ │ │ │ │ ├── js-call.feature │ │ │ │ │ ├── js-called.feature │ │ │ │ │ ├── js-callonce.feature │ │ │ │ │ ├── karate-config.js │ │ │ │ │ └── utils.feature │ │ │ │ ├── jscall2/ │ │ │ │ │ ├── JsCall2Test.java │ │ │ │ │ ├── all.feature │ │ │ │ │ ├── call-once.feature │ │ │ │ │ ├── call-single.feature │ │ │ │ │ ├── call.feature │ │ │ │ │ ├── karate-config.js │ │ │ │ │ ├── local.feature │ │ │ │ │ └── mock.feature │ │ │ │ ├── jsread/ │ │ │ │ │ ├── js-read-2.feature │ │ │ │ │ ├── js-read-2.json │ │ │ │ │ ├── js-read-3.feature │ │ │ │ │ ├── js-read-3.json │ │ │ │ │ ├── js-read-4.feature │ │ │ │ │ ├── js-read-4.json │ │ │ │ │ ├── js-read-5.json │ │ │ │ │ ├── js-read-called-2.feature │ │ │ │ │ ├── js-read-called-3.feature │ │ │ │ │ ├── js-read-called.feature │ │ │ │ │ ├── js-read-reuse-2.feature │ │ │ │ │ ├── js-read-reuse-only-background.feature │ │ │ │ │ ├── js-read-reuse.feature │ │ │ │ │ ├── js-read.feature │ │ │ │ │ └── js-read.json │ │ │ │ ├── karate-config-callonce.js │ │ │ │ ├── karate-config-callsingle.js │ │ │ │ ├── karate-config-callsingletag.js │ │ │ │ ├── karate-config-csfail.js │ │ │ │ ├── karate-config-dev.js │ │ │ │ ├── karate-config-fn.feature │ │ │ │ ├── karate-config-frombase.feature │ │ │ │ ├── karate-config-frombase.js │ │ │ │ ├── karate-config-getscenario.feature │ │ │ │ ├── karate-config-getscenario.js │ │ │ │ ├── karate-config-utils.feature │ │ │ │ ├── karate-config.js │ │ │ │ ├── karate-get-called.feature │ │ │ │ ├── karate-get.feature │ │ │ │ ├── lower-case.feature │ │ │ │ ├── match-each-magic-variables.feature │ │ │ │ ├── match-step.feature │ │ │ │ ├── mock/ │ │ │ │ │ ├── MockRunner.java │ │ │ │ │ ├── MockSslTest.java │ │ │ │ │ ├── MockTest.java │ │ │ │ │ ├── SimpleMockRunner.java │ │ │ │ │ ├── _mock.feature │ │ │ │ │ ├── _simple.feature │ │ │ │ │ ├── binary.feature │ │ │ │ │ ├── brotli.feature │ │ │ │ │ ├── call.feature │ │ │ │ │ ├── called.feature │ │ │ │ │ ├── cookies.feature │ │ │ │ │ ├── delete.feature │ │ │ │ │ ├── download.feature │ │ │ │ │ ├── form.feature │ │ │ │ │ ├── german.feature │ │ │ │ │ ├── headers.feature │ │ │ │ │ ├── hello-data-driven.feature │ │ │ │ │ ├── hello-world.feature │ │ │ │ │ ├── html.feature │ │ │ │ │ ├── invalid-cookie.feature │ │ │ │ │ ├── json-bad.feature │ │ │ │ │ ├── json-order-mock-test.feature │ │ │ │ │ ├── json-order-mock.feature │ │ │ │ │ ├── karate-config.js │ │ │ │ │ ├── malformed.feature │ │ │ │ │ ├── malformed.txt │ │ │ │ │ ├── multi-params.feature │ │ │ │ │ ├── no-headers.feature │ │ │ │ │ ├── no-match.feature │ │ │ │ │ ├── param-commas.feature │ │ │ │ │ ├── patch.feature │ │ │ │ │ ├── test.xlsx │ │ │ │ │ ├── upload.feature │ │ │ │ │ ├── url-encoding.feature │ │ │ │ │ └── white-space.feature │ │ │ │ ├── not-equals.feature │ │ │ │ ├── ntlm-authentication.feature │ │ │ │ ├── outline-background.feature │ │ │ │ ├── outline-cat.json │ │ │ │ ├── outline-cats.json │ │ │ │ ├── outline-config-js.feature │ │ │ │ ├── outline-csv.csv │ │ │ │ ├── outline-csv.feature │ │ │ │ ├── outline-dynamic-fail.feature │ │ │ │ ├── outline-dynamic.feature │ │ │ │ ├── outline-generator.feature │ │ │ │ ├── outline-setup-once.feature │ │ │ │ ├── outline.feature │ │ │ │ ├── parajava/ │ │ │ │ │ ├── ParallelJavaTest.java │ │ │ │ │ ├── karate-config.js │ │ │ │ │ ├── parallel-java1.feature │ │ │ │ │ ├── parallel-java2.feature │ │ │ │ │ └── setup.feature │ │ │ │ ├── parallel/ │ │ │ │ │ ├── Hello.java │ │ │ │ │ ├── HelloTest.java │ │ │ │ │ ├── ParallelCsvTest.java │ │ │ │ │ ├── ParallelOutlineTest.java │ │ │ │ │ ├── ParallelTest.java │ │ │ │ │ ├── call-once-from-feature.feature │ │ │ │ │ ├── call-single-from-config.feature │ │ │ │ │ ├── call-single-from-config2.feature │ │ │ │ │ ├── call-single-from-config3.js │ │ │ │ │ ├── call-single-from-feature.feature │ │ │ │ │ ├── called.feature │ │ │ │ │ ├── cookies.js │ │ │ │ │ ├── data.csv │ │ │ │ │ ├── headers.js │ │ │ │ │ ├── hello.feature │ │ │ │ │ ├── karate-base.js │ │ │ │ │ ├── karate-config.js │ │ │ │ │ ├── mock.feature │ │ │ │ │ ├── parallel-csv.feature │ │ │ │ │ ├── parallel-outline-1.feature │ │ │ │ │ ├── parallel-outline-2.feature │ │ │ │ │ ├── parallel-outline-call-api.feature │ │ │ │ │ └── parallel.feature │ │ │ │ ├── parasimple/ │ │ │ │ │ ├── ParallelOutlineSimpleTest.java │ │ │ │ │ ├── headers.feature │ │ │ │ │ ├── headers.js │ │ │ │ │ ├── karate-config.js │ │ │ │ │ └── parallel-outline-simple.feature │ │ │ │ ├── parser/ │ │ │ │ │ ├── FeatureParserTest.java │ │ │ │ │ ├── test-comments.feature │ │ │ │ │ ├── test-def-docstring.feature │ │ │ │ │ ├── test-edge-cases.feature │ │ │ │ │ ├── test-empty-background.feature │ │ │ │ │ ├── test-empty-first-line1.feature │ │ │ │ │ ├── test-empty-first-line2.feature │ │ │ │ │ ├── test-empty-first-line3.feature │ │ │ │ │ ├── test-empty.feature.txt │ │ │ │ │ ├── test-error.feature │ │ │ │ │ ├── test-feature-header-only.feature │ │ │ │ │ ├── test-hide.feature │ │ │ │ │ ├── test-ignore-feature.feature │ │ │ │ │ ├── test-ignore-scenario.feature │ │ │ │ │ ├── test-outline-dynamic.feature │ │ │ │ │ ├── test-outline-examples-tags.feature │ │ │ │ │ ├── test-outline-name-js.feature │ │ │ │ │ ├── test-outline-name.feature │ │ │ │ │ ├── test-scenario-description.feature │ │ │ │ │ ├── test-set-table.feature │ │ │ │ │ ├── test-simple-background.feature │ │ │ │ │ ├── test-simple.feature │ │ │ │ │ ├── test-table-pipe.feature │ │ │ │ │ └── test-tags-multiline.feature │ │ │ │ ├── payments-mock.feature │ │ │ │ ├── payments.feature │ │ │ │ ├── perf-mock.feature │ │ │ │ ├── perf.feature │ │ │ │ ├── print.feature │ │ │ │ ├── read-expressions.json │ │ │ │ ├── read-expressions.yml │ │ │ │ ├── read-properties.feature │ │ │ │ ├── read-properties.properties │ │ │ │ ├── replace.feature │ │ │ │ ├── retry/ │ │ │ │ │ ├── RetryTest.java │ │ │ │ │ ├── retry-with-setup.feature │ │ │ │ │ └── test.feature │ │ │ │ ├── runner/ │ │ │ │ │ ├── FeatureResultTest.java │ │ │ │ │ ├── FeatureReuseTest.java │ │ │ │ │ ├── NoopDriver.java │ │ │ │ │ ├── RunnerTest.java │ │ │ │ │ ├── TagTest.java │ │ │ │ │ ├── aborted.feature │ │ │ │ │ ├── called-arg-loop.feature │ │ │ │ │ ├── called-arg-null.feature │ │ │ │ │ ├── called-arg-single.feature │ │ │ │ │ ├── called-shared.feature │ │ │ │ │ ├── called-shared2.feature │ │ │ │ │ ├── called.feature │ │ │ │ │ ├── called_2.feature │ │ │ │ │ ├── caller-arg.feature │ │ │ │ │ ├── caller-shared.feature │ │ │ │ │ ├── caller-with-lambda-arg.feature │ │ │ │ │ ├── caller.feature │ │ │ │ │ ├── caller_2.feature │ │ │ │ │ ├── failed.feature │ │ │ │ │ ├── hooks/ │ │ │ │ │ │ ├── HooksTest.java │ │ │ │ │ │ ├── MandatoryTagHook.java │ │ │ │ │ │ ├── NoFeatureTestRuntimeHook.java │ │ │ │ │ │ ├── NoScenarioTestRuntimeHook.java │ │ │ │ │ │ ├── NoStepTestRuntimeHook.java │ │ │ │ │ │ ├── ScenarioHookSkipTest.java │ │ │ │ │ │ ├── ScenarioHookTest.java │ │ │ │ │ │ ├── SkipHook.java │ │ │ │ │ │ ├── TestRuntimeHook.java │ │ │ │ │ │ ├── hook-dynamic-outline.feature │ │ │ │ │ │ ├── hook-multiple-dynamic-outline.feature │ │ │ │ │ │ ├── hook-multiple-outlines.feature │ │ │ │ │ │ ├── hook-outline.feature │ │ │ │ │ │ ├── hook-scenario.feature │ │ │ │ │ │ ├── karate-base.js │ │ │ │ │ │ ├── karate-config.js │ │ │ │ │ │ ├── test-hook-multiexample.feature │ │ │ │ │ │ ├── test-hook-notags.feature │ │ │ │ │ │ └── test-hook-skip.feature │ │ │ │ │ ├── multi-scenario-fail.feature │ │ │ │ │ ├── multi-scenario.feature │ │ │ │ │ ├── no-scenario-name.feature │ │ │ │ │ ├── notEqualMatch.feature │ │ │ │ │ ├── outline.feature │ │ │ │ │ ├── run-arg.feature │ │ │ │ │ ├── run-ignore.feature │ │ │ │ │ ├── scenario.feature │ │ │ │ │ ├── signin.feature │ │ │ │ │ ├── stackoverflow-error.feature │ │ │ │ │ ├── table.feature │ │ │ │ │ ├── test-called-embedded-file.feature │ │ │ │ │ ├── test-called-embedded.feature │ │ │ │ │ ├── test-called.feature │ │ │ │ │ ├── test.json │ │ │ │ │ └── test.xml │ │ │ │ ├── scenario-outline-result.feature │ │ │ │ ├── scenario-variable-scope.feature │ │ │ │ ├── schema-like-odds.json │ │ │ │ ├── schema-like-time-validator.js │ │ │ │ ├── schema-like.feature │ │ │ │ ├── schema-read-inner.json │ │ │ │ ├── schema-read.feature │ │ │ │ ├── schema-read.json │ │ │ │ ├── set-xml.feature │ │ │ │ ├── set.feature │ │ │ │ ├── single-scenario.feature │ │ │ │ ├── sort-array.feature │ │ │ │ ├── sort-array.js │ │ │ │ ├── table.feature │ │ │ │ ├── tags/ │ │ │ │ │ ├── TagsTest.java │ │ │ │ │ ├── env-tags.feature │ │ │ │ │ └── outline-tags.feature │ │ │ │ ├── tags.feature │ │ │ │ ├── to-bean-called.feature │ │ │ │ ├── to-bean.feature │ │ │ │ ├── type-conv-query.txt │ │ │ │ ├── type-conv-query2.txt │ │ │ │ ├── type-conv.feature │ │ │ │ ├── type-conversion.feature │ │ │ │ ├── ui-google.feature │ │ │ │ ├── users-doc.feature │ │ │ │ ├── users-single.html │ │ │ │ ├── users.html │ │ │ │ ├── utils-reuse-common.feature │ │ │ │ ├── utils-reuse.feature │ │ │ │ ├── uuid.js │ │ │ │ ├── websocket.feature │ │ │ │ ├── xml/ │ │ │ │ │ ├── XmlTest.java │ │ │ │ │ ├── envelope1.xml │ │ │ │ │ ├── envelope2.xml │ │ │ │ │ ├── soap1.xml │ │ │ │ │ ├── soap2.xml │ │ │ │ │ ├── xml-and-xpath.feature │ │ │ │ │ ├── xml-call.feature │ │ │ │ │ ├── xml-called.feature │ │ │ │ │ └── xml.feature │ │ │ │ └── xml-pretty.feature │ │ │ ├── driver/ │ │ │ │ ├── DriverElementTest.java │ │ │ │ ├── DriverOptionsTest.java │ │ │ │ ├── ElementFinderTest.java │ │ │ │ ├── KeyTest.java │ │ │ │ ├── appium/ │ │ │ │ │ └── MobileDriverOptionsTest.java │ │ │ │ └── playwright/ │ │ │ │ └── PlaywrightDriverRunner.java │ │ │ ├── fatjar/ │ │ │ │ ├── ClientRunner.java │ │ │ │ ├── FeatureProxyRunner.java │ │ │ │ ├── FeatureServerRunner.java │ │ │ │ ├── FeatureServerTest.java │ │ │ │ ├── MainRunner.java │ │ │ │ ├── MainSslRunner.java │ │ │ │ ├── ProxyServerRunner.java │ │ │ │ ├── ProxyServerSslMain.java │ │ │ │ ├── ProxyServerSslTest.java │ │ │ │ ├── ProxyServerTest.java │ │ │ │ ├── client.feature │ │ │ │ ├── karate-config.js │ │ │ │ ├── proxy.feature │ │ │ │ ├── server.feature │ │ │ │ └── temp.html │ │ │ ├── graal/ │ │ │ │ ├── JsEngineTest.java │ │ │ │ ├── JsValueTest.java │ │ │ │ ├── SimplePojo.java │ │ │ │ └── StaticPojo.java │ │ │ ├── http/ │ │ │ │ ├── AwsLambdaHandlerTest.java │ │ │ │ ├── GenericHttpHeaderTrackingTest.java │ │ │ │ ├── HttpClientTester.java │ │ │ │ ├── HttpHookTest.java │ │ │ │ ├── HttpLoggerTest.java │ │ │ │ ├── HttpRequestBuilderTest.java │ │ │ │ ├── HttpUtilsTest.java │ │ │ │ ├── MultiPartBuilderTest.java │ │ │ │ ├── ProxyContextTest.java │ │ │ │ ├── RequestHandlerTest.java │ │ │ │ ├── WebSocketClientRunner.java │ │ │ │ ├── WebSocketProxyRunner.java │ │ │ │ ├── WebSocketTempRunner.java │ │ │ │ ├── api.json │ │ │ │ ├── cats.json │ │ │ │ ├── form.json │ │ │ │ ├── index.json │ │ │ │ ├── mock.feature │ │ │ │ └── root.json │ │ │ ├── malformed.txt │ │ │ ├── report/ │ │ │ │ ├── ReportUtilsTest.java │ │ │ │ ├── called-loop.feature │ │ │ │ ├── called.feature │ │ │ │ ├── called2.feature │ │ │ │ ├── called3.feature │ │ │ │ ├── customTags.feature │ │ │ │ ├── data.csv │ │ │ │ └── test.feature │ │ │ ├── resource/ │ │ │ │ ├── ResourceUtilsTest.java │ │ │ │ ├── dir1/ │ │ │ │ │ └── dir1.log │ │ │ │ ├── dir2/ │ │ │ │ │ └── dir2.log │ │ │ │ ├── test.feature │ │ │ │ ├── test1.txt │ │ │ │ └── test2.log │ │ │ ├── shell/ │ │ │ │ ├── CommandTest.java │ │ │ │ └── CommandTester.java │ │ │ ├── template/ │ │ │ │ ├── TemplateTest.java │ │ │ │ ├── attr.html │ │ │ │ ├── called1.html │ │ │ │ ├── global.js │ │ │ │ ├── ka-set.html │ │ │ │ ├── local.js │ │ │ │ ├── main.html │ │ │ │ ├── nocache.html │ │ │ │ ├── temp.html │ │ │ │ ├── temp.js │ │ │ │ ├── with-called.html │ │ │ │ └── with.html │ │ │ └── test/ │ │ │ └── file-utils-test.feature │ │ ├── demo/ │ │ │ ├── ServerRunner.java │ │ │ ├── api/ │ │ │ │ ├── cats.js │ │ │ │ ├── demo.js │ │ │ │ ├── payments.js │ │ │ │ ├── render.js │ │ │ │ └── test.html │ │ │ ├── apidocs.html │ │ │ ├── app.css │ │ │ ├── cats.html │ │ │ ├── details.html │ │ │ ├── index.html │ │ │ ├── person.html │ │ │ ├── user.html │ │ │ └── users.html │ │ ├── karate-base.js │ │ ├── karate-config.js │ │ ├── logback-test.xml │ │ └── payments.jmx │ └── resources/ │ ├── analytics.md │ └── readme.txt ├── karate-demo/ │ ├── README.md │ ├── build.gradle │ ├── pom.xml │ └── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── com/ │ │ │ └── intuit/ │ │ │ └── karate/ │ │ │ └── demo/ │ │ │ ├── Application.java │ │ │ ├── config/ │ │ │ │ ├── ServerStartedInitializingBean.java │ │ │ │ ├── TomcatConfig.java │ │ │ │ ├── WebSecurityConfig.java │ │ │ │ └── WebSocketConfig.java │ │ │ ├── controller/ │ │ │ │ ├── CatsController.java │ │ │ │ ├── DogsController.java │ │ │ │ ├── EchoController.java │ │ │ │ ├── EncodingController.java │ │ │ │ ├── GraphqlController.java │ │ │ │ ├── GreetingController.java │ │ │ │ ├── HeadersController.java │ │ │ │ ├── RedirectController.java │ │ │ │ ├── SearchController.java │ │ │ │ ├── SignInController.java │ │ │ │ ├── SoapController.java │ │ │ │ ├── UploadController.java │ │ │ │ ├── WebSocketController.java │ │ │ │ └── WebSocketHandler.java │ │ │ ├── domain/ │ │ │ │ ├── Binary.java │ │ │ │ ├── Cat.java │ │ │ │ ├── Dog.java │ │ │ │ ├── FileInfo.java │ │ │ │ ├── Greeting.java │ │ │ │ ├── Message.java │ │ │ │ └── SignIn.java │ │ │ ├── exception/ │ │ │ │ ├── ErrorResponse.java │ │ │ │ └── GlobalExceptionHandler.java │ │ │ └── util/ │ │ │ ├── DbUtils.java │ │ │ ├── FileChecker.java │ │ │ ├── FizzBuzz.java │ │ │ ├── JavaDemo.java │ │ │ └── SchemaUtils.java │ │ └── resources/ │ │ ├── application.properties │ │ ├── graphql-1.json │ │ ├── graphql-2.json │ │ ├── schema.sql │ │ ├── soap-1.xml │ │ └── soap-2.xml │ └── test/ │ └── java/ │ ├── demo/ │ │ ├── DemoRunner.java │ │ ├── DemoTestParallel.java │ │ ├── DemoTestSelected.java │ │ ├── TestBase.java │ │ ├── abort/ │ │ │ └── abort.feature │ │ ├── binary/ │ │ │ └── binary.feature │ │ ├── callarray/ │ │ │ ├── call-json-array.feature │ │ │ ├── kitten-create.feature │ │ │ └── kittens.json │ │ ├── calldynamic/ │ │ │ ├── call-dynamic-json.feature │ │ │ └── get-cat.feature │ │ ├── callfeature/ │ │ │ ├── call-feature.feature │ │ │ ├── called-arg.feature │ │ │ ├── called-normal.feature │ │ │ ├── create-cats-outline.feature │ │ │ └── create-two-cats.feature │ │ ├── callnested/ │ │ │ ├── call-nested.feature │ │ │ ├── called1.feature │ │ │ ├── called2.feature │ │ │ └── called3.feature │ │ ├── callonce/ │ │ │ └── call-once.feature │ │ ├── calltable/ │ │ │ ├── call-table.feature │ │ │ └── kitten-create.feature │ │ ├── cats/ │ │ │ ├── CatsJava.java │ │ │ ├── billie-expected.json │ │ │ ├── cats-put.feature │ │ │ ├── cats.feature │ │ │ ├── kittens.feature │ │ │ └── syntax-demo.feature │ │ ├── cookies/ │ │ │ └── cookies.feature │ │ ├── delete/ │ │ │ └── delete.feature │ │ ├── dogs/ │ │ │ └── dogs.feature │ │ ├── dsl/ │ │ │ ├── common.feature │ │ │ ├── dsl.feature │ │ │ ├── greet.js │ │ │ └── login.feature │ │ ├── embed/ │ │ │ ├── embed-pdf.js │ │ │ └── embed.feature │ │ ├── encoding/ │ │ │ └── encoding.feature │ │ ├── error/ │ │ │ ├── error.feature │ │ │ └── no-url.feature │ │ ├── form/ │ │ │ └── form.feature │ │ ├── graphql/ │ │ │ ├── graphql.feature │ │ │ └── user-by-id.graphql │ │ ├── greeting/ │ │ │ └── greeting.feature │ │ ├── headers/ │ │ │ ├── DemoLogModifier.java │ │ │ ├── call-isolated-config.feature │ │ │ ├── call-isolated-headers.feature │ │ │ ├── call-updates-config.feature │ │ │ ├── callonce-background-multiscenario.feature │ │ │ ├── common-multiple.feature │ │ │ ├── common-noheaders.feature │ │ │ ├── common.feature │ │ │ ├── content-type.feature │ │ │ ├── headers-alt.js │ │ │ ├── headers-background-configure.feature │ │ │ ├── headers-background.feature │ │ │ ├── headers-form-get.feature │ │ │ ├── headers-masking.feature │ │ │ ├── headers-override.feature │ │ │ ├── headers-single.feature │ │ │ ├── headers-uuid.feature │ │ │ ├── headers.feature │ │ │ └── null-header.feature │ │ ├── hooks/ │ │ │ ├── after-feature.feature │ │ │ ├── after-scenario.feature │ │ │ ├── called.feature │ │ │ └── hooks.feature │ │ ├── info/ │ │ │ └── info.feature │ │ ├── java/ │ │ │ ├── JavaApiTest.java │ │ │ ├── cats-java.feature │ │ │ └── from-java.feature │ │ ├── jwt/ │ │ │ └── jwt.feature │ │ ├── oauth/ │ │ │ ├── Signer.java │ │ │ ├── oauth1.feature │ │ │ └── oauth2.feature │ │ ├── outline/ │ │ │ ├── dynamic-csv.feature │ │ │ ├── dynamic-generator.feature │ │ │ ├── dynamic.feature │ │ │ ├── examples.feature │ │ │ ├── kittens.csv │ │ │ └── setup-outline.feature │ │ ├── params/ │ │ │ └── params.feature │ │ ├── polling/ │ │ │ ├── get.feature │ │ │ └── polling.feature │ │ ├── read/ │ │ │ ├── read-files.feature │ │ │ ├── sample.json │ │ │ └── sample.xml │ │ ├── redirect/ │ │ │ └── redirect.feature │ │ ├── request/ │ │ │ └── request.feature │ │ ├── schema/ │ │ │ ├── products-schema.json │ │ │ ├── products.json │ │ │ └── schema.feature │ │ ├── search/ │ │ │ ├── dynamic-params.feature │ │ │ ├── get-response-param.js │ │ │ ├── search-complex.feature │ │ │ └── search-simple.feature │ │ ├── signin/ │ │ │ └── sign-in.feature │ │ ├── soap/ │ │ │ ├── expected.xml │ │ │ ├── request.xml │ │ │ └── soap.feature │ │ ├── tags/ │ │ │ ├── TagsRunner.java │ │ │ ├── first.feature │ │ │ └── second.feature │ │ ├── unit/ │ │ │ ├── cat.feature │ │ │ ├── common.feature │ │ │ └── fizz-buzz.feature │ │ ├── upload/ │ │ │ ├── upload-image.feature │ │ │ ├── upload-multiple-fields.feature │ │ │ ├── upload-multiple-files.feature │ │ │ ├── upload-retry.feature │ │ │ └── upload.feature │ │ ├── websocket/ │ │ │ ├── WebSocketClientRunner.java │ │ │ ├── echo.feature │ │ │ └── websocket.feature │ │ └── xml/ │ │ └── preserve-whitespace.feature │ ├── driver/ │ │ ├── demo/ │ │ │ ├── Demo01JavaRunner.java │ │ │ ├── demo-01.feature │ │ │ ├── demo-02.feature │ │ │ ├── demo-03.feature │ │ │ ├── demo-04.feature │ │ │ ├── demo-05.feature │ │ │ └── demo-06.feature │ │ ├── mock/ │ │ │ ├── demo-01.feature │ │ │ ├── demo-02.feature │ │ │ ├── mock-01.feature │ │ │ ├── mock-02.feature │ │ │ └── response.json │ │ ├── screenshot/ │ │ │ ├── ChromeFullPageRunner.java │ │ │ ├── ChromePdfRunner.java │ │ │ ├── EdgeChromiumFullPageRunner.java │ │ │ └── EdgeChromiumPdfRunner.java │ │ └── windows/ │ │ └── calc.feature │ ├── headers.js │ ├── karate-config.js │ ├── log4j2.properties │ ├── logback-test.xml │ ├── mock/ │ │ ├── async/ │ │ │ ├── AsyncTest.java │ │ │ ├── QueueConsumer.java │ │ │ ├── QueueUtils.java │ │ │ ├── karate-config.js │ │ │ ├── main.feature │ │ │ └── mock.feature │ │ ├── contract/ │ │ │ ├── Consumer.java │ │ │ ├── ConsumerIntegrationTest.java │ │ │ ├── ConsumerUsingMockTest.java │ │ │ ├── ConsumerUsingProxyHttpTest.java │ │ │ ├── ConsumerUsingProxyRewriteSslTest.java │ │ │ ├── ConsumerUsingProxyRewriteTest.java │ │ │ ├── Payment.java │ │ │ ├── PaymentService.java │ │ │ ├── PaymentServiceContractSslTest.java │ │ │ ├── PaymentServiceContractTest.java │ │ │ ├── PaymentServiceContractUsingMockSslTest.java │ │ │ ├── PaymentServiceContractUsingMockTest.java │ │ │ ├── PaymentServiceMockMain.java │ │ │ ├── PaymentServiceMockSslMain.java │ │ │ ├── QueueConsumer.java │ │ │ ├── QueueUtils.java │ │ │ ├── QueueUtilsTest.java │ │ │ ├── Shipment.java │ │ │ ├── increment.js │ │ │ ├── karate-config.js │ │ │ ├── payment-service-mock.feature │ │ │ ├── payment-service-proxy.feature │ │ │ ├── payment-service.feature │ │ │ └── payments.html │ │ ├── micro/ │ │ │ ├── CatsMockRunner.java │ │ │ ├── cats-mock.feature │ │ │ └── cats.feature │ │ ├── proxy/ │ │ │ ├── DemoMockProceedRunner.java │ │ │ ├── DemoMockProxyRunner.java │ │ │ ├── DemoMockProxySslRunner.java │ │ │ ├── DemoMockRunner.java │ │ │ ├── DemoMockSslRunner.java │ │ │ ├── demo-mock-proceed.feature │ │ │ ├── demo-mock.feature │ │ │ └── karate-config.js │ │ └── web/ │ │ ├── CatsMockRunner.java │ │ ├── CatsMockStarter.java │ │ ├── CatsTestRunner.java │ │ ├── cats-mock.feature │ │ ├── cats-test.feature │ │ └── cats.html │ ├── mock-cert.pem │ ├── mock-contract.jmx │ ├── mock-key.pem │ ├── server-keystore-cert.pem │ ├── server-keystore-key.pem │ ├── server-keystore.p12 │ ├── server-keystore.pem │ ├── ssl/ │ │ ├── SslTest.java │ │ ├── TestService.java │ │ ├── ssl-keystore.feature │ │ └── ssl-truststore.feature │ └── test/ │ ├── MonitorThread.java │ ├── ServerStart.java │ ├── ServerStop.java │ └── Stoppable.java ├── karate-docker/ │ ├── karate-chrome/ │ │ ├── Dockerfile │ │ ├── entrypoint.sh │ │ └── supervisord.conf │ ├── karate-chromium/ │ │ ├── Dockerfile │ │ ├── entrypoint.sh │ │ └── supervisord.conf │ └── karate-firefox/ │ ├── Dockerfile │ ├── build.sh │ ├── entrypoint.sh │ ├── install.sh │ └── supervisord.conf ├── karate-e2e-tests/ │ ├── README.md │ ├── pom.xml │ └── src/ │ └── test/ │ └── java/ │ ├── axe/ │ │ ├── AxeRunner.java │ │ ├── axe-report.html │ │ └── axe.feature │ ├── driver/ │ │ ├── 00.feature │ │ ├── 00_outline.feature │ │ ├── 01.feature │ │ ├── 02.feature │ │ ├── 03.feature │ │ ├── 04.feature │ │ ├── 05.feature │ │ ├── 05_mock.feature │ │ ├── 06.feature │ │ ├── 07.feature │ │ ├── 08.feature │ │ ├── 09.feature │ │ ├── 10.feature │ │ ├── 11.feature │ │ ├── 12.feature │ │ ├── 13.feature │ │ ├── 14.feature │ │ ├── 15.feature │ │ ├── 16.feature │ │ ├── 17.feature │ │ ├── 18.feature │ │ ├── 19.feature │ │ ├── 99_bootstrap.feature │ │ ├── DockerRunner.java │ │ ├── JavaApiPlaywrightRunner.java │ │ ├── JavaApiRunner.java │ │ ├── LocalParallelRunner.java │ │ ├── LocalPlaywrightRunner.java │ │ ├── LocalSingleRunner.java │ │ ├── ServerStarter.java │ │ ├── html/ │ │ │ ├── 00.css │ │ │ ├── 00.html │ │ │ ├── 00.js │ │ │ ├── 01.html │ │ │ ├── 02.html │ │ │ ├── 03.html │ │ │ ├── 04.html │ │ │ ├── 05.html │ │ │ ├── 06.html │ │ │ ├── 07.html │ │ │ ├── 08.html │ │ │ ├── 08_upload.html │ │ │ ├── 09.html │ │ │ ├── 10.html │ │ │ ├── 11.html │ │ │ ├── 11_tab.html │ │ │ ├── 13.html │ │ │ ├── 14.html │ │ │ ├── 14_embedded.html │ │ │ ├── 14_processing.html │ │ │ ├── 15.html │ │ │ ├── 16.html │ │ │ ├── 17_a.html │ │ │ ├── 17_b.html │ │ │ ├── 18.html │ │ │ ├── 19.html │ │ │ ├── 99_bootstrap.html │ │ │ ├── api/ │ │ │ │ └── 05.js │ │ │ └── scratch.html │ │ ├── karate-config-docker.js │ │ ├── karate-config-playwright.js │ │ ├── karate-config-single.js │ │ ├── karate-config-xbrowser.js │ │ ├── karate-config.js │ │ └── scratch.feature │ ├── logback-test.xml │ └── regex/ │ ├── RegexRunner.java │ └── regex.feature ├── karate-gatling/ │ ├── README.md │ ├── dummy.txt │ ├── pom.xml │ └── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── com/ │ │ │ └── intuit/ │ │ │ └── karate/ │ │ │ └── gatling/ │ │ │ └── javaapi/ │ │ │ ├── KarateDsl.java │ │ │ ├── KarateFeatureBuilder.java │ │ │ ├── KarateProtocolBuilder.java │ │ │ └── KarateUriPattern.java │ │ └── scala/ │ │ └── com/ │ │ └── intuit/ │ │ └── karate/ │ │ └── gatling/ │ │ ├── KarateActions.scala │ │ ├── KarateProtocol.scala │ │ └── PreDef.scala │ └── test/ │ ├── java/ │ │ ├── com/ │ │ │ └── intuit/ │ │ │ └── karate/ │ │ │ └── gatling/ │ │ │ └── javaapi/ │ │ │ └── KarateProtocolBuilderTest.java │ │ └── mock/ │ │ ├── CatsChainedSimulation.java │ │ ├── CatsSimulation.java │ │ ├── MockUtils.java │ │ ├── cats-chained.feature │ │ ├── cats-create.feature │ │ ├── cats-delete-one.feature │ │ ├── cats-delete.feature │ │ ├── custom-rpc.feature │ │ └── mock.feature │ ├── resources/ │ │ ├── gatling-akka.conf │ │ ├── karate-config-perf.js │ │ ├── karate-config.js │ │ ├── logback-test.xml │ │ └── test.feature │ └── scala/ │ └── mock/ │ ├── CatsChainedScalaSimulation.scala │ ├── CatsScalaSimulation.scala │ └── CatsSimulationWithSilentWarmUp.scala ├── karate-junit5/ │ ├── pom.xml │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── com/ │ │ └── intuit/ │ │ └── karate/ │ │ └── junit5/ │ │ ├── FeatureNode.java │ │ └── Karate.java │ └── test/ │ └── java/ │ ├── karate/ │ │ ├── NoFeatureNoScenarioTest.java │ │ ├── SampleCustomTagsTest.java │ │ ├── SampleTest.java │ │ ├── SetupDryRunTest.java │ │ ├── customTags.feature │ │ ├── embed.feature │ │ ├── noFeatureNoScenario.feature │ │ ├── sample.feature │ │ ├── setup-with-dryrun.feature │ │ └── tags.feature │ ├── karate-config.js │ └── logback-test.xml ├── karate-netty/ │ └── README.md ├── karate-playwright/ │ ├── .gitignore │ ├── pom.xml │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── com/ │ │ └── intuit/ │ │ └── karate/ │ │ ├── driver/ │ │ │ └── playwright/ │ │ │ └── PlaywrightDriver.java │ │ └── playwright/ │ │ └── driver/ │ │ ├── InvocationHandlers.java │ │ ├── PlaywrightDriver.java │ │ ├── PlaywrightDriverOptions.java │ │ ├── PlaywrightElement.java │ │ ├── PlaywrightFinder.java │ │ ├── PlaywrightMouse.java │ │ ├── PlaywrightToken.java │ │ └── util/ │ │ └── KarateTokenParser.java │ └── test/ │ ├── java/ │ │ └── com/ │ │ └── intuit/ │ │ └── karate/ │ │ └── playwright/ │ │ └── driver/ │ │ ├── PlaywrightDriverTest.java │ │ └── PlaywrightElementTest.java │ └── resources/ │ └── html/ │ └── 02.html ├── karate-robot/ │ ├── README.md │ ├── pom.xml │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── com/ │ │ └── intuit/ │ │ └── karate/ │ │ └── robot/ │ │ ├── Element.java │ │ ├── ImageElement.java │ │ ├── Location.java │ │ ├── MissingElement.java │ │ ├── OpenCvUtils.java │ │ ├── Region.java │ │ ├── Robot.java │ │ ├── RobotBase.java │ │ ├── RobotFactory.java │ │ ├── RobotUtils.java │ │ ├── StringMatcher.java │ │ ├── Tesseract.java │ │ ├── Window.java │ │ ├── linux/ │ │ │ └── LinuxRobot.java │ │ ├── mac/ │ │ │ └── MacRobot.java │ │ └── win/ │ │ ├── ComAllocated.java │ │ ├── ComAllocatedStr.java │ │ ├── ComAllocatedVarInt.java │ │ ├── ComAllocatedVarStr.java │ │ ├── ComFunction.java │ │ ├── ComInterface.java │ │ ├── ComLibrary.java │ │ ├── ComRef.java │ │ ├── ComUtils.java │ │ ├── ControlType.java │ │ ├── IUIAutomation.java │ │ ├── IUIAutomationBase.java │ │ ├── IUIAutomationCondition.java │ │ ├── IUIAutomationElement.java │ │ ├── IUIAutomationElementArray.java │ │ ├── IUIAutomationInvokePattern.java │ │ ├── IUIAutomationScrollPattern.java │ │ ├── IUIAutomationSelectionItemPattern.java │ │ ├── IUIAutomationTreeWalker.java │ │ ├── IUIAutomationValuePattern.java │ │ ├── IUIAutomationWindowPattern.java │ │ ├── PathSearch.java │ │ ├── Pattern.java │ │ ├── Property.java │ │ ├── ScrollAmount.java │ │ ├── TreeScope.java │ │ ├── WinElement.java │ │ ├── WinRobot.java │ │ └── WinWindow.java │ └── test/ │ └── java/ │ ├── com/ │ │ └── intuit/ │ │ └── karate/ │ │ └── robot/ │ │ ├── OpenCvUtilsTest.java │ │ ├── TesseractRunner.java │ │ └── win/ │ │ ├── IUIAutomationRunner.java │ │ ├── PathSearchTest.java │ │ └── WinRobotRunner.java │ ├── logback-test.xml │ └── robot/ │ └── core/ │ ├── ChromeJavaRunner.java │ ├── CoreRunner.java │ ├── calc.feature │ ├── called.feature │ ├── caller.feature │ ├── chrome.feature │ ├── dummy.feature │ ├── iphone.feature │ ├── upload.feature │ └── wordpad.feature └── pom.xml
Showing preview only (439K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5924 symbols across 567 files)
FILE: examples/consumer-driven-contracts/payment-consumer/src/main/java/payment/consumer/Consumer.java
class Consumer (line 16) | public class Consumer {
method Consumer (line 23) | public Consumer(String paymentServiceUrl) {
method getConnection (line 27) | private HttpURLConnection getConnection(String path) throws Exception {
method create (line 32) | public Payment create(Payment payment) {
FILE: examples/consumer-driven-contracts/payment-consumer/src/test/java/payment/consumer/ConsumerIntegrationAgainstMockTest.java
class ConsumerIntegrationAgainstMockTest (line 15) | class ConsumerIntegrationAgainstMockTest {
method beforeAll (line 20) | @BeforeAll
method testPaymentCreate (line 28) | @Test
method afterAll (line 39) | @AfterAll
FILE: examples/consumer-driven-contracts/payment-consumer/src/test/java/payment/consumer/ConsumerIntegrationTest.java
class ConsumerIntegrationTest (line 15) | class ConsumerIntegrationTest {
method beforeAll (line 20) | @BeforeAll
method testPaymentCreate (line 27) | @Test
method afterAll (line 38) | @AfterAll
FILE: examples/consumer-driven-contracts/payment-producer/src/main/java/payment/producer/Payment.java
class Payment (line 7) | public class Payment {
method getId (line 13) | public int getId() {
method setId (line 17) | public void setId(int id) {
method getAmount (line 21) | public double getAmount() {
method setAmount (line 25) | public void setAmount(double amount) {
method getDescription (line 29) | public String getDescription() {
method setDescription (line 33) | public void setDescription(String description) {
FILE: examples/consumer-driven-contracts/payment-producer/src/main/java/payment/producer/PaymentService.java
class PaymentService (line 27) | @Configuration
class PaymentController (line 31) | @RestController
method create (line 38) | @PostMapping
method update (line 46) | @PutMapping("/{id:.+}")
method list (line 52) | @GetMapping
method get (line 57) | @GetMapping("/{id:.+}")
method delete (line 66) | @DeleteMapping("/{id:.+}")
method start (line 76) | public static ConfigurableApplicationContext start(int port) {
method stop (line 80) | public static void stop(ConfigurableApplicationContext context) {
method getPort (line 84) | public static int getPort(ConfigurableApplicationContext context) {
method getInitializingBean (line 89) | @Bean
method main (line 94) | public static void main(String[] args) {
FILE: examples/consumer-driven-contracts/payment-producer/src/main/java/payment/producer/ServerStartedInitializingBean.java
class ServerStartedInitializingBean (line 16) | @Component
method getLocalPort (line 23) | public int getLocalPort() {
method run (line 27) | @Override
method onApplicationEvent (line 32) | @Override
FILE: examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/contract/PaymentContractTest.java
class PaymentContractTest (line 16) | class PaymentContractTest {
method beforeAll (line 20) | @BeforeAll
method testReal (line 25) | @Test
method afterAll (line 34) | @AfterAll
FILE: examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/mock/PaymentContractAgainstMockTest.java
class PaymentContractAgainstMockTest (line 15) | class PaymentContractAgainstMockTest {
method beforeAll (line 19) | @BeforeAll
method testMock (line 24) | @Test
method afterAll (line 33) | @AfterAll
FILE: examples/gatling/src/test/java/mock/MockUtils.java
class MockUtils (line 16) | public class MockUtils {
method startServer (line 18) | public static void startServer() {
method getNextCatName (line 27) | public static String getNextCatName() {
method myRpc (line 31) | public static Map<String, Object> myRpc(Map<String, Object> map, PerfC...
FILE: examples/image-comparison/src/test/java/karate-config.js
function fn (line 1) | function fn() {
FILE: examples/image-comparison/src/test/java/ui/ImageComparisonRunner.java
class ImageComparisonRunner (line 7) | class ImageComparisonRunner {
method beforeAll (line 9) | @BeforeAll
method testUi (line 15) | @Karate.Test
FILE: examples/image-comparison/src/test/java/ui/MockRunner.java
class MockRunner (line 11) | class MockRunner {
method testStart (line 13) | @Test
method start (line 18) | public static HttpServer start(int port) {
FILE: examples/mobile-test/src/test/java/android/AndroidTest.java
class AndroidTest (line 8) | class AndroidTest {
method test (line 10) | @Karate.Test
FILE: examples/mobile-test/src/test/java/karate-config.js
function fn (line 1) | function fn() {
FILE: examples/profiling-test/src/test/java/karate-config.js
function fn (line 1) | function fn() {
FILE: examples/profiling-test/src/test/java/perf/Main.java
class Main (line 14) | public class Main {
method main (line 16) | public static void main(String[] args) {
FILE: examples/profiling-test/src/test/java/perf/TestUtils.java
class TestUtils (line 9) | public class TestUtils {
method startServer (line 11) | public static void startServer() {
FILE: examples/robot-test/src/test/java/karate-config.js
function fn (line 1) | function fn() {
FILE: examples/robot-test/src/test/java/mac/ChromeRunner.java
class ChromeRunner (line 9) | class ChromeRunner {
method testChrome (line 11) | @Karate.Test
FILE: examples/robot-test/src/test/java/win/CalcRunner.java
class CalcRunner (line 9) | class CalcRunner {
method testCalc (line 11) | @Karate.Test
FILE: examples/ui-test/src/test/java/ui/MockRunner.java
class MockRunner (line 12) | class MockRunner {
method testStart (line 14) | @Test
method start (line 19) | public static HttpServer start(int port) {
FILE: examples/ui-test/src/test/java/ui/UiRunner.java
class UiRunner (line 7) | class UiRunner {
method beforeAll (line 9) | @BeforeAll
method testUi (line 15) | @Karate.Test
FILE: karate-archetype/src/main/resources/archetype-resources/src/test/java/examples/ExamplesTest.java
class ExamplesTest (line 8) | class ExamplesTest {
method testParallel (line 10) | @Test
FILE: karate-archetype/src/main/resources/archetype-resources/src/test/java/examples/users/UsersRunner.java
class UsersRunner (line 5) | class UsersRunner {
method testUsers (line 7) | @Karate.Test
FILE: karate-archetype/src/main/resources/archetype-resources/src/test/java/karate-config.js
function fn (line 1) | function fn() {
FILE: karate-core/src/main/java/com/intuit/karate/Actions.java
type Actions (line 32) | public interface Actions {
method isFailed (line 34) | boolean isFailed();
method getFailedReason (line 36) | Throwable getFailedReason();
method isAborted (line 38) | boolean isAborted();
method assertTrue (line 40) | void assertTrue(String exp);
method call (line 42) | void call(String line);
method callonce (line 44) | void callonce(String line);
method csv (line 46) | void csv(String name, String exp);
method csvDocString (line 48) | void csvDocString(String name, String exp);
method json (line 50) | void json(String name, String exp);
method string (line 52) | void string(String name, String exp);
method xml (line 54) | void xml(String name, String exp);
method xmlstring (line 56) | void xmlstring(String name, String exp);
method bytes (line 58) | void bytes(String name, String exp);
method configure (line 60) | void configure(String key, String exp);
method configureDocString (line 62) | void configureDocString(String key, String exp);
method cookie (line 64) | void cookie(String name, String value);
method cookies (line 66) | void cookies(String exp);
method copy (line 68) | void copy(String name, String exp);
method def (line 70) | void def(String name, String exp);
method defDocString (line 72) | void defDocString(String name, String exp);
method eval (line 74) | void eval(String exp);
method evalAssignDocString (line 76) | void evalAssignDocString(String lhs, String rhs);
method evalDocString (line 78) | void evalDocString(String exp);
method eval (line 80) | void eval(String name, String dotOrParen, String exp);
method evalIf (line 82) | void evalIf(String exp);
method evalDelete (line 84) | void evalDelete(String exp);
method formField (line 86) | void formField(String name, String exp);
method formFields (line 88) | void formFields(String exp);
method header (line 90) | void header(String name, String exp);
method headers (line 92) | void headers(String exp);
method listen (line 94) | void listen(String exp);
method match (line 96) | void match(String exp, String op1, String op2, String rhs);
method method (line 98) | void method(String method);
method retry (line 100) | void retry(String until);
method multipartEntity (line 102) | void multipartEntity(String value);
method multipartFiles (line 104) | void multipartFiles(String exp);
method multipartField (line 106) | void multipartField(String name, String value);
method multipartFields (line 108) | void multipartFields(String exp);
method multipartFile (line 110) | void multipartFile(String name, String value);
method param (line 112) | void param(String name, String exp);
method params (line 114) | void params(String exp);
method path (line 116) | void path(String exp);
method print (line 118) | void print(String exp);
method remove (line 120) | void remove(String name, String path);
method replace (line 122) | void replace(String name, List<Map<String, String>> table);
method replace (line 124) | void replace(String name, String token, String value);
method request (line 126) | void request(String body);
method requestDocString (line 128) | void requestDocString(String body);
method set (line 130) | void set(String name, String path, String value);
method setDocString (line 132) | void setDocString(String name, String path, String value);
method set (line 134) | void set(String name, String path, List<Map<String, String>> table);
method soapAction (line 136) | void soapAction(String action);
method status (line 138) | void status(int status);
method table (line 140) | void table(String name, List<Map<String, String>> table);
method text (line 142) | void text(String name, String exp);
method url (line 144) | void url(String exp);
method yaml (line 146) | void yaml(String name, String exp);
method yamlDocString (line 148) | void yamlDocString(String name, String exp);
method doc (line 150) | void doc(String exp);
method compareImage (line 152) | void compareImage(String exp);
method driver (line 156) | void driver(String exp);
method robot (line 158) | void robot(String exp);
FILE: karate-core/src/main/java/com/intuit/karate/Constants.java
class Constants (line 30) | public class Constants {
method Constants (line 32) | private Constants() {
FILE: karate-core/src/main/java/com/intuit/karate/FileUtils.java
class FileUtils (line 48) | public class FileUtils {
method FileUtils (line 52) | private FileUtils() {
method parsePathAndTags (line 94) | public static StringUtils.Pair parsePathAndTags(String text) {
method parseFeatureAndCallTag (line 106) | public static FeatureCall parseFeatureAndCallTag(String path) {
method toString (line 112) | public static String toString(File file) {
method toString (line 120) | public static String toString(InputStream is) {
method toBytes (line 128) | public static byte[] toBytes(File file) {
method toBytes (line 136) | public static byte[] toBytes(InputStream is) {
method toByteStream (line 140) | private static ByteArrayOutputStream toByteStream(InputStream is) {
method toString (line 154) | public static String toString(byte[] bytes) {
method toBytes (line 161) | public static byte[] toBytes(String string) {
method copy (line 168) | public static void copy(File src, File dest) {
method writeToFile (line 176) | public static void writeToFile(File file, byte[] data) {
method writeToFile (line 191) | public static void writeToFile(File file, String data) {
method toInputStream (line 195) | public static InputStream toInputStream(String text) {
method deleteDirectory (line 199) | public static void deleteDirectory(File file) {
method renameFileIfZeroBytes (line 211) | public static void renameFileIfZeroBytes(String fileName) {
method getBuildDir (line 227) | public static String getBuildDir() {
type OsType (line 236) | public static enum OsType {
method isOsWindows (line 243) | public static boolean isOsWindows() {
method isOsMacOsX (line 247) | public static boolean isOsMacOsX() {
method getOsName (line 251) | public static String getOsName() {
method getOsType (line 255) | public static OsType getOsType() {
method getOsType (line 259) | public static OsType getOsType(String name) {
FILE: karate-core/src/main/java/com/intuit/karate/Http.java
class Http (line 37) | public class Http {
method to (line 43) | public static Http to(String url) {
method setAppender (line 47) | public void setAppender(LogAppender appender) {
method Http (line 51) | private Http(String urlBase) {
method url (line 58) | public Http url(String url) {
method param (line 63) | public Http param(String key, String ... values) {
method path (line 68) | public Http path(String... paths) {
method header (line 73) | public Http header(String name, String value) {
method hook (line 78) | public Http hook(RuntimeHook hook) {
method method (line 83) | public Response method(String method, Object body) {
method method (line 96) | public Response method(String method) {
method methodJson (line 100) | public Response methodJson(String method, String body) {
method get (line 104) | public Response get() {
method postJson (line 108) | public Response postJson(String body) {
method post (line 112) | public Response post(Object body) {
method put (line 116) | public Response put(Object body) {
method putJson (line 120) | public Response putJson(String body) {
method delete (line 124) | public Response delete() {
method configure (line 128) | public Http configure(String key, Object value) {
method configure (line 133) | public Http configure(Map<String, Object> map) {
FILE: karate-core/src/main/java/com/intuit/karate/ImageComparison.java
class ImageComparison (line 46) | public class ImageComparison {
method ImageComparison (line 68) | private ImageComparison(byte[] baselineImg, byte[] latestImg, Map<Stri...
method getDataUrl (line 112) | private static String getDataUrl(byte[] img) {
method configure (line 131) | private void configure(Map<String, Object> defaultOptions) {
method compare (line 156) | public static Map<String, Object> compare(byte[] baselineImg, byte[] l...
method checkMismatch (line 201) | private Map<String, Object> checkMismatch(double mismatchPercentage) {
method execResemble (line 216) | private double execResemble() {
method execSSIM (line 222) | private double execSSIM() {
method resembleOptions (line 234) | private io.github.t12y.resemble.Options resembleOptions() {
method ssimOptions (line 282) | private io.github.t12y.ssim.models.Options ssimOptions() {
method getBool (line 300) | private boolean getBool(String name, boolean defaultValue) {
method toBool (line 307) | private static boolean toBool(Object obj) {
method getDouble (line 314) | private double getDouble(String name, double defaultValue) {
method toDouble (line 318) | private static double toDouble(Object obj, double defaultValue) {
method getInt (line 325) | private int getInt(String name, int defaultValue) {
method getString (line 333) | private String getString(String name, String defaultValue) {
method asString (line 340) | private static String asString(Object obj) {
method getIgnoredBoxes (line 347) | private int[][] getIgnoredBoxes() {
method getIntArray (line 364) | private static int[] getIntArray(Object obj, String[] keys) {
method unpackPixels (line 384) | private static double[] unpackPixels(int[] packed) {
class MismatchException (line 403) | public static class MismatchException extends RuntimeException {
method MismatchException (line 407) | public MismatchException(String msg, Map<String, Object> data) {
FILE: karate-core/src/main/java/com/intuit/karate/Json.java
class Json (line 41) | public class Json {
method prefix (line 49) | private String prefix(String path) {
method object (line 53) | public static Json object() {
method array (line 57) | public static Json array() {
method of (line 61) | public static Json of(Object any) {
method parse (line 74) | public static <T> T parse(String json) {
method Json (line 78) | private Json(DocumentContext doc) {
method getJson (line 84) | public Json getJson(String path) {
method getAll (line 88) | public <T> List<T> getAll(String prefix, List<String> paths) {
method getAll (line 96) | public <T> List<T> getAll(List<String> paths) {
method get (line 100) | public <T> T get(String path) {
method get (line 104) | public <T> T get(String path, T defaultValue) {
method getOptional (line 108) | public <T> Optional<T> getOptional(String path) {
method getFirst (line 116) | public <T> T getFirst(String path) {
method getAs (line 124) | public <T> T getAs(String path, Class<T> clazz) {
method toString (line 128) | @Override
method toStringPretty (line 133) | public String toStringPretty() {
method isArray (line 137) | public boolean isArray() {
method value (line 141) | public <T> T value() {
method asList (line 145) | public List asList() {
method asMap (line 149) | public Map<String, Object> asMap() {
method set (line 153) | public Json set(String path, Object value) {
method set (line 158) | public Json set(String path, String value) {
method setAsString (line 170) | public Json setAsString(String path, String value) {
method remove (line 175) | public Json remove(String path) {
method isArrayPath (line 180) | private boolean isArrayPath(String s) {
method arrayKey (line 184) | private String arrayKey(String s) {
method arrayIndex (line 189) | private int arrayIndex(String s) {
method setInternal (line 209) | private void setInternal(String path, Object o) {
method pathExists (line 231) | public boolean pathExists(String path) {
method createPath (line 243) | private void createPath(String path, boolean array) {
method toParentAndLeaf (line 280) | public static StringUtils.Pair toParentAndLeaf(String path) {
FILE: karate-core/src/main/java/com/intuit/karate/JsonUtils.java
class JsonUtils (line 63) | public class JsonUtils {
method JsonUtils (line 69) | private JsonUtils() {
method jsonProvider (line 79) | @Override
method mappingProvider (line 84) | @Override
method options (line 89) | @Override
method isJson (line 96) | public static boolean isJson(String s) {
method toStrictJson (line 109) | public static String toStrictJson(String raw) {
method toJson (line 119) | public static String toJson(Object o) {
method toJson (line 123) | public static String toJson(Object o, boolean pretty) {
method toJsonBytes (line 134) | public static byte[] toJsonBytes(Object o) {
method fromJson (line 138) | public static Object fromJson(String json) {
method fromJsonStrict (line 142) | public static Object fromJsonStrict(String json) {
method fromJson (line 151) | public static Object fromJson(String s, String className) {
method fromJson (line 160) | public static <T> T fromJson(String s, Class<T> clazz) {
method fromYaml (line 164) | public static Object fromYaml(String raw) {
method fromCsv (line 169) | public static List<Map> fromCsv(String raw) {
method toCsv (line 197) | public static String toCsv(List<Map<String, Object>> list) {
method shallowCopy (line 214) | public static Object shallowCopy(Object o) {
method deepCopy (line 224) | public static Object deepCopy(Object o) {
method recurseDeepCopy (line 230) | private static Object recurseDeepCopy(Object o, Set<Object> seen) {
method toJsonSafe (line 259) | public static String toJsonSafe(Object o, boolean pretty) {
method pad (line 270) | private static void pad(StringBuilder sb, int depth) {
method ref (line 276) | private static void ref(StringBuilder sb, Object o) {
method escapeValue (line 280) | public static String escapeValue(String raw) {
method recurseJsonString (line 284) | private static void recurseJsonString(Object o, boolean pretty, String...
method removeKeysWithNullValues (line 359) | public static void removeKeysWithNullValues(Object o) {
method simplify (line 380) | public static Map<String, String> simplify(Map<String, List<String>> m...
method toString (line 403) | public static String toString(Object o) {
method toString (line 407) | public static String toString(Object o, boolean pretty) {
method toBytes (line 422) | public static byte[] toBytes(Object o) {
method fromBytes (line 437) | public static Object fromBytes(byte[] bytes, boolean strict, ResourceT...
method fromString (line 445) | public static Object fromString(String raw, boolean strict, ResourceTy...
method fromStringSafe (line 484) | public static Object fromStringSafe(String raw) {
FILE: karate-core/src/main/java/com/intuit/karate/KarateException.java
class KarateException (line 30) | public class KarateException extends RuntimeException {
method KarateException (line 32) | public KarateException(String message) {
method KarateException (line 36) | public KarateException(String message, Throwable cause) {
FILE: karate-core/src/main/java/com/intuit/karate/LogAppender.java
type LogAppender (line 30) | public interface LogAppender {
method getBuffer (line 32) | String getBuffer();
method collect (line 34) | String collect();
method append (line 36) | void append(String text);
method close (line 38) | void close();
method getBuffer (line 41) | @Override
method collect (line 46) | @Override
method append (line 51) | @Override
method close (line 56) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/Logger.java
class Logger (line 38) | public class Logger {
method setAppender (line 53) | public void setAppender(LogAppender appender) {
method getAppender (line 57) | public LogAppender getAppender() {
method isTraceEnabled (line 61) | public boolean isTraceEnabled() {
method setAppendOnly (line 65) | public void setAppendOnly(boolean appendOnly) {
method isAppendOnly (line 69) | public boolean isAppendOnly() {
method setLogOnly (line 73) | public void setLogOnly(boolean logOnly) {
method isLogOnly (line 77) | public boolean isLogOnly() {
method Logger (line 81) | public Logger(Class clazz) {
method Logger (line 85) | public Logger(String name) {
method Logger (line 89) | public Logger() {
method trace (line 93) | public void trace(String format, Object... arguments) {
method debug (line 104) | public void debug(String format, Object... arguments) {
method info (line 115) | public void info(String format, Object... arguments) {
method warn (line 126) | public void warn(String format, Object... arguments) {
method error (line 137) | public void error(String format, Object... arguments) {
method getFormattedDate (line 148) | private String getFormattedDate() {
method formatAndAppend (line 155) | private void formatAndAppend(String format, Object... arguments) {
method append (line 163) | private void append(String message) {
FILE: karate-core/src/main/java/com/intuit/karate/Main.java
class Main (line 53) | public class Main implements Callable<Void> {
method addPath (line 140) | public void addPath(String path) {
method setPaths (line 147) | public void setPaths(List<String> paths) {
method getPaths (line 151) | public List<String> getPaths() {
method getTags (line 155) | public List<String> getTags() {
method getThreads (line 159) | public int getThreads() {
method getDebugPort (line 163) | public int getDebugPort() {
method getName (line 167) | public String getName() {
method setName (line 171) | public void setName(String name) {
method isOutputHtmlReport (line 175) | public boolean isOutputHtmlReport() {
method isOutputCucumberJson (line 179) | public boolean isOutputCucumberJson() {
method isOutputJunitXml (line 183) | public boolean isOutputJunitXml() {
method getEnv (line 187) | public String getEnv() {
method setEnv (line 191) | public void setEnv(String env) {
method getConfigDir (line 195) | public String getConfigDir() {
method setConfigDir (line 199) | public void setConfigDir(String configDir) {
method getReportDir (line 203) | public String getReportDir() {
method parseKarateOptions (line 207) | public static Main parseKarateOptions(String line) {
method parseKarateArgs (line 212) | public static Main parseKarateArgs(List<String> args) {
method createHooks (line 216) | public Collection<RuntimeHook> createHooks() {
method createHook (line 223) | private RuntimeHook createHook(String hookClassName) {
method main (line 240) | public static void main(String[] args) {
method resetLoggerConfig (line 290) | private static void resetLoggerConfig() {
method startDebugServer (line 304) | public static Results startDebugServer(String[] args) {
method call (line 323) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/Match.java
class Match (line 48) | public class Match {
type MatchOperatorFactory (line 54) | interface MatchOperatorFactory {
method create (line 55) | MatchOperator create(boolean matchEachEmptyAllowed);
method not (line 57) | static MatchOperatorFactory not(CoreOperatorFactory delegateFactory,...
method deep (line 61) | static MatchOperatorFactory deep(CoreOperatorFactory delegateFactory) {
method each (line 65) | static MatchOperatorFactory each(MatchOperatorFactory delegateFactor...
type CoreOperatorFactory (line 70) | interface CoreOperatorFactory extends MatchOperatorFactory {
method create (line 71) | @Override
type Type (line 75) | public static enum Type {
method Type (line 98) | Type(MatchOperatorFactory operatorFactory, int shortcutLength) {
method operator (line 103) | MatchOperator operator(boolean matchEachEmptyAllowed) {
method fail (line 110) | static Result fail(String message) {
type Validator (line 114) | interface Validator extends Function<Value, Result> {
class RegexValidator (line 118) | static class RegexValidator implements Validator {
method RegexValidator (line 122) | public RegexValidator(String regex) {
method apply (line 127) | @Override
class Result (line 165) | public static class Result {
method Result (line 170) | private Result(boolean pass, String message) {
method toString (line 175) | @Override
method toMap (line 180) | public Map<String, Object> toMap() {
class Context (line 189) | static class Context {
method Context (line 199) | Context(JsEngine js, MatchOperation root, boolean xml, int depth, St...
method descend (line 209) | Context descend(String name) {
method descend (line 220) | Context descend(int index) {
type ValueType (line 230) | static enum ValueType {
class Value (line 242) | public static class Value {
method Value (line 249) | Value(Object value) {
method Value (line 253) | Value(Object value, boolean exceptionOnMatchFailure) {
method isBoolean (line 287) | public boolean isBoolean() {
method isNumber (line 291) | public boolean isNumber() {
method isString (line 295) | public boolean isString() {
method isNull (line 299) | public boolean isNull() {
method isMap (line 303) | public boolean isMap() {
method isList (line 307) | public boolean isList() {
method isXml (line 311) | public boolean isXml() {
method isNotPresent (line 315) | boolean isNotPresent() {
method isArrayObjectOrReference (line 319) | boolean isArrayObjectOrReference() {
method isMapOrListOrXml (line 331) | boolean isMapOrListOrXml() {
method getValue (line 342) | public <T> T getValue() {
method getWithinSingleQuotesIfString (line 346) | String getWithinSingleQuotesIfString() {
method getAsString (line 354) | public String getAsString() {
method getAsXmlString (line 366) | String getAsXmlString() {
method getSortedLike (line 375) | Value getSortedLike(Value other) {
method toString (line 396) | @Override
method is (line 403) | public Result is(Type matchType, Object expected) {
method isEqualTo (line 418) | public Result isEqualTo(Object expected) {
method contains (line 422) | public Result contains(Object expected) {
method containsDeep (line 426) | public Result containsDeep(Object expected) {
method containsOnly (line 430) | public Result containsOnly(Object expected) {
method containsOnlyDeep (line 434) | public Result containsOnlyDeep(Object expected) {
method containsAny (line 438) | public Result containsAny(Object expected) {
method isNotEqualTo (line 442) | public Result isNotEqualTo(Object expected) {
method isNotContaining (line 446) | public Result isNotContaining(Object expected) {
method isEachEqualTo (line 450) | public Result isEachEqualTo(Object expected) {
method isEachNotEqualTo (line 454) | public Result isEachNotEqualTo(Object expected) {
method isEachContaining (line 458) | public Result isEachContaining(Object expected) {
method isEachNotContaining (line 462) | public Result isEachNotContaining(Object expected) {
method isEachContainingDeep (line 466) | public Result isEachContainingDeep(Object expected) {
method isEachContainingOnly (line 470) | public Result isEachContainingOnly(Object expected) {
method isEachContainingAny (line 474) | public Result isEachContainingAny(Object expected) {
method execute (line 480) | public static Result execute(JsEngine js, Type matchType, Object actua...
method parseIfJsonOrXmlString (line 490) | public static Object parseIfJsonOrXmlString(Object o) {
method evaluate (line 507) | public static Value evaluate(Object actual) {
method that (line 511) | public static Value that(Object actual) {
FILE: karate-core/src/main/java/com/intuit/karate/MatchOperation.java
class MatchOperation (line 46) | public class MatchOperation {
method MatchOperation (line 59) | MatchOperation(MatchOperator type, Match.Value actual, Match.Value exp...
method MatchOperation (line 63) | MatchOperation(JsEngine js, MatchOperator type, Match.Value actual, Ma...
method MatchOperation (line 67) | MatchOperation(Match.Context context, MatchOperator type, Match.Value ...
method MatchOperation (line 71) | private MatchOperation(JsEngine js, Match.Context context, MatchOperat...
method execute (line 91) | boolean execute() {
method pass (line 95) | boolean pass() {
method fail (line 100) | boolean fail(String reason) {
method getFailureReasons (line 110) | String getFailureReasons() {
method isXmlAttributeOrMap (line 114) | private boolean isXmlAttributeOrMap() {
method collectFailureReasons (line 119) | private static String collectFailureReasons(MatchOperation root) {
FILE: karate-core/src/main/java/com/intuit/karate/MatchOperator.java
type MatchOperator (line 12) | public interface MatchOperator {
method execute (line 14) | public boolean execute(MatchOperation operation);
class EachOperator (line 16) | class EachOperator implements MatchOperator {
method EachOperator (line 20) | EachOperator(MatchOperator delegate, boolean matchEachEmptyAllowed) {
method toString (line 25) | public String toString() {
method execute (line 29) | public boolean execute(MatchOperation operation) {
class NotOperator (line 57) | class NotOperator implements MatchOperator {
method NotOperator (line 61) | NotOperator(CoreOperator delegate, String failureMessage) {
method toString (line 66) | public String toString() {
method execute (line 70) | public boolean execute(MatchOperation operation) {
class CoreOperator (line 85) | class CoreOperator implements MatchOperator {
method CoreOperator (line 97) | private CoreOperator(boolean isEquals, boolean isContains, boolean i...
method CoreOperator (line 101) | private CoreOperator(boolean isEquals, boolean isContains, boolean i...
method execute (line 111) | public boolean execute(MatchOperation operation) {
method macroEqualsExpected (line 159) | private boolean macroEqualsExpected(MatchOperation operation, String...
method containsPlaceholderUnderscore (line 299) | private boolean containsPlaceholderUnderscore(String bracketContents) {
method macroToMatchType (line 308) | private static Match.Type macroToMatchType(boolean each, String macr...
method matchTypeToStartPos (line 326) | private static int matchTypeToStartPos(Match.Type mt) {
method toBigDecimal (line 330) | private static BigDecimal toBigDecimal(Object o) {
method actualEqualsExpected (line 340) | private boolean actualEqualsExpected(MatchOperation operation) {
method matchMapValues (line 400) | private boolean matchMapValues(Map<String, Object> actMap, Map<Strin...
method actualContainsExpected (line 470) | private boolean actualContainsExpected(MatchOperation operation) {
method deep (line 543) | CoreOperator deep() {
method equalsOperator (line 547) | static CoreOperator equalsOperator(boolean matchEachEmptyAllowed) {
method containsOperator (line 551) | static CoreOperator containsOperator(boolean matchEachEmptyAllowed) {
method containsAnyOperator (line 555) | static CoreOperator containsAnyOperator(boolean matchEachEmptyAllowe...
method containsOnlyOperator (line 559) | static CoreOperator containsOnlyOperator(boolean matchEachEmptyAllow...
method isEquals (line 563) | boolean isEquals() {
method isContains (line 567) | boolean isContains() {
method isContainsAny (line 571) | boolean isContainsAny() {
method isContainsOnly (line 575) | boolean isContainsOnly() {
method isContainsFamily (line 579) | boolean isContainsFamily() {
method isMatchEachEmptyAllowed (line 583) | boolean isMatchEachEmptyAllowed() {
method childOperator (line 587) | MatchOperator childOperator(Match.Value value) {
method macroOperator (line 626) | protected MatchOperator macroOperator(MatchOperator specifiedOperato...
method toString (line 637) | public String toString() {
FILE: karate-core/src/main/java/com/intuit/karate/MatchStep.java
class MatchStep (line 30) | public class MatchStep {
method MatchStep (line 37) | public MatchStep(String raw) {
method min (line 123) | private static int min(int a, int b) {
method getType (line 133) | private static Match.Type getType(boolean each, boolean not, boolean c...
FILE: karate-core/src/main/java/com/intuit/karate/PerfContext.java
type PerfContext (line 30) | public interface PerfContext {
method capturePerfEvent (line 32) | void capturePerfEvent(String name, long startTime, long endTime);
FILE: karate-core/src/main/java/com/intuit/karate/PerfHook.java
type PerfHook (line 35) | public interface PerfHook {
method getPerfEventName (line 37) | String getPerfEventName(HttpRequest request, ScenarioRuntime sr);
method reportPerfEvent (line 39) | void reportPerfEvent(PerfEvent event);
method submit (line 41) | void submit(Runnable runnable);
method afterFeature (line 43) | void afterFeature(FeatureResult fr);
method pause (line 45) | void pause(Number millis);
FILE: karate-core/src/main/java/com/intuit/karate/Results.java
class Results (line 43) | public class Results {
method of (line 56) | public static Results of(Suite suite) {
method Results (line 60) | private Results(Suite suite) {
method getFeatureResults (line 109) | public Stream<FeatureResult> getFeatureResults() {
method getScenarioResults (line 113) | public Stream<ScenarioResult> getScenarioResults() {
method saveStatsJson (line 117) | private void saveStatsJson() {
method printStats (line 123) | private void printStats() {
method toKarateJson (line 140) | public Map<String, Object> toKarateJson() {
method getReportDir (line 158) | public String getReportDir() {
method getErrors (line 162) | public List<String> getErrors() {
method getElapsedTime (line 166) | public double getElapsedTime() {
method getEfficiency (line 170) | public double getEfficiency() {
method getScenariosPassed (line 174) | public int getScenariosPassed() {
method getScenariosFailed (line 178) | public int getScenariosFailed() {
method getScenariosTotal (line 182) | public int getScenariosTotal() {
method getFeaturesTotal (line 186) | public int getFeaturesTotal() {
method getFeaturesPassed (line 190) | public int getFeaturesPassed() {
method getFeaturesFailed (line 194) | public int getFeaturesFailed() {
method getFailCount (line 198) | public int getFailCount() {
method getTimeTakenMillis (line 202) | public double getTimeTakenMillis() {
method getStartTime (line 206) | public long getStartTime() {
method getEndTime (line 210) | public long getEndTime() {
method getErrorMessages (line 214) | public String getErrorMessages() {
method getSuite (line 218) | public Suite getSuite() {
FILE: karate-core/src/main/java/com/intuit/karate/Runner.java
class Runner (line 47) | public class Runner {
method runFeature (line 51) | public static Map<String, Object> runFeature(FeatureCall feature, Map<...
method runFeature (line 63) | public static Map<String, Object> runFeature(File file, Map<String, Ob...
method runFeature (line 68) | public static Map<String, Object> runFeature(Class relativeTo, String ...
method runFeature (line 73) | public static Map<String, Object> runFeature(String path, Map<String, ...
method callAsync (line 79) | public static void callAsync(Runner.Builder builder, String path, Map<...
class Builder (line 90) | public static class Builder<T extends Builder> {
method copy (line 124) | public synchronized Builder copy() {
method resolveAll (line 159) | public List<FeatureCall> resolveAll() {
method forTempUse (line 285) | public T forTempUse() {
method configDir (line 292) | public T configDir(String dir) {
method karateEnv (line 297) | public T karateEnv(String env) {
method systemProperty (line 302) | public T systemProperty(String key, String value) {
method workingDir (line 310) | public T workingDir(File value) {
method buildDir (line 317) | public T buildDir(String value) {
method classLoader (line 324) | public T classLoader(ClassLoader value) {
method relativeTo (line 329) | public T relativeTo(Class clazz) {
method path (line 334) | public T path(String... value) {
method path (line 339) | public T path(List<String> value) {
method tags (line 349) | public T tags(List<String> value) {
method tags (line 359) | public T tags(String... tags) {
method features (line 364) | public T features(Collection<Feature> value) {
method features (line 374) | public T features(Feature... value) {
method reportDir (line 378) | public T reportDir(String value) {
method scenarioName (line 385) | public T scenarioName(String name) {
method timeoutMinutes (line 390) | public T timeoutMinutes(int timeoutMinutes) {
method hook (line 395) | public T hook(RuntimeHook hook) {
method hooks (line 402) | public T hooks(Collection<RuntimeHook> hooks) {
method hookFactory (line 409) | public T hookFactory(RuntimeHookFactory hookFactory) {
method clientFactory (line 414) | public T clientFactory(HttpClientFactory clientFactory) {
method threads (line 420) | public Builder threads(int value) {
method outputHtmlReport (line 425) | public T outputHtmlReport(boolean value) {
method backupReportDir (line 430) | public T backupReportDir(boolean value) {
method outputCucumberJson (line 435) | public T outputCucumberJson(boolean value) {
method outputJunitXml (line 440) | public T outputJunitXml(boolean value) {
method dryRun (line 445) | public T dryRun(boolean value) {
method debugMode (line 450) | public T debugMode(boolean value) {
method failWhenNoScenariosFound (line 455) | public T failWhenNoScenariosFound(boolean value) {
method callSingleCache (line 460) | public T callSingleCache(Map<String, Object> value) {
method callOnceCache (line 465) | public T callOnceCache(Map<String, ScenarioCall.Result> value) {
method suiteReports (line 470) | public T suiteReports(SuiteReports value) {
method customDrivers (line 475) | public T customDrivers(Map<String, DriverRunner> customDrivers) {
method getDebugPort (line 480) | private Integer getDebugPort() {
method getDebugArgs (line 494) | private String[] getDebugArgs(int debugPort) {
method parallel (line 522) | public Results parallel(int threadCount) {
method toString (line 537) | @Override
method path (line 544) | public static Builder path(String... paths) {
method path (line 549) | public static Builder path(List<String> paths) {
method builder (line 554) | public static Builder builder() {
FILE: karate-core/src/main/java/com/intuit/karate/RuntimeHook.java
type RuntimeHook (line 37) | public interface RuntimeHook {
method beforeScenario (line 41) | default boolean beforeScenario(ScenarioRuntime sr) {
method afterScenario (line 45) | default void afterScenario(ScenarioRuntime sr) {
method afterScenarioOutline (line 49) | default void afterScenarioOutline(ScenarioRuntime sr) {
method beforeFeature (line 53) | default boolean beforeFeature(FeatureRuntime fr) {
method afterFeature (line 57) | default void afterFeature(FeatureRuntime fr) {
method beforeSuite (line 61) | default void beforeSuite(Suite suite) {
method afterSuite (line 65) | default void afterSuite(Suite suite) {
method beforeStep (line 69) | default boolean beforeStep(Step step, ScenarioRuntime sr) {
method afterStep (line 73) | default void afterStep(StepResult result, ScenarioRuntime sr) {
method beforeHttpCall (line 77) | default void beforeHttpCall(HttpRequest request, ScenarioRuntime sr) {
method afterHttpCall (line 81) | default void afterHttpCall(HttpRequest request, Response response, Sce...
FILE: karate-core/src/main/java/com/intuit/karate/ScenarioActions.java
class ScenarioActions (line 36) | public class ScenarioActions implements Actions {
method ScenarioActions (line 40) | public ScenarioActions(ScenarioEngine engine) {
method isFailed (line 44) | @Override
method getFailedReason (line 49) | @Override
method isAborted (line 54) | @Override
method configureDocString (line 59) | @Override
method configure (line 65) | @Override
method url (line 71) | @Override
method path (line 77) | @Override
method param (line 83) | @Override
method params (line 89) | @Override
method cookie (line 95) | @Override
method cookies (line 101) | @Override
method csv (line 107) | @Override
method csvDocString (line 113) | @Override
method header (line 119) | @Override
method headers (line 125) | @Override
method formField (line 131) | @Override
method formFields (line 137) | @Override
method requestDocString (line 143) | @Override
method request (line 149) | @Override
method table (line 155) | @Override
method replace (line 161) | @Override
method replace (line 167) | @Override
method def (line 173) | @Override
method defDocString (line 179) | @Override
method text (line 185) | @Override
method yaml (line 191) | @Override
method yamlDocString (line 197) | @Override
method copy (line 203) | @Override
method json (line 209) | @Override
method string (line 215) | @Override
method xml (line 221) | @Override
method xmlstring (line 227) | @Override
method bytes (line 233) | @Override
method assertTrue (line 239) | @Override
method method (line 245) | @Override
method retry (line 251) | @Override
method soapAction (line 257) | @Override
method multipartEntity (line 263) | @Override
method multipartField (line 269) | @Override
method multipartFields (line 275) | @Override
method multipartFile (line 281) | @Override
method multipartFiles (line 287) | @Override
method print (line 293) | @Override
method status (line 299) | @Override
method match (line 305) | @Override
method setDocString (line 320) | @Override
method set (line 326) | @Override
method set (line 332) | @Override
method remove (line 338) | @Override
method call (line 344) | @Override
method callonce (line 350) | @Override
method eval (line 356) | @Override
method evalDocString (line 362) | @Override
method evalAssignDocString (line 368) | @Override
method eval (line 374) | @Override
method evalIf (line 380) | @Override
method evalDelete (line 386) | @Override
method listen (line 392) | @Override
method doc (line 398) | @Override
method compareImage (line 404) | @Override
method driver (line 412) | @Override
method robot (line 418) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/StringUtils.java
class StringUtils (line 45) | public class StringUtils {
method StringUtils (line 47) | private StringUtils() {
class Pair (line 53) | public static class Pair {
method Pair (line 58) | public Pair(String left, String right) {
method equals (line 63) | @Override // only needed for unit tests, so no validation and null c...
method toString (line 69) | @Override
method pair (line 76) | public static Pair pair(String left, String right) {
method truncate (line 80) | public static String truncate(String s, int length, boolean addDots) {
method trimToEmpty (line 90) | public static String trimToEmpty(String s) {
method trimToNull (line 98) | public static String trimToNull(String s) {
method repeat (line 106) | public static String repeat(char c, int count) {
method join (line 114) | public static String join(Object[] a, char delimiter) {
method join (line 125) | public static String join(Collection<String> c, String delimiter) {
method split (line 137) | public static List<String> split(String s, char delimiter, boolean ski...
method isBlank (line 168) | public static boolean isBlank(String s) {
method toIdString (line 172) | public static String toIdString(String name) {
method splitByFirstLineFeed (line 179) | public static StringUtils.Pair splitByFirstLineFeed(String text) {
method toStringLines (line 194) | public static List<String> toStringLines(String text) {
method countLineFeeds (line 198) | public static int countLineFeeds(String text) {
method wrappedLinesEstimate (line 208) | public static int wrappedLinesEstimate(String text, int colWidth) {
method isJavaScriptFunction (line 225) | public static boolean isJavaScriptFunction(String text) {
method fixJavaScriptFunction (line 229) | public static String fixJavaScriptFunction(String text) {
method getIgnoreKeyCase (line 238) | public static <T> T getIgnoreKeyCase(Map<String, T> map, String name) {
method removeIgnoreKeyCase (line 251) | public static void removeIgnoreKeyCase(Map<String, ?> map, String name) {
method containsIgnoreCase (line 263) | public static boolean containsIgnoreCase(List<String> list, String str) {
method throwableToString (line 272) | public static String throwableToString(Throwable t) {
FILE: karate-core/src/main/java/com/intuit/karate/Suite.java
class Suite (line 62) | public class Suite implements Runnable {
method read (line 110) | private String read(String name) {
method forTempUse (line 121) | public static Suite forTempUse(HttpClientFactory hcf) {
method Suite (line 125) | public Suite() {
method Suite (line 129) | public Suite(Runner.Builder rb) {
method run (line 216) | @Override
method abort (line 256) | public void abort() {
method isAborted (line 260) | public boolean isAborted() {
method saveFeatureResults (line 264) | public void saveFeatureResults(FeatureResult fr) {
method onFeatureDone (line 281) | private void onFeatureDone(FeatureResult fr, int index) {
method toKarateJson (line 305) | private static Map toKarateJson(File file) {
method getFeatureResults (line 315) | public Stream<FeatureResult> getFeatureResults() {
method getScenarioResults (line 321) | public Stream<ScenarioResult> getScenarioResults() {
method retryScenario (line 325) | public ScenarioResult retryScenario(Scenario scenario) {
method updateResults (line 334) | public Results updateResults(ScenarioResult sr) {
method backupReportDirIfExists (line 364) | private void backupReportDirIfExists() {
method getFeaturesRemaining (line 376) | public long getFeaturesRemaining() {
method buildResults (line 380) | public Results buildResults() {
FILE: karate-core/src/main/java/com/intuit/karate/XmlUtils.java
class XmlUtils (line 64) | public class XmlUtils {
method XmlUtils (line 66) | private XmlUtils() {
method toString (line 70) | public static String toString(Node node) {
method toString (line 74) | public static String toString(Node node, boolean pretty) {
class DtdEntityResolver (line 95) | private static class DtdEntityResolver implements EntityResolver {
method resolveEntity (line 99) | @Override
method toXmlDoc (line 107) | public static Document toXmlDoc(String xml) {
method toXmlDoc (line 111) | public static Document toXmlDoc(String xml, boolean namespaceAware) {
method compile (line 133) | private static XPathExpression compile(String path) {
method getNodeListByPath (line 143) | public static NodeList getNodeListByPath(Node node, String path) {
method stripNameSpacePrefixes (line 152) | public static String stripNameSpacePrefixes(String path) {
method getNodeByPath (line 169) | public static Node getNodeByPath(Node node, String path, boolean creat...
method createNodeByPath (line 186) | public static Node createNodeByPath(Document doc, String path) {
method getTextValueByPath (line 215) | public static String getTextValueByPath(Node node, String path) {
method setByPath (line 224) | public static void setByPath(Node doc, String path, String value) {
method removeByPath (line 235) | public static void removeByPath(Document doc, String path) {
method setByPath (line 251) | public static void setByPath(Document doc, String path, Node in) {
method toJsonDoc (line 267) | public static DocumentContext toJsonDoc(Node node) {
method getAttributes (line 271) | private static Map<String, Object> getAttributes(Node node) {
method getChildElementCount (line 282) | public static int getChildElementCount(Node node) {
method getElementAsObject (line 295) | private static Object getElementAsObject(Node node, boolean removeName...
method toObject (line 332) | public static Object toObject(Node node) {
method toObject (line 336) | public static Object toObject(Node node, boolean removeNamespace) {
method fromMap (line 371) | public static Document fromMap(Map<String, Object> map) {
method fromObject (line 376) | public static Document fromObject(String name, Object o) {
method fromObject (line 384) | public static List<Element> fromObject(Document doc, String name, Obje...
method newDocument (line 422) | public static Document newDocument() {
method addAttributes (line 433) | public static void addAttributes(Element element, Map<String, Object> ...
method createElement (line 442) | public static Element createElement(Node node, String name, String val...
method toNewDocument (line 450) | public static Document toNewDocument(Node in) {
method fromJavaObject (line 457) | public static Document fromJavaObject(Object o) {
method toXml (line 461) | public static String toXml(Object o) {
method isXml (line 465) | public static boolean isXml(String s) {
FILE: karate-core/src/main/java/com/intuit/karate/core/AfterHookType.java
type AfterHookType (line 30) | public enum AfterHookType {
method AfterHookType (line 38) | private AfterHookType(String prefix) {
method getPrefix (line 42) | public String getPrefix() {
FILE: karate-core/src/main/java/com/intuit/karate/core/AssignType.java
type AssignType (line 30) | public enum AssignType {
FILE: karate-core/src/main/java/com/intuit/karate/core/Background.java
class Background (line 32) | public class Background {
method getLine (line 40) | public int getLine() {
method setLine (line 44) | public void setLine(int line) {
method getSteps (line 48) | public List<Step> getSteps() {
method setSteps (line 52) | public void setSteps(List<Step> steps) {
method toString (line 56) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/Channel.java
type Channel (line 29) | public interface Channel {
method init (line 31) | Object init(ScenarioRuntime runtime);
method afterScenario (line 33) | void afterScenario();
FILE: karate-core/src/main/java/com/intuit/karate/core/ChannelFactory.java
type ChannelFactory (line 32) | public interface ChannelFactory {
method create (line 34) | Channel create(ScenarioRuntime runtime, Map<String, Object> options);
FILE: karate-core/src/main/java/com/intuit/karate/core/Config.java
class Config (line 46) | public class Config {
method Config (line 128) | public Config() {
method get (line 132) | private static <T> T get(Map<String, Object> map, String key, T defaul...
method configure (line 137) | public boolean configure(String key, Variable value) { // TODO use enum
method Config (line 347) | public Config(Config parent) {
method setUrl (line 404) | public void setUrl(String url) {
method getUrl (line 408) | public String getUrl() {
method setCookies (line 412) | public void setCookies(Variable cookies) {
method isSslEnabled (line 416) | public boolean isSslEnabled() {
method getSslAlgorithm (line 420) | public String getSslAlgorithm() {
method getSslKeyStore (line 424) | public String getSslKeyStore() {
method getSslKeyStorePassword (line 428) | public String getSslKeyStorePassword() {
method getSslKeyStoreType (line 432) | public String getSslKeyStoreType() {
method getSslTrustStore (line 436) | public String getSslTrustStore() {
method getSslTrustStorePassword (line 440) | public String getSslTrustStorePassword() {
method getSslTrustStoreType (line 444) | public String getSslTrustStoreType() {
method isSslTrustAll (line 448) | public boolean isSslTrustAll() {
method isFollowRedirects (line 452) | public boolean isFollowRedirects() {
method getReadTimeout (line 456) | public int getReadTimeout() {
method getConnectTimeout (line 460) | public int getConnectTimeout() {
method getCharset (line 464) | public Charset getCharset() {
method getProxyUri (line 468) | public String getProxyUri() {
method getProxyUsername (line 472) | public String getProxyUsername() {
method getProxyPassword (line 476) | public String getProxyPassword() {
method getNonProxyHosts (line 480) | public List<String> getNonProxyHosts() {
method getLocalAddress (line 484) | public String getLocalAddress() {
method getHeaders (line 488) | public Variable getHeaders() {
method getCookies (line 492) | public Variable getCookies() {
method getResponseHeaders (line 496) | public Variable getResponseHeaders() {
method getResponseDelay (line 500) | public int getResponseDelay() {
method isXmlNamespaceAware (line 504) | public boolean isXmlNamespaceAware() {
method isLowerCaseResponseHeaders (line 508) | public boolean isLowerCaseResponseHeaders() {
method isCorsEnabled (line 512) | public boolean isCorsEnabled() {
method isLogPrettyRequest (line 516) | public boolean isLogPrettyRequest() {
method isLogPrettyResponse (line 520) | public boolean isLogPrettyResponse() {
method isPrintEnabled (line 524) | public boolean isPrintEnabled() {
method isHttpRetryEnabled (line 528) | public boolean isHttpRetryEnabled()
method getCustomOptions (line 534) | public Map<String, Map<String, Object>> getCustomOptions() {
method getAfterScenario (line 538) | public Variable getAfterScenario() {
method setAfterScenario (line 542) | public void setAfterScenario(Variable afterScenario) {
method getAfterScenarioOutline (line 546) | public Variable getAfterScenarioOutline() {
method setAfterScenarioOutline (line 550) | public void setAfterScenarioOutline(Variable afterScenarioOutline) {
method getAfterFeature (line 554) | public Variable getAfterFeature() {
method setAfterFeature (line 558) | public void setAfterFeature(Variable afterFeature) {
method isShowLog (line 562) | public boolean isShowLog() {
method setShowLog (line 566) | public void setShowLog(boolean showLog) {
method isShowAllSteps (line 570) | public boolean isShowAllSteps() {
method setShowAllSteps (line 574) | public void setShowAllSteps(boolean showAllSteps) {
method getRetryInterval (line 578) | public int getRetryInterval() {
method setRetryInterval (line 582) | public void setRetryInterval(int retryInterval) {
method getRetryCount (line 586) | public int getRetryCount() {
method setRetryCount (line 590) | public void setRetryCount(int retryCount) {
method isPauseIfNotPerf (line 594) | public boolean isPauseIfNotPerf() {
method isAbortedStepsShouldPass (line 598) | public boolean isAbortedStepsShouldPass() {
method getDriverTarget (line 602) | public Target getDriverTarget() {
method setDriverTarget (line 606) | public void setDriverTarget(Target driverTarget) {
method getLogModifier (line 610) | public HttpLogModifier getLogModifier() {
method getCallSingleCacheDir (line 614) | public String getCallSingleCacheDir() {
method getCallSingleCacheMinutes (line 618) | public int getCallSingleCacheMinutes() {
method getContinueOnStepFailureMethods (line 622) | public List<Method> getContinueOnStepFailureMethods() {
method setContinueOnStepFailureMethods (line 626) | public void setContinueOnStepFailureMethods(List<Method> continueOnSte...
method isContinueAfterContinueOnStepFailure (line 630) | public boolean isContinueAfterContinueOnStepFailure() {
method setContinueAfterContinueOnStepFailure (line 634) | public void setContinueAfterContinueOnStepFailure(boolean continueAfte...
method setAbortSuiteOnFailure (line 638) | public void setAbortSuiteOnFailure(boolean abortSuiteOnFailure) {
method isAbortSuiteOnFailure (line 642) | public boolean isAbortSuiteOnFailure() {
method getImageComparisonOptions (line 646) | public Map<String, Object> getImageComparisonOptions() {
method isMatchEachEmptyAllowed (line 650) | public boolean isMatchEachEmptyAllowed() {
method isNtlmEnabled (line 654) | public boolean isNtlmEnabled() {
method setNtlmEnabled (line 658) | public void setNtlmEnabled(boolean ntlmEnabled) {
method getNtlmUsername (line 662) | public String getNtlmUsername() {
method setNtlmUsername (line 666) | public void setNtlmUsername(String ntlmUsername) {
method getNtlmPassword (line 670) | public String getNtlmPassword() {
method setNtlmPassword (line 674) | public void setNtlmPassword(String ntlmPassword) {
method getNtlmDomain (line 678) | public String getNtlmDomain() {
method setNtlmDomain (line 682) | public void setNtlmDomain(String ntlmDomain) {
method getNtlmWorkstation (line 686) | public String getNtlmWorkstation() {
method setNtlmWorkstation (line 690) | public void setNtlmWorkstation(String ntlmWorkstation) {
method setHttpRetryEnabled (line 694) | public void setHttpRetryEnabled(boolean httpRetryEnabled)
FILE: karate-core/src/main/java/com/intuit/karate/core/Embed.java
class Embed (line 37) | public class Embed {
method Embed (line 42) | public Embed(File file, ResourceType resourceType) {
method getAsHtmlForReport (line 47) | public String getAsHtmlForReport() {
method fromKarateJson (line 55) | public static Embed fromKarateJson(Map<String, Object> map) {
method toKarateJson (line 63) | public Map<String, Object> toKarateJson() {
method getFile (line 71) | public File getFile() {
method getResourceType (line 75) | public ResourceType getResourceType() {
method getBytes (line 79) | public byte[] getBytes() {
method getBase64 (line 83) | public String getBase64() {
method getAsString (line 87) | public String getAsString() {
method getAsHtmlData (line 91) | public String getAsHtmlData() {
method getAsHtmlTag (line 95) | public String getAsHtmlTag() {
method toMap (line 109) | public Map toMap() {
method toString (line 116) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/ExamplesTable.java
class ExamplesTable (line 35) | public class ExamplesTable {
method ExamplesTable (line 42) | public ExamplesTable(ScenarioOutline outline, Table table) {
method getOutline (line 48) | public ScenarioOutline getOutline() {
method getTags (line 52) | public List<Tag> getTags() {
method setTags (line 56) | public void setTags(List<Tag> tags) {
method getTable (line 60) | public Table getTable() {
method toKarateJson (line 64) | public Map<String, Object> toKarateJson() {
FILE: karate-core/src/main/java/com/intuit/karate/core/Feature.java
class Feature (line 40) | public class Feature {
method read (line 53) | public static Feature read(String path) {
method read (line 57) | public static Feature read(File file) {
method read (line 61) | public static Feature read(Resource resource) {
method Feature (line 67) | private Feature(Resource resource) {
method getResource (line 71) | public Resource getResource() {
method getPackageQualifiedName (line 75) | public String getPackageQualifiedName() {
method getKarateJsonFileName (line 79) | public String getKarateJsonFileName() {
method isBackgroundPresent (line 83) | public boolean isBackgroundPresent() {
method getNameAndDescription (line 87) | public String getNameAndDescription() {
method getNameForReport (line 101) | public String getNameForReport() {
method findStepByLine (line 109) | public Step findStepByLine(int line) {
method getSetup (line 122) | public Scenario getSetup(String name) {
method addSection (line 145) | public void addSection(FeatureSection section) {
method getSection (line 150) | public FeatureSection getSection(int sectionIndex) {
method getScenario (line 154) | public Scenario getScenario(int sectionIndex, int exampleIndex) {
method getStep (line 163) | public Step getStep(int sectionIndex, int exampleIndex, int stepIndex) {
method getLine (line 172) | public int getLine() {
method setLine (line 176) | public void setLine(int line) {
method getTags (line 180) | public List<Tag> getTags() {
method setTags (line 184) | public void setTags(List<Tag> tags) {
method getName (line 188) | public String getName() {
method setName (line 192) | public void setName(String name) {
method getDescription (line 196) | public String getDescription() {
method setDescription (line 200) | public void setDescription(String description) {
method getBackground (line 204) | public Background getBackground() {
method setBackground (line 208) | public void setBackground(Background background) {
method getSections (line 212) | public List<FeatureSection> getSections() {
method setSections (line 216) | public void setSections(List<FeatureSection> sections) {
method toString (line 220) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/FeatureCall.java
class FeatureCall (line 30) | public class FeatureCall {
method FeatureCall (line 37) | public FeatureCall(Feature feature) {
method FeatureCall (line 41) | public FeatureCall(Feature feature, String callTag, int callLine, Stri...
method toString (line 48) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/FeatureParser.java
class FeatureParser (line 44) | public class FeatureParser extends KarateParserBaseListener {
method FeatureParser (line 52) | private FeatureParser(Feature feature, InputStream is) {
method parse (line 69) | protected static void parse(Feature feature) {
method getActualLine (line 78) | private static int getActualLine(TerminalNode node) {
method toTags (line 90) | private static List<Tag> toTags(int line, List<TerminalNode> nodes) {
method toTable (line 105) | private static Table toTable(KarateParser.TableContext ctx) {
method indexOfFirstText (line 136) | private static int indexOfFirstText(String s) {
method fixDocString (line 147) | private static String fixDocString(String temp) {
method collectComments (line 173) | private List<String> collectComments(ParserRuleContext prc) {
method toSteps (line 185) | private List<Step> toSteps(Scenario scenario, List<KarateParser.StepCo...
method enterFeatureHeader (line 211) | @Override
method enterBackground (line 226) | @Override
method enterScenario (line 240) | @Override
method enterScenarioOutline (line 259) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/FeatureResult.java
class FeatureResult (line 43) | public class FeatureResult {
method FeatureResult (line 57) | public FeatureResult(Feature feature) {
method printStats (line 62) | public void printStats() {
method getAllEmbedFiles (line 72) | public List<File> getAllEmbedFiles() {
method fromKarateJson (line 86) | public static FeatureResult fromKarateJson(File workingDir, Map<String...
method toInfoJson (line 107) | public Map<String, Object> toInfoJson() {
method toSummaryJson (line 120) | public Map<String, Object> toSummaryJson() {
method toKarateJson (line 134) | public Map<String, Object> toKarateJson() {
method toCucumberJson (line 165) | public Map<String, Object> toCucumberJson() {
method getAllScenarioStepResultsNotHidden (line 192) | public List<StepResult> getAllScenarioStepResultsNotHidden() {
method setDisplayName (line 200) | public void setDisplayName(String displayName) {
method getFeature (line 204) | public Feature getFeature() {
method getDisplayName (line 208) | public String getDisplayName() {
method getErrorMessagesCombined (line 212) | public KarateException getErrorMessagesCombined() {
method getErrorMessages (line 220) | public String getErrorMessages() {
method getCallNameForReport (line 224) | public String getCallNameForReport() {
method getCallArgPretty (line 229) | public String getCallArgPretty() {
method setCallDepth (line 240) | public void setCallDepth(int callDepth) {
method getCallArg (line 244) | public Map<String, Object> getCallArg() {
method setCallArg (line 248) | public void setCallArg(Map<String, Object> callArg) {
method getLoopIndex (line 252) | public int getLoopIndex() {
method setLoopIndex (line 256) | public void setLoopIndex(int loopIndex) {
method getDurationMillis (line 260) | public double getDurationMillis() {
method getFailedCount (line 268) | public int getFailedCount() {
method isEmpty (line 272) | public boolean isEmpty() {
method getScenarioCount (line 276) | public int getScenarioCount() {
method getPassedCount (line 280) | public int getPassedCount() {
method isFailed (line 284) | public boolean isFailed() {
method getErrors (line 288) | public List<String> getErrors() {
method addResult (line 298) | public void addResult(ScenarioResult result) {
method setVariables (line 302) | public void setVariables(Map<String, Object> resultVariables) {
method getVariables (line 306) | public Map<String, Object> getVariables() {
method setConfig (line 311) | public void setConfig(Config config) {
method getConfig (line 315) | public Config getConfig() {
method sortScenarioResults (line 319) | public void sortScenarioResults() {
method getScenarioResults (line 323) | public List<ScenarioResult> getScenarioResults() {
method toString (line 327) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/FeatureRuntime.java
class FeatureRuntime (line 44) | public class FeatureRuntime implements Runnable {
method resolveFromThis (line 67) | public Resource resolveFromThis(String path) {
method resolveFromRoot (line 71) | public Resource resolveFromRoot(String path) {
method setNext (line 75) | public void setNext(Runnable next) {
method setMockEngine (line 79) | public void setMockEngine(ScenarioEngine mockEngine) {
method getMockEngine (line 83) | public ScenarioEngine getMockEngine() {
method forTempUse (line 87) | public static FeatureRuntime forTempUse(HttpClientFactory hcf) {
method of (line 95) | public static FeatureRuntime of(Feature feature) {
method of (line 99) | public static FeatureRuntime of(FeatureCall feature) {
method of (line 103) | public static FeatureRuntime of(Suite sr, FeatureCall feature) {
method of (line 107) | public static FeatureRuntime of(Suite sr, FeatureCall feature, Map<Str...
method of (line 111) | public static FeatureRuntime of(Suite sr, FeatureCall feature, Map<Str...
method FeatureRuntime (line 115) | public FeatureRuntime(ScenarioCall call) {
method FeatureRuntime (line 124) | private FeatureRuntime(Suite suite, FeatureCall featureCall, ScenarioC...
method beforeHook (line 163) | public boolean beforeHook() {
method run (line 174) | @Override
method processScenario (line 190) | private void processScenario(ScenarioRuntime sr) {
method isLastScenarioInOutline (line 211) | private boolean isLastScenarioInOutline(Scenario scenario) {
method afterFeature (line 226) | public synchronized void afterFeature() {
method toString (line 243) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/FeatureSection.java
class FeatureSection (line 30) | public class FeatureSection {
method getLine (line 36) | public int getLine() {
method getIndex (line 44) | public int getIndex() {
method setIndex (line 48) | public void setIndex(int index) {
method isOutline (line 52) | public boolean isOutline() {
method getScenario (line 56) | public Scenario getScenario() {
method setScenario (line 60) | public void setScenario(Scenario scenario) {
method getScenarioOutline (line 64) | public ScenarioOutline getScenarioOutline() {
method setScenarioOutline (line 68) | public void setScenarioOutline(ScenarioOutline scenarioOutline) {
FILE: karate-core/src/main/java/com/intuit/karate/core/MockHandler.java
class MockHandler (line 53) | public class MockHandler implements ServerHandler {
method MockHandler (line 82) | public MockHandler(Feature feature) {
method MockHandler (line 86) | public MockHandler(Feature feature, Map<String, Object> args) {
method MockHandler (line 90) | public MockHandler(List<Feature> features) {
method MockHandler (line 94) | public MockHandler(String prefix, List<Feature> features, Map<String, ...
method getVariable (line 106) | public Object getVariable(String name) {
method initRuntime (line 116) | private ScenarioRuntime initRuntime(Feature feature, Map<String, Objec...
method handle (line 156) | @Override
method initEngine (line 246) | private static ScenarioEngine initEngine(ScenarioRuntime runtime, Map<...
method executeScenarioSteps (line 267) | private Result executeScenarioSteps(Feature feature, ScenarioRuntime r...
method isMatchingScenario (line 285) | private boolean isMatchingScenario(Scenario scenario, ScenarioEngine e...
method pathMatches (line 306) | public boolean pathMatches(String pattern) {
method paramExists (line 320) | public boolean paramExists(String name) {
method paramValue (line 326) | public String paramValue(String name) {
method methodIs (line 330) | public boolean methodIs(String name) { // TODO no more supporting arra...
method typeContains (line 334) | public boolean typeContains(String text) {
method acceptContains (line 339) | public boolean acceptContains(String text) {
method headerContains (line 344) | public boolean headerContains(String name, String value) {
method bodyPath (line 356) | public Object bodyPath(String path) {
FILE: karate-core/src/main/java/com/intuit/karate/core/MockInterceptor.java
type MockInterceptor (line 6) | @FunctionalInterface
method intercept (line 9) | void intercept(Request req, Response res, Scenario scenario);
FILE: karate-core/src/main/java/com/intuit/karate/core/MockServer.java
class MockServer (line 42) | public class MockServer extends HttpServer {
method MockServer (line 44) | private MockServer(ServerBuilder sb) {
class Builder (line 48) | public static class Builder {
method Builder (line 50) | Builder(Feature feature) {
method Builder (line 54) | Builder(List<Feature> features) {
method watch (line 69) | public Builder watch(boolean value) {
method http (line 74) | public Builder http(int value) {
method https (line 79) | public Builder https(int value) {
method certFile (line 85) | public Builder certFile(File value) {
method keyFile (line 90) | public Builder keyFile(File value) {
method pathPrefix (line 95) | public Builder pathPrefix(String prefix) {
method args (line 103) | public Builder args(Map<String, Object> value) {
method arg (line 108) | public Builder arg(String name, Object value) {
method interceptor (line 116) | public Builder interceptor(MockInterceptor value) {
method keepOriginalHeaders (line 121) | public Builder keepOriginalHeaders(boolean value) {
method build (line 126) | public MockServer build() {
class ReloadingMockHandler (line 160) | private static class ReloadingMockHandler implements ServerHandler {
method ReloadingMockHandler (line 168) | public ReloadingMockHandler(List<Feature> features, Map<String, Obje...
method handle (line 179) | @Override
method feature (line 191) | public static Builder feature(String path) {
method feature (line 195) | public static Builder feature(File file) {
method feature (line 199) | public static Builder feature(Feature feature) {
method featurePaths (line 203) | public static Builder featurePaths(List<String> paths) {
method featurePaths (line 207) | public static Builder featurePaths(String... paths) {
method featureFiles (line 211) | public static Builder featureFiles(List<File> features) {
method features (line 215) | public static Builder features(List<Feature> features) {
FILE: karate-core/src/main/java/com/intuit/karate/core/ParallelProcessor.java
class ParallelProcessor (line 38) | public abstract class ParallelProcessor<T> {
method ParallelProcessor (line 47) | public ParallelProcessor(ExecutorService executor, Iterator<T> publish...
method toRunnable (line 53) | private Runnable toRunnable(final CompletableFuture prevFuture, final ...
method execute (line 67) | public void execute() {
method shouldRunSynchronously (line 84) | public boolean shouldRunSynchronously(T in) {
method process (line 90) | public abstract void process(T in);
method onComplete (line 92) | public abstract void onComplete();
FILE: karate-core/src/main/java/com/intuit/karate/core/ParserErrorListener.java
class ParserErrorListener (line 40) | public class ParserErrorListener implements ANTLRErrorListener {
method isFail (line 49) | public boolean isFail() {
method getMessage (line 53) | public String getMessage() {
method getLine (line 57) | public int getLine() {
method getPosition (line 61) | public int getPosition() {
method offendingSymbol (line 65) | public Object offendingSymbol() {
method syntaxError (line 69) | @Override
method reportAmbiguity (line 78) | @Override
method reportAttemptingFullContext (line 85) | @Override
method reportContextSensitivity (line 92) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/PerfEvent.java
class PerfEvent (line 30) | public class PerfEvent {
method PerfEvent (line 40) | public PerfEvent(long startTime, long endTime, String name, int status...
method getName (line 47) | public String getName() {
method getStartTime (line 51) | public long getStartTime() {
method getEndTime (line 55) | public long getEndTime() {
method getStatusCode (line 59) | public int getStatusCode() {
method isFailed (line 63) | public boolean isFailed() {
method setFailed (line 67) | public void setFailed(boolean failed) {
method getMessage (line 71) | public String getMessage() {
method setMessage (line 75) | public void setMessage(String message) {
method toString (line 79) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/Plugin.java
type Plugin (line 35) | public interface Plugin {
method onFailure (line 37) | void onFailure(StepResult stepResult);
method afterScenario (line 39) | Map<String, Object> afterScenario();
method getRuntime (line 41) | default ScenarioRuntime getRuntime() {
method methodNames (line 45) | List<String> methodNames();
method methodNames (line 47) | public static List<String> methodNames(Class clazz) {
FILE: karate-core/src/main/java/com/intuit/karate/core/PluginFactory.java
type PluginFactory (line 32) | public interface PluginFactory {
method create (line 34) | Plugin create(ScenarioRuntime runtime, Map<String, Object> options);
FILE: karate-core/src/main/java/com/intuit/karate/core/Result.java
class Result (line 37) | public class Result {
method toCucumberJson (line 55) | public Map<String, Object> toCucumberJson() {
method fromKarateJson (line 65) | public static Result fromKarateJson(Map<String, Object> map) {
method toKarateJson (line 89) | public Map<String, Object> toKarateJson() {
method Result (line 108) | private Result(long startTime, String status, long nanos, Throwable er...
method isSkipped (line 119) | public boolean isSkipped() {
method isFailed (line 123) | public boolean isFailed() {
method isAborted (line 127) | public boolean isAborted() {
method getError (line 131) | public Throwable getError() {
method getErrorMessage (line 135) | public String getErrorMessage() {
method passed (line 139) | public static Result passed(long startTime, long nanos) {
method passed (line 142) | public static Result passed(long startTime, long nanos, StepRuntime.Me...
method failed (line 146) | public static Result failed(long startTime, long nanos, Throwable erro...
method failed (line 150) | public static Result failed(long startTime, long nanos, Throwable erro...
method skipped (line 163) | public static Result skipped(long startTime) {
method aborted (line 167) | public static Result aborted(long startTime, long nanos) {
method aborted (line 171) | public static Result aborted(long startTime, long nanos, StepRuntime.M...
method getStatus (line 175) | public String getStatus() {
method getDurationNanos (line 179) | public long getDurationNanos() {
method getDurationMillis (line 183) | public double getDurationMillis() {
method getStartTime (line 187) | public long getStartTime() {
method getEndTime (line 191) | public long getEndTime() {
method getMatchingMethod (line 195) | public StepRuntime.MethodMatch getMatchingMethod() {
method toString (line 199) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/RuntimeHookFactory.java
type RuntimeHookFactory (line 32) | public interface RuntimeHookFactory {
method create (line 34) | RuntimeHook create();
FILE: karate-core/src/main/java/com/intuit/karate/core/Scenario.java
class Scenario (line 35) | public class Scenario {
method Scenario (line 49) | public Scenario(Feature feature, FeatureSection section, int exampleIn...
method isEqualTo (line 55) | public boolean isEqualTo(Scenario other) {
method getNameAndDescription (line 59) | public String getNameAndDescription() {
method getRefIdAndName (line 73) | public String getRefIdAndName() {
method copy (line 82) | public Scenario copy(int exampleIndex) {
method replace (line 103) | public void replace(String token, String value) {
method getStepByLine (line 125) | public Step getStepByLine(int line) {
method getRefId (line 134) | public String getRefId() {
method getDebugInfo (line 143) | public String getDebugInfo() {
method getUniqueId (line 147) | public String getUniqueId() {
method getBackgroundSteps (line 152) | public List<Step> getBackgroundSteps() {
method getStepsIncludingBackground (line 156) | public List<Step> getStepsIncludingBackground() {
method getTagsEffective (line 169) | public Tags getTagsEffective() {
method getSection (line 176) | public FeatureSection getSection() {
method getFeature (line 180) | public Feature getFeature() {
method getLine (line 184) | public int getLine() {
method setLine (line 188) | public void setLine(int line) {
method getTags (line 192) | public List<Tag> getTags() {
method setTags (line 196) | public void setTags(List<Tag> tags) {
method getName (line 200) | public String getName() {
method setName (line 204) | public void setName(String name) {
method getDescription (line 208) | public String getDescription() {
method setDescription (line 212) | public void setDescription(String description) {
method getSteps (line 216) | public List<Step> getSteps() {
method setSteps (line 220) | public void setSteps(List<Step> steps) {
method isOutlineExample (line 224) | public boolean isOutlineExample() {
method isDynamic (line 228) | public boolean isDynamic() {
method getDynamicExpression (line 232) | public String getDynamicExpression() {
method setDynamicExpression (line 236) | public void setDynamicExpression(String dynamicExpression) {
method getExampleData (line 240) | public Map<String, Object> getExampleData() {
method setExampleData (line 244) | public void setExampleData(Map<String, Object> exampleData) {
method getExampleIndex (line 248) | public int getExampleIndex() {
method toString (line 252) | @Override
method getUriToLineNumber (line 257) | public URI getUriToLineNumber() {
method isSetup (line 261) | public boolean isSetup() {
FILE: karate-core/src/main/java/com/intuit/karate/core/ScenarioBridge.java
class ScenarioBridge (line 44) | public class ScenarioBridge implements PerfContext {
method ScenarioBridge (line 48) | protected ScenarioBridge(ScenarioEngine engine) {
method abort (line 52) | public void abort() {
method append (line 56) | public Object append(Value... vals) {
method appendToInternal (line 82) | private Object appendToInternal(String varName, Value... vals) {
method appendTo (line 101) | public Object appendTo(Value ref, Value... vals) {
method call (line 122) | public Object call(String fileName) {
method call (line 126) | public Object call(String fileName, Value arg) {
method call (line 130) | public Object call(boolean sharedScope, String fileName) {
method call (line 134) | public Object call(boolean sharedScope, String fileName, Value arg) {
method callSingleResult (line 146) | private static Object callSingleResult(ScenarioEngine engine, Object o...
method callSingle (line 157) | public Object callSingle(String fileName) throws Exception {
method callSingle (line 161) | public Object callSingle(String fileName, Value arg) throws Exception {
method callonce (line 236) | public Object callonce(String path) {
method callonce (line 240) | public Object callonce(boolean sharedScope, String path) {
method capturePerfEvent (line 246) | @Override
method channel (line 252) | public Object channel(String type) {
method compareImage (line 256) | public Object compareImage(Object baseline, Object latest, Value... op...
method configure (line 276) | public void configure(String key, Value value) {
method consume (line 280) | public Object consume(String type) {
method distinct (line 285) | public Object distinct(Value o) {
method doc (line 298) | public String doc(Value v) {
method embed (line 311) | public void embed(Object o, String contentType) {
method eval (line 321) | public Object eval(String exp) {
method exec (line 326) | public String exec(Value value) {
method execInternal (line 337) | private String execInternal(Map<String, Object> options) {
method extract (line 343) | public String extract(String text, String regex, int group) {
method extractAll (line 353) | public List<String> extractAll(String text, String regex, int group) {
method fail (line 363) | public void fail(String reason) {
method filter (line 367) | public Object filter(Value o, Value f) {
method filterKeys (line 384) | public Object filterKeys(Value o, Value... args) {
method forEach (line 421) | public void forEach(Value o, Value f) {
method fork (line 440) | public Command fork(Value value) {
method fromString (line 454) | public Object fromString(String exp) {
method get (line 466) | public Object get(String exp) {
method get (line 483) | public Object get(String exp, Object defaultValue) {
method getEngine (line 491) | public ScenarioEngine getEngine() {
method getEnv (line 496) | public String getEnv() {
method getFeature (line 500) | public Object getFeature() {
method getInfo (line 504) | public Object getInfo() { // TODO deprecate
method getLogger (line 510) | public Object getLogger() {
method getOs (line 517) | public Object getOs() {
method getPrevRequest (line 526) | public Object getPrevRequest() {
method getProperties (line 539) | public Object getProperties() {
method getResponse (line 543) | public Object getResponse() {
method getRequest (line 547) | public Object getRequest() {
method getScenario (line 551) | public Object getScenario() {
method getScenarioOutline (line 555) | public Object getScenarioOutline() {
method getTags (line 559) | public Object getTags() {
method getTagValues (line 563) | public Object getTagValues() {
method http (line 569) | public HttpRequestBuilder http(String url) {
method jsonPath (line 575) | public Object jsonPath(Object o, String exp) {
method keysOf (line 580) | public Object keysOf(Object o) {
method log (line 589) | public void log(Value... values) {
method lowerCase (line 596) | public Object lowerCase(Object o) {
method map (line 601) | public Object map(Value o, Value f) {
method mapWithKey (line 616) | public Object mapWithKey(Value v, String key) {
method match (line 631) | public Object match(Value actual, Value expected) {
method match (line 636) | public Object match(String exp) {
method merge (line 642) | public Object merge(Value... vals) {
method pause (line 656) | public void pause(Value value) {
method pretty (line 673) | public String pretty(Object o) {
method prettyXml (line 678) | public String prettyXml(Object o) {
method proceed (line 683) | public void proceed() {
method proceed (line 687) | public void proceed(String requestUrlBase) {
method range (line 691) | public Object range(int start, int end) {
method range (line 695) | public Object range(int start, int end, int interval) {
method read (line 712) | public Object read(String path) {
method readAsBytes (line 717) | public byte[] readAsBytes(String path) {
method readAsString (line 721) | public String readAsString(String path) {
method readAsStream (line 725) | public InputStream readAsStream(String path) {
method remove (line 729) | public void remove(String name, String path) {
method render (line 733) | public String render(Value v) {
method repeat (line 746) | public Object repeat(int n, Value f) {
method set (line 757) | public void set(Map<String, Object> map) {
method set (line 761) | public void set(String name, Value value) {
method set (line 766) | public void set(String name, String path, Object value) {
method setup (line 770) | public Object setup() {
method setup (line 774) | public Object setup(String name) {
method setupInternal (line 779) | private static Map<String, Object> setupInternal(ScenarioEngine engine...
method setupOnce (line 798) | public Object setupOnce() {
method setupOnce (line 802) | public Object setupOnce(String name) {
method setupOnceResult (line 824) | private static Object setupOnceResult(Map<String, Object> result) {
method setXml (line 833) | public void setXml(String name, String xml) {
method setXml (line 838) | public void setXml(String name, String path, String xml) {
method signal (line 842) | public void signal(Value v) {
method sizeOf (line 846) | public Object sizeOf(Object o) {
class ValueIndex (line 859) | static abstract class ValueIndex<T> implements Comparable<ValueIndex<T...
method ValueIndex (line 864) | ValueIndex(T o, long index) {
class StringValueIndex (line 871) | static class StringValueIndex extends ValueIndex<String> {
method StringValueIndex (line 873) | public StringValueIndex(String o, long index) {
method compareTo (line 877) | @Override
class NumberValueIndex (line 885) | static class NumberValueIndex extends ValueIndex<Number> {
method NumberValueIndex (line 887) | public NumberValueIndex(Number o, long index) {
method compareTo (line 891) | @Override
method sort (line 899) | public Object sort(Value o) {
method sort (line 903) | public Object sort(Value o, Value f) {
method start (line 927) | public MockServer start(Value value) {
method startInternal (line 935) | private MockServer startInternal(Map<String, Object> config) {
method stop (line 972) | public void stop(int port) {
method toAbsolutePath (line 976) | public String toAbsolutePath(String relativePath) {
method toBean (line 980) | public Object toBean(Object o, String className) {
method toCsv (line 986) | public String toCsv(Object o) {
method toJava (line 995) | public Object toJava(Value value) {
method toJavaFile (line 999) | public File toJavaFile(String path) {
method toJs (line 1003) | public Object toJs(Object value) {
method toJson (line 1007) | public Object toJson(Value value) {
method toJson (line 1011) | public Object toJson(Value value, boolean removeNulls) {
method toList (line 1022) | public Object toList(Value value) {
method toMap (line 1027) | public Object toMap(Value value) {
method toString (line 1031) | public String toString(Object o) {
method typeOf (line 1036) | public String typeOf(Value value) {
method urlEncode (line 1041) | public String urlEncode(String s) {
method urlDecode (line 1050) | public String urlDecode(String s) {
method valuesOf (line 1059) | public Object valuesOf(Object o) {
method waitForHttp (line 1070) | public boolean waitForHttp(String url) {
method waitForPort (line 1074) | public boolean waitForPort(String host, int port) {
method webSocket (line 1078) | public WebSocketClient webSocket(String url) {
method webSocket (line 1082) | public WebSocketClient webSocket(String url, Value value) {
method webSocket (line 1086) | public WebSocketClient webSocket(String url, Value listener, Value val...
method webSocketBinary (line 1099) | public WebSocketClient webSocketBinary(String url) {
method webSocketBinary (line 1103) | public WebSocketClient webSocketBinary(String url, Value value) {
method webSocketBinary (line 1107) | public WebSocketClient webSocketBinary(String url, Value listener, Val...
method wrapFunction (line 1120) | public Object wrapFunction(Value value) {
method write (line 1134) | public File write(Object o, String path) {
method xmlPath (line 1143) | public Object xmlPath(Object o, String path) {
method assertIfJsFunction (line 1151) | private static void assertIfJsFunction(Value f) {
class LogWrapper (line 1158) | static class LogWrapper {
method LogWrapper (line 1162) | LogWrapper(Value... values) {
method toString (line 1167) | @Override
class LogFacade (line 1179) | public static class LogFacade {
method getLogger (line 1181) | private static Logger getLogger() {
method wrap (line 1185) | private static String wrap(Value... values) {
method debug (line 1189) | public void debug(Value... values) {
method info (line 1193) | public void info(Value... values) {
method trace (line 1197) | public void trace(Value... values) {
method warn (line 1201) | public void warn(Value... values) {
method error (line 1205) | public void error(Value... values) {
FILE: karate-core/src/main/java/com/intuit/karate/core/ScenarioCall.java
class ScenarioCall (line 33) | public class ScenarioCall {
method getParentVars (line 46) | public Map<String, Variable> getParentVars(boolean shallowCopy) {
method getParentConfig (line 65) | public Config getParentConfig(boolean copy) {
method isNone (line 73) | public boolean isNone() {
method getLoopIndex (line 77) | public int getLoopIndex() {
method setLoopIndex (line 81) | public void setLoopIndex(int loopIndex) {
method setSharedScope (line 85) | public void setSharedScope(boolean sharedScope) {
method isSharedScope (line 89) | public boolean isSharedScope() {
method isCallonce (line 93) | public boolean isCallonce() {
method setCallonce (line 97) | public void setCallonce(boolean callonce) {
method setKarateConfigDisabled (line 101) | public void setKarateConfigDisabled(boolean karateConfigDisabled) {
method isKarateConfigDisabled (line 105) | public boolean isKarateConfigDisabled() {
method none (line 109) | public static ScenarioCall none(Map<String, Object> arg) {
method ScenarioCall (line 113) | public ScenarioCall(ScenarioRuntime parentRuntime, FeatureCall feature...
class Result (line 124) | public static class Result {
method Result (line 130) | public Result(Variable value, Config config, Map<String, Variable> v...
FILE: karate-core/src/main/java/com/intuit/karate/core/ScenarioEngine.java
class ScenarioEngine (line 63) | public class ScenarioEngine {
method ScenarioEngine (line 104) | public ScenarioEngine(Config config, ScenarioRuntime runtime, Map<Stri...
method forTempUse (line 115) | public static ScenarioEngine forTempUse(HttpClientFactory hcf) {
method get (line 124) | public static ScenarioEngine get() {
method set (line 128) | public static void set(ScenarioEngine se) {
method remove (line 132) | protected static void remove() {
method getJsEngine (line 136) | public JsEngine getJsEngine() {
method isAborted (line 142) | public boolean isAborted() {
method setAborted (line 146) | public void setAborted(boolean aborted) {
method isFailed (line 150) | public boolean isFailed() {
method isIgnoringStepErrors (line 154) | public boolean isIgnoringStepErrors() {
method setFailedReason (line 158) | public void setFailedReason(Throwable failedReason) {
method getFailedReason (line 162) | public Throwable getFailedReason() {
method matchResult (line 166) | public void matchResult(Match.Type matchType, String expression, Strin...
method set (line 173) | public void set(String name, String path, String exp) {
method remove (line 177) | public void remove(String name, String path) {
method table (line 185) | public void table(String name, List<Map<String, String>> rows) {
method replace (line 213) | public void replace(String name, String token, String value) {
method assertTrue (line 224) | public void assertTrue(String expression) {
method print (line 231) | public void print(String exp) {
method invokeAfterHookIfConfigured (line 238) | public void invokeAfterHookIfConfigured(AfterHookType hookType) {
method logLastPerfEvent (line 275) | public void logLastPerfEvent(String failureMessage) {
method capturePerfEvent (line 286) | public void capturePerfEvent(PerfEvent event) {
method getConfig (line 299) | public Config getConfig() {
method setConfig (line 305) | public void setConfig(Config config) {
method setRequest (line 312) | public void setRequest(Request request) {
method getRequest (line 316) | public Request getRequest() {
method getHttpRequest (line 328) | public HttpRequest getHttpRequest() {
method getResponse (line 332) | public Response getResponse() {
method getRequestBuilder (line 336) | public HttpRequestBuilder getRequestBuilder() {
method configure (line 340) | public void configure(String key, String exp) {
method configure (line 345) | public void configure(String key, Variable v) {
method evalAsMap (line 355) | private void evalAsMap(String exp, BiConsumer<String, List<String>> fu...
method url (line 378) | public void url(String exp) {
method path (line 383) | public void path(String exp) {
method param (line 401) | public void param(String name, String exp) {
method params (line 410) | public void params(String expr) {
method header (line 414) | public void header(String name, String exp) {
method headers (line 423) | public void headers(String expr) {
method cookie (line 427) | public void cookie(String name, String exp) {
method cookies (line 438) | public void cookies(String exp) {
method updateConfigCookies (line 444) | private void updateConfigCookies(Map<String, Map> cookies) {
method formField (line 457) | public void formField(String name, String exp) {
method formFields (line 466) | public void formFields(String exp) {
method multipartField (line 478) | public void multipartField(String name, String value) {
method multipartFields (line 485) | public void multipartFields(String exp) {
method multiPartInternal (line 489) | private void multiPartInternal(String name, Object value) {
method multipartFile (line 523) | public void multipartFile(String name, String exp) {
method multipartFiles (line 528) | public void multipartFiles(String exp) {
method request (line 543) | public void request(String body) {
method soapAction (line 548) | public void soapAction(String exp) {
method retry (line 558) | public void retry(String condition) {
method method (line 562) | public void method(String method) {
method httpInvoke (line 571) | public Response httpInvoke() {
method httpInvokeOnce (line 581) | private void httpInvokeOnce() {
method getRuntimeHooks (line 670) | private List<RuntimeHook> getRuntimeHooks() {
method httpInvokeWithRetries (line 676) | private void httpInvokeWithRetries() {
method status (line 713) | public void status(int status) {
method getKeyStore (line 721) | public KeyStore getKeyStore(String trustStoreFile, String password, St...
method getFactory (line 745) | private static String getFactory(String channelType) {
method channelSession (line 760) | protected Object channelSession(String type) {
method mockProceed (line 788) | public void mockProceed(String requestUrlBase) {
method mockConfigureHeaders (line 812) | public Map<String, Object> mockConfigureHeaders() {
method mockAfterScenario (line 816) | public void mockAfterScenario() {
method webSocket (line 827) | public WebSocketClient webSocket(WebSocketOptions options) {
method signal (line 837) | public void signal(Object result) {
method listen (line 841) | public void listen(String exp) {
method fork (line 859) | public Command fork(boolean useLineFeed, List<String> args) {
method fork (line 863) | public Command fork(boolean useLineFeed, String line) {
method fork (line 867) | public Command fork(boolean useLineFeed, Map<String, Object> options) {
method autoDef (line 920) | private void autoDef(Plugin plugin, String instanceName) {
method driver (line 932) | public void driver(String exp) {
method robot (line 952) | public void robot(String exp) {
method setDriverToNull (line 979) | public void setDriverToNull() {
method setDriver (line 983) | public void setDriver(Driver driver) {
method setRobot (line 994) | public void setRobot(Plugin robot) { // TODO unify
method stop (line 1006) | public void stop(StepResult lastStepResult) {
method embedVideo (line 1050) | private void embedVideo(String path) {
method setResourceResolver (line 1066) | public void setResourceResolver(ResourceResolver resourceResolver) {
method getResourceResolver (line 1070) | private ResourceResolver getResourceResolver() {
method renderHtml (line 1078) | public String renderHtml(Map<String, Object> options) {
method doc (line 1102) | public void doc(String exp) {
method docInternal (line 1114) | protected String docInternal(Map<String, Object> options) {
method compareImage (line 1124) | public void compareImage(String exp) {
method compareImageInternal (line 1133) | protected Map<String, Object> compareImageInternal(Map<String, Object>...
method getImageBytes (line 1167) | private byte[] getImageBytes(Map<String, Object> params, String paramN...
method getImageOptions (line 1185) | private Map<String, Object> getImageOptions(Object obj, String objName) {
method getImageHookFunction (line 1197) | private String getImageHookFunction(Map<String, Object> options, Map<S...
method init (line 1204) | public void init() { // not in constructor because it has to be on Run...
method shallowCloneVariables (line 1234) | protected Map<String, Variable> shallowCloneVariables() {
method getOrEvalAsMap (line 1240) | protected <T> Map<String, T> getOrEvalAsMap(Variable var, Object... ar...
method executeFunction (line 1249) | public Variable executeFunction(Variable var, Object... args) {
method evalJs (line 1265) | public Variable evalJs(String js) {
method setHiddenVariable (line 1275) | public void setHiddenVariable(String key, Object value) {
method getVariable (line 1282) | public Object getVariable(String key) {
method hasVariable (line 1286) | public boolean hasVariable(String key) {
method setVariable (line 1290) | public void setVariable(String key, Object value) {
method setVariables (line 1306) | public void setVariables(Map<String, Object> map) {
method getAllVariablesAsMap (line 1313) | public Map<String, Object> getAllVariablesAsMap() {
method validateVariableName (line 1319) | private static void validateVariableName(String name) {
method evalAndCastTo (line 1331) | private Variable evalAndCastTo(AssignType assignType, String exp, bool...
method assign (line 1356) | public void assign(AssignType assignType, String name, String exp, boo...
method isEmbeddedExpression (line 1365) | private static boolean isEmbeddedExpression(String text) {
method Map (line 1369) | private Map<String, Object> Map(Object callResult) {
class EmbedAction (line 1373) | private static class EmbedAction {
method EmbedAction (line 1378) | private EmbedAction(boolean remove, Object value) {
method remove (line 1383) | static EmbedAction remove() {
method update (line 1387) | static EmbedAction update(Object value) {
method evalEmbeddedExpressions (line 1393) | public Variable evalEmbeddedExpressions(Variable value, boolean forMat...
method recurseEmbeddedExpressions (line 1411) | private EmbedAction recurseEmbeddedExpressions(Variable node, boolean ...
method recurseXmlEmbeddedExpressions (line 1486) | private void recurseXmlEmbeddedExpressions(Node node, boolean forMatch) {
method replacePlaceholderText (line 1570) | public String replacePlaceholderText(String text, String token, String...
method replaceTable (line 1600) | public void replaceTable(String text, List<Map<String, String>> list) {
method set (line 1625) | public void set(String name, String path, Variable value) {
method set (line 1629) | private void set(String name, String path, String exp, boolean delete,...
method set (line 1633) | private void set(String name, String path, boolean isWithinParentheses...
method setViaTable (line 1701) | public void setViaTable(String name, String path, List<Map<String, Str...
method parseVariableAndPath (line 1751) | public static StringUtils.Pair parseVariableAndPath(String text) {
method match (line 1769) | public Match.Result match(Match.Type matchType, String expression, Str...
method matchHeader (line 1826) | private Match.Result matchHeader(Match.Type matchType, String name, St...
method match (line 1832) | public Match.Result match(Match.Type matchType, Object actual, Object ...
method isJavaScriptFunction (line 1842) | public static boolean isJavaScriptFunction(String text) {
method isValidVariableName (line 1846) | public static boolean isValidVariableName(String name) {
method hasJavaScriptPlacehoder (line 1850) | public static boolean hasJavaScriptPlacehoder(String exp) {
method isVariableAndSpaceAndPath (line 1854) | public static final boolean isVariableAndSpaceAndPath(String text) {
method isVariable (line 1858) | public static final boolean isVariable(String text) {
method isWithinParentheses (line 1862) | public static final boolean isWithinParentheses(String text) {
method isCallSyntax (line 1866) | public static final boolean isCallSyntax(String text) {
method isCallOnceSyntax (line 1870) | public static final boolean isCallOnceSyntax(String text) {
method isGetSyntax (line 1874) | public static final boolean isGetSyntax(String text) {
method isJson (line 1878) | public static final boolean isJson(String text) {
method isXml (line 1882) | public static final boolean isXml(String text) {
method isXmlPath (line 1886) | public static boolean isXmlPath(String text) {
method isXmlPathFunction (line 1890) | public static boolean isXmlPathFunction(String text) {
method isJsonPath (line 1894) | public static final boolean isJsonPath(String text) {
method isDollarPrefixed (line 1898) | public static final boolean isDollarPrefixed(String text) {
method isDollarPrefixedJsonPath (line 1902) | public static final boolean isDollarPrefixedJsonPath(String text) {
method parseCallArgs (line 1906) | public static StringUtils.Pair parseCallArgs(String line) {
method call (line 1922) | public Variable call(Variable called, Variable arg, boolean sharedScop...
method call (line 1936) | public Variable call(boolean callOnce, String exp, boolean sharedScope) {
method callOnceResult (line 1954) | private Variable callOnceResult(ScenarioCall.Result result, boolean sh...
method callOnce (line 1981) | private Variable callOnce(String cacheKey, Variable called, Variable a...
method callFeature (line 2015) | public Object callFeature(FeatureCall featureCall, Variable arg, int i...
method evalJsonPath (line 2075) | public Variable evalJsonPath(Variable v, String path) {
method evalXmlPath (line 2084) | public static Variable evalXmlPath(Variable xml, String path) {
method nodeToValue (line 2114) | private static Variable nodeToValue(Node node) {
method evalJsonPathOnVariableByName (line 2127) | public Variable evalJsonPathOnVariableByName(String name, String path) {
method evalXmlPathOnVariableByName (line 2132) | public Variable evalXmlPathOnVariableByName(String name, String path) {
method evalKarateExpression (line 2137) | public Variable evalKarateExpression(String text) {
method evalKarateExpression (line 2141) | public Variable evalKarateExpression(String text, boolean forMatch) {
FILE: karate-core/src/main/java/com/intuit/karate/core/ScenarioFileReader.java
class ScenarioFileReader (line 38) | public class ScenarioFileReader {
method ScenarioFileReader (line 43) | public ScenarioFileReader(ScenarioEngine engine, FeatureRuntime featur...
method readFile (line 48) | public Object readFile(String text) {
method toAbsolutePath (line 81) | public String toAbsolutePath(String relativePath) {
method readFileAsBytes (line 90) | public byte[] readFileAsBytes(String path) {
method readFileAsString (line 94) | public String readFileAsString(String path) {
method readFileAsStream (line 98) | public InputStream readFileAsStream(String path) {
method removePrefix (line 102) | private static String removePrefix(String text) {
method parsePathAndTags (line 110) | private static StringUtils.Pair parsePathAndTags(String text) {
method toResource (line 127) | public Resource toResource(String path) {
method isClassPath (line 139) | private static boolean isClassPath(String text) {
method isFilePath (line 143) | private static boolean isFilePath(String text) {
method isThisPath (line 147) | private static boolean isThisPath(String text) {
method isJsonFile (line 151) | private static boolean isJsonFile(String text) {
method isJavaScriptFile (line 155) | private static boolean isJavaScriptFile(String text) {
method isYamlFile (line 159) | private static boolean isYamlFile(String text) {
method isXmlFile (line 163) | private static boolean isXmlFile(String text) {
method isTextFile (line 167) | private static boolean isTextFile(String text) {
method isCsvFile (line 171) | private static boolean isCsvFile(String text) {
method isGraphQlFile (line 175) | private static boolean isGraphQlFile(String text) {
method isFeatureFile (line 179) | private static boolean isFeatureFile(String text) {
FILE: karate-core/src/main/java/com/intuit/karate/core/ScenarioIterator.java
class ScenarioIterator (line 40) | public class ScenarioIterator implements Spliterator<ScenarioRuntime> {
method ScenarioIterator (line 54) | public ScenarioIterator(FeatureRuntime featureRuntime) {
method filterSelected (line 59) | public Stream<ScenarioRuntime> filterSelected() {
method first (line 63) | public ScenarioRuntime first() {
method tryAdvance (line 67) | @Override
method trySplit (line 168) | @Override
method estimateSize (line 173) | @Override
method characteristics (line 178) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/ScenarioOutline.java
class ScenarioOutline (line 33) | public class ScenarioOutline {
method ScenarioOutline (line 46) | public ScenarioOutline(Feature feature, FeatureSection section) {
method toScenario (line 51) | public Scenario toScenario(String dynamicExpression, int exampleIndex,...
method getScenarios (line 84) | public List<Scenario> getScenarios() {
method getScenarios (line 88) | public List<Scenario> getScenarios(FeatureRuntime fr) {
method getSection (line 126) | public FeatureSection getSection() {
method getLine (line 130) | public int getLine() {
method setLine (line 134) | public void setLine(int line) {
method getTags (line 138) | public List<Tag> getTags() {
method setTags (line 142) | public void setTags(List<Tag> tags) {
method getName (line 146) | public String getName() {
method setName (line 150) | public void setName(String name) {
method getDescription (line 154) | public String getDescription() {
method setDescription (line 158) | public void setDescription(String description) {
method getSteps (line 162) | public List<Step> getSteps() {
method setSteps (line 166) | public void setSteps(List<Step> steps) {
method getExamplesTables (line 170) | public List<ExamplesTable> getExamplesTables() {
method getNumExampleTables (line 174) | public int getNumExampleTables() {
method getAllExampleData (line 178) | public List<Map<String, Object>> getAllExampleData() {
method setExamplesTables (line 184) | public void setExamplesTables(List<ExamplesTable> examplesTables) {
method getNumScenarios (line 188) | public int getNumScenarios() {
FILE: karate-core/src/main/java/com/intuit/karate/core/ScenarioOutlineResult.java
class ScenarioOutlineResult (line 35) | public class ScenarioOutlineResult {
method ScenarioOutlineResult (line 40) | public ScenarioOutlineResult(ScenarioOutline scenarioOutline, Scenario...
method toKarateJson (line 46) | public Map<String, Object> toKarateJson() {
FILE: karate-core/src/main/java/com/intuit/karate/core/ScenarioResult.java
class ScenarioResult (line 40) | public class ScenarioResult implements Comparable<ScenarioResult> {
method compareTo (line 52) | @Override
method equals (line 64) | @Override
method getFailureMessageForDisplay (line 78) | public String getFailureMessageForDisplay() {
method addFakeStepResult (line 87) | public StepResult addFakeStepResult(String message, Throwable error) {
method addStepResults (line 101) | public void addStepResults(List<StepResult> value) {
method addStepResult (line 107) | public void addStepResult(StepResult stepResult) {
method recurse (line 116) | private static void recurse(List<Map> list, StepResult stepResult, int...
method getStepResults (line 138) | private List<Map> getStepResults(boolean background) {
method fromKarateJson (line 152) | public static ScenarioResult fromKarateJson(File workingDir, Feature f...
method toKarateJson (line 202) | public Map<String, Object> toKarateJson() {
method toInfoJson (line 238) | public Map<String, Object> toInfoJson() {
method toCucumberJson (line 258) | public Map<String, Object> toCucumberJson() {
method tagsToCucumberJson (line 272) | public static List<Map> tagsToCucumberJson(Collection<Tag> tags) {
method backgroundToCucumberJson (line 283) | public Map<String, Object> backgroundToCucumberJson() {
method ScenarioResult (line 297) | public ScenarioResult(Scenario scenario) {
method getScenario (line 301) | public Scenario getScenario() {
method getStepResults (line 305) | public List<StepResult> getStepResults() {
method getStepResultsNotHidden (line 309) | public List<StepResult> getStepResultsNotHidden() {
method isFailed (line 320) | public boolean isFailed() {
method getFailedStep (line 324) | public StepResult getFailedStep() {
method getError (line 328) | public Throwable getError() {
method getErrorMessage (line 332) | public String getErrorMessage() {
method getDurationNanos (line 336) | public long getDurationNanos() {
method getDurationMillis (line 340) | public double getDurationMillis() {
method getExecutorName (line 344) | public String getExecutorName() {
method setExecutorName (line 348) | public void setExecutorName(String executorName) {
method getStartTime (line 352) | public long getStartTime() {
method setStartTime (line 356) | public void setStartTime(long startTime) {
method getEndTime (line 360) | public long getEndTime() {
method setEndTime (line 364) | public void setEndTime(long endTime) {
method toString (line 368) | @Override
method ignoreFailedStep (line 373) | public void ignoreFailedStep() {
FILE: karate-core/src/main/java/com/intuit/karate/core/ScenarioRuntime.java
class ScenarioRuntime (line 46) | public class ScenarioRuntime implements Runnable {
method ScenarioRuntime (line 68) | public ScenarioRuntime(FeatureRuntime featureRuntime, Scenario scenari...
method initMagicVariables (line 113) | private Map<String, Object> initMagicVariables() {
method isFailed (line 141) | public boolean isFailed() {
method getCurrentStep (line 145) | public Step getCurrentStep() {
method isStopped (line 149) | public boolean isStopped() {
method isSkipBackground (line 153) | public boolean isSkipBackground() {
method setSkipBackground (line 157) | public void setSkipBackground(boolean skipBackground) {
method getEmbedFileName (line 161) | public String getEmbedFileName(ResourceType resourceType) {
method saveToFileAndCreateEmbed (line 166) | private Embed saveToFileAndCreateEmbed(byte[] bytes, ResourceType reso...
method embed (line 172) | public Embed embed(byte[] bytes, ResourceType resourceType) {
method embedVideo (line 181) | public Embed embedVideo(File file) {
method addCallResult (line 190) | public void addCallResult(FeatureResult fr) {
method getLogAppender (line 197) | public LogAppender getLogAppender() {
method stepBack (line 212) | public void stepBack() {
method stepReset (line 220) | public void stepReset() {
method stepProceed (line 228) | public void stepProceed() {
method nextStepIndex (line 232) | private int nextStepIndex() {
method evalAsStep (line 236) | public Result evalAsStep(String expression) {
method hotReload (line 246) | public boolean hotReload() {
method getScenarioInfo (line 270) | public Map<String, Object> getScenarioInfo() {
method logError (line 284) | protected void logError(String message) {
method evalConfigJs (line 293) | private void evalConfigJs(String js, String displayName) {
method isSelectedForExecution (line 313) | private static boolean isSelectedForExecution(FeatureRuntime fr, Scena...
method beforeRun (line 359) | public void beforeRun() {
method run (line 387) | @Override
method execute (line 425) | public StepResult execute(Step step) {
method afterRun (line 500) | public void afterRun() {
method addStepLogEmbedsAndCallResults (line 529) | private void addStepLogEmbedsAndCallResults() {
method toString (line 548) | @Override
method evaluateScenarioName (line 553) | public void evaluateScenarioName() {
FILE: karate-core/src/main/java/com/intuit/karate/core/Step.java
class Step (line 38) | public class Step {
method parseAndUpdateFrom (line 54) | public void parseAndUpdateFrom(String text) {
method getDebugInfo (line 73) | public String getDebugInfo() {
method isPrint (line 77) | public boolean isPrint() {
method isPrefixStar (line 81) | public boolean isPrefixStar() {
method getFeature (line 85) | public Feature getFeature() {
method Step (line 89) | public Step(Feature feature, int index) {
method Step (line 95) | public Step(Scenario scenario, int index) {
method fromKarateJson (line 101) | public static Step fromKarateJson(Scenario scenario, Map<String, Objec...
method toKarateJson (line 130) | public Map<String, Object> toKarateJson() {
method isBackground (line 154) | public boolean isBackground() {
method isOutline (line 158) | public boolean isOutline() {
method getIndex (line 162) | public int getIndex() {
method getLine (line 166) | public int getLine() {
method setLine (line 170) | public void setLine(int line) {
method getLineCount (line 174) | public int getLineCount() {
method getEndLine (line 178) | public int getEndLine() {
method setEndLine (line 182) | public void setEndLine(int endLine) {
method getPrefix (line 186) | public String getPrefix() {
method setPrefix (line 190) | public void setPrefix(String prefix) {
method getText (line 194) | public String getText() {
method setText (line 198) | public void setText(String text) {
method getDocString (line 202) | public String getDocString() {
method setDocString (line 206) | public void setDocString(String docString) {
method getTable (line 210) | public Table getTable() {
method setTable (line 214) | public void setTable(Table table) {
method getComments (line 218) | public List<String> getComments() {
method setComments (line 222) | public void setComments(List<String> comments) {
method isFake (line 226) | public boolean isFake() {
method isSetup (line 230) | public boolean isSetup() {
method toString (line 234) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/StepResult.java
class StepResult (line 39) | public class StepResult {
method getErrorMessage (line 53) | public String getErrorMessage() {
method appendToStepLog (line 61) | public void appendToStepLog(String log) {
method setStepLog (line 71) | public void setStepLog(String stepLog) {
method setCallResults (line 75) | public void setCallResults(List<FeatureResult> callResults) {
method addEmbeds (line 79) | public void addEmbeds(List<Embed> value) {
method setCallResultsFromKarateJson (line 88) | public void setCallResultsFromKarateJson(File workingDir, List<Map<Str...
method fromKarateJson (line 98) | public static StepResult fromKarateJson(File workingDir, Scenario scen...
method toKarateJson (line 122) | public Map<String, Object> toKarateJson() {
method tableToCucumberJson (line 149) | private static List<Map> tableToCucumberJson(Table table) {
method toCucumberJson (line 163) | public Map<String, Object> toCucumberJson() {
method docStringToCucumberJson (line 202) | private static Map<String, Object> docStringToCucumberJson(int line, S...
method setHidden (line 210) | public void setHidden(boolean hidden) {
method isHidden (line 214) | public boolean isHidden() {
method isWithCallResults (line 218) | public boolean isWithCallResults() {
method isStopped (line 222) | public boolean isStopped() {
method isFailed (line 226) | public boolean isFailed() {
method StepResult (line 230) | public StepResult(Step step, Result result) {
method getStep (line 235) | public Step getStep() {
method getResult (line 239) | public Result getResult() {
method getStepLog (line 243) | public String getStepLog() {
method getEmbeds (line 247) | public List<Embed> getEmbeds() {
method addEmbed (line 251) | public void addEmbed(Embed embed) {
method addCallResults (line 258) | public void addCallResults(List<FeatureResult> values) {
method getCallResults (line 265) | public List<FeatureResult> getCallResults() {
method isErrorIgnored (line 269) | public boolean isErrorIgnored() {
method setErrorIgnored (line 273) | public void setErrorIgnored(boolean errorIgnored) {
method getFailedReason (line 277) | public Throwable getFailedReason() {
method setFailedReason (line 281) | public void setFailedReason(Throwable failedReason) {
method toString (line 285) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/StepRuntime.java
class StepRuntime (line 42) | public class StepRuntime {
method StepRuntime (line 46) | private StepRuntime() {
class MethodPattern (line 50) | static class MethodPattern {
method MethodPattern (line 57) | MethodPattern(Method method, String regex) {
method match (line 75) | List<String> match(String text) {
method toString (line 89) | @Override
class MethodMatch (line 96) | public static class MethodMatch {
method MethodMatch (line 103) | MethodMatch(Method method, List<String> args) {
method convertArgs (line 108) | Object[] convertArgs(Object last) {
method getBySignatureAndArgs (line 129) | public static MethodMatch getBySignatureAndArgs(String methodReferen...
method getMethod (line 158) | public Method getMethod() {
method getArgs (line 162) | public List<String> getArgs() {
method toString (line 166) | @Override
method findMethodsMatching (line 217) | private static List<MethodMatch> findMethodsMatching(String text) {
method findMethodsByKeywords (line 228) | public static Collection<Method> findMethodsByKeywords(List<String> te...
method findMethodsByKeyword (line 236) | public static Collection<Method> findMethodsByKeyword(String text) {
method getElapsedTimeNanos (line 245) | private static long getElapsedTimeNanos(long startTime) {
method execute (line 249) | public static Result execute(Step step, Actions actions) {
FILE: karate-core/src/main/java/com/intuit/karate/core/SyncExecutorService.java
class SyncExecutorService (line 36) | public class SyncExecutorService extends AbstractExecutorService {
method shutdown (line 42) | @Override
method shutdownNow (line 47) | @Override
method isShutdown (line 52) | @Override
method isTerminated (line 57) | @Override
method awaitTermination (line 62) | @Override
method execute (line 68) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/Table.java
class Table (line 42) | public class Table {
type ColumnType (line 46) | enum ColumnType {
class Column (line 51) | class Column {
method Column (line 57) | Column(String key, int index, ColumnType type) {
method getDynamicExpression (line 71) | public String getDynamicExpression() {
method isDynamic (line 75) | public boolean isDynamic() {
method getKeys (line 79) | public Collection<String> getKeys() {
method getLineNumberForRow (line 83) | public int getLineNumberForRow(int i) {
method replace (line 87) | public Table replace(String token, String value) {
method getValueAsString (line 105) | public String getValueAsString(String key, int row) {
method fromKarateJson (line 113) | public static Table fromKarateJson(List<Map<String, Object>> tableRows) {
method toKarateJson (line 123) | public List<Map<String, Object>> toKarateJson() {
method Table (line 135) | public Table(List<List<String>> rows, List<Integer> lineNumbers) {
method getRows (line 160) | public List<List<String>> getRows() {
method getRowsAsMaps (line 164) | public List<Map<String, String>> getRowsAsMaps() {
method getRowsAsMapsConverted (line 178) | public List<Map<String, Object>> getRowsAsMapsConverted() {
method convert (line 192) | private static Object convert(String raw, Column col) {
method getExampleData (line 215) | public Map<String, Object> getExampleData(int exampleIndex) {
method toString (line 225) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/Tag.java
class Tag (line 34) | public class Tag {
method Tag (line 47) | public Tag(int line, String text) {
method getLine (line 65) | public int getLine() {
method getText (line 69) | public String getText() {
method getName (line 73) | public String getName() {
method getValues (line 77) | public List<String> getValues() {
method toString (line 81) | @Override
method hashCode (line 86) | @Override
method equals (line 91) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/TagResults.java
class TagResults (line 38) | public class TagResults {
method addFeatureResult (line 44) | public void addFeatureResult(FeatureResult fr) {
method toKarateJson (line 63) | public Map<String, Object> toKarateJson() {
FILE: karate-core/src/main/java/com/intuit/karate/core/Tags.java
class Tags (line 46) | public class Tags implements Iterable<Tag> {
method iterator (line 54) | @Override
class Values (line 59) | public static class Values {
method Values (line 64) | public Values(List<String> values) {
method isPresent (line 69) | public boolean isPresent() {
method isAnyOf (line 73) | public boolean isAnyOf(Object... args) {
method isAllOf (line 82) | public boolean isAllOf(Object... args) {
method isOnly (line 90) | public boolean isOnly(Object... args) {
method isEach (line 94) | public boolean isEach(Value v) {
method merge (line 109) | public static Tags merge(List<Tag>... lists) {
method Tags (line 119) | public Tags(Collection<Tag> in) {
method evaluate (line 134) | public boolean evaluate(String tagSelector, String karateEnv) {
method anyOf (line 165) | public boolean anyOf(Object... values) {
method allOf (line 174) | public boolean allOf(Object... values) {
method not (line 178) | public boolean not(Object... values) {
method valuesFor (line 182) | public Values valuesFor(String name) {
method contains (line 187) | public boolean contains(String tagText) {
method getTags (line 191) | public List<String> getTags() {
method getTagKeys (line 195) | public Collection<String> getTagKeys() {
method getTagValues (line 199) | public Map<String, List<String>> getTagValues() {
method getOriginal (line 203) | public Collection<Tag> getOriginal() {
method removeTagPrefix (line 207) | private static String removeTagPrefix(String s) {
method removeTagPrefixes (line 215) | private static Collection<String> removeTagPrefixes(Object... values) {
method fromKarateOptionsTags (line 223) | public static String fromKarateOptionsTags(List<String> tags) {
method fromKarateOptionsTags (line 230) | public static String fromKarateOptionsTags(String... tags) {
method toString (line 260) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/core/TimelineResults.java
class TimelineResults (line 42) | public class TimelineResults {
method addFeatureResult (line 49) | public void addFeatureResult(FeatureResult fr) {
method toKarateJson (line 83) | public Map<String, Object> toKarateJson() {
FILE: karate-core/src/main/java/com/intuit/karate/core/Variable.java
class Variable (line 46) | public class Variable {
type Type (line 50) | public static enum Type {
method Variable (line 71) | public Variable(Object o) {
method getValue (line 107) | public <T> T getValue() {
method isJsOrJavaFunction (line 111) | public boolean isJsOrJavaFunction() {
method isJavaFunction (line 115) | public boolean isJavaFunction() {
method isJsFunction (line 119) | public boolean isJsFunction() {
method isBytes (line 123) | public boolean isBytes() {
method isString (line 127) | public boolean isString() {
method isList (line 131) | public boolean isList() {
method isMap (line 135) | public boolean isMap() {
method isMapOrList (line 139) | public boolean isMapOrList() {
method isXml (line 143) | public boolean isXml() {
method isNumber (line 147) | public boolean isNumber() {
method isNull (line 151) | public boolean isNull() {
method isOther (line 155) | public boolean isOther() {
method isFeature (line 159) | public boolean isFeature() {
method isBoolean (line 163) | public boolean isBoolean() {
method isTrue (line 167) | public boolean isTrue() {
method getTypeString (line 171) | public String getTypeString() {
method getAsXml (line 175) | public Node getAsXml() {
method getValueAndConvertIfXmlToMap (line 192) | public Object getValueAndConvertIfXmlToMap() {
method getValueAndForceParsingAsJson (line 196) | public Object getValueAndForceParsingAsJson() {
method getAsByteArray (line 214) | public byte[] getAsByteArray() {
method getAsString (line 222) | public String getAsString() {
method getAsPrettyString (line 243) | public String getAsPrettyString() {
method getAsPrettyXmlString (line 255) | public String getAsPrettyXmlString() {
method getAsInt (line 259) | public int getAsInt() {
method copy (line 267) | public Variable copy(boolean deep) {
method toLowerCase (line 280) | public Variable toLowerCase() {
method isNotPresent (line 296) | public boolean isNotPresent() {
method toString (line 300) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/DevToolsDriver.java
class DevToolsDriver (line 62) | public abstract class DevToolsDriver implements Driver {
method nextId (line 90) | public int nextId() {
method DevToolsDriver (line 98) | protected DevToolsDriver(DriverOptions options, Command command, Strin...
method timeout (line 130) | @Override
method timeout (line 136) | @Override
method method (line 141) | public DevToolsMessage method(String method) {
method send (line 146) | public Map<String, Object> send(Map<String, Object> map) {
method send (line 152) | public void send(DevToolsMessage dtm) {
method sendAndWait (line 158) | public DevToolsMessage sendAndWait(DevToolsMessage dtm, Predicate<DevT...
method receive (line 182) | public void receive(DevToolsMessage dtm) {
method handleInterceptedRequest (line 257) | private void handleInterceptedRequest(DevToolsMessage dtm) {
method evalOnce (line 301) | private DevToolsMessage evalOnce(String expression, boolean quickly, b...
method eval (line 321) | protected DevToolsMessage eval(String expression) {
method evalQuickly (line 325) | protected DevToolsMessage evalQuickly(String expression) {
method evalForObjectId (line 329) | protected String evalForObjectId(String expression) {
method evalInternal (line 336) | private DevToolsMessage evalInternal(String expression, boolean quickl...
method retryIfEnabled (line 364) | protected void retryIfEnabled(String locator) {
method getRootNodeId (line 375) | protected int getRootNodeId() {
method elementId (line 379) | @Override
method elementIds (line 384) | @Override
method getOptions (line 395) | @Override
method attachAndActivate (line 400) | private void attachAndActivate(String targetId, boolean isFrame) {
method activate (line 411) | @Override
method initWindowIdAndState (line 416) | protected void initWindowIdAndState() {
method getDimensions (line 424) | @Override
method setDimensions (line 435) | @Override
method emulateDevice (line 449) | public void emulateDevice(int width, int height, String userAgent) {
method close (line 459) | @Override
method quit (line 465) | @Override
method isTerminated (line 481) | @Override
method setUrl (line 486) | @Override
method refresh (line 492) | @Override
method reload (line 497) | @Override
method history (line 502) | private void history(int delta) {
method back (line 515) | @Override
method forward (line 520) | @Override
method setWindowState (line 525) | private void setWindowState(String state) {
method maximize (line 542) | @Override
method minimize (line 547) | @Override
method fullscreen (line 552) | @Override
method click (line 557) | @Override
method select (line 564) | @Override
method select (line 571) | @Override
method submit (line 578) | @Override
method focus (line 584) | @Override
method clear (line 591) | @Override
method sendKey (line 597) | private void sendKey(Character c, int modifiers, String type, Integer ...
method input (line 632) | @Override
method actions (line 673) | @Override
method text (line 732) | @Override
method html (line 737) | @Override
method value (line 742) | @Override
method value (line 747) | @Override
method attribute (line 754) | @Override
method property (line 761) | @Override
method enabled (line 768) | @Override
method waitUntil (line 775) | @Override
method script (line 787) | @Override
method getTitle (line 792) | @Override
method getUrl (line 797) | @Override
method getCookies (line 802) | @Override
method cookie (line 808) | @Override
method cookie (line 822) | @Override
method deleteCookie (line 831) | @Override
method clearCookies (line 836) | @Override
method dialog (line 841) | @Override
method dialog (line 846) | @Override
method getDialogText (line 856) | @Override
method pdf (line 861) | @Override
method screenshot (line 868) | @Override
method position (line 873) | @Override
method position (line 878) | @Override
method screenshot (line 888) | @Override
method screenshotFull (line 916) | public byte[] screenshotFull() {
method getPages (line 932) | @Override
method switchPage (line 938) | @Override
method switchPage (line 959) | @Override
method switchFrame (line 975) | @Override
method switchFrame (line 993) | @Override
method getFrameContext (line 1007) | private Integer getFrameContext() {
method setExecutionContext (line 1016) | private boolean setExecutionContext(String objectId) { // locator just...
method getFrameTree (line 1092) | private List<Map> getFrameTree(List<Map> frames) {
method enableNetworkEvents (line 1108) | public void enableNetworkEvents() {
method enablePageEvents (line 1112) | public void enablePageEvents() {
method enableRuntimeEvents (line 1116) | public void enableRuntimeEvents() {
method intercept (line 1120) | public DevToolsMock intercept(Value value) {
method intercept (line 1126) | public DevToolsMock intercept(Map<String, Object> config) {
method inputFile (line 1148) | public void inputFile(String locator, String... relativePaths) {
method scriptAwait (line 1159) | public Object scriptAwait(String expression) {
FILE: karate-core/src/main/java/com/intuit/karate/driver/DevToolsMessage.java
class DevToolsMessage (line 40) | public class DevToolsMessage {
method getId (line 55) | public Integer getId() {
method setId (line 59) | public void setId(Integer id) {
method getTimeout (line 63) | public Integer getTimeout() {
method setTimeout (line 67) | public void setTimeout(Integer timeout) {
method getMethod (line 71) | public String getMethod() {
method methodIs (line 75) | public boolean methodIs(String method) {
method getParam (line 79) | public <T> T getParam(String path) {
method getResult (line 93) | public Variable getResult() {
method getResult (line 97) | public <T> T getResult(String path) {
method setResult (line 105) | public void setResult(Variable result) {
method toMap (line 109) | private static Map<String, Object> toMap(List<Map<String, Object>> lis...
method isResultError (line 119) | public boolean isResultError() {
method getResultVariable (line 130) | public Variable getResultVariable(String key) {
method getError (line 137) | public Map<String, Object> getError() {
method DevToolsMessage (line 141) | public DevToolsMessage(DevToolsDriver driver, String method) {
method DevToolsMessage (line 148) | public DevToolsMessage(DevToolsDriver driver, Map<String, Object> map) {
method param (line 179) | public DevToolsMessage param(String path, Object value) {
method params (line 187) | public DevToolsMessage params(Map<String, Object> map) {
method toMap (line 192) | public Map<String, Object> toMap() {
method sendWithoutWaiting (line 208) | public void sendWithoutWaiting() {
method send (line 212) | public DevToolsMessage send() {
method send (line 216) | public DevToolsMessage send(Predicate<DevToolsMessage> condition) {
method toString (line 220) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/DevToolsMock.java
class DevToolsMock (line 32) | public class DevToolsMock {
method DevToolsMock (line 36) | public DevToolsMock(MockHandler mock) {
method get (line 40) | public Object get(String name) {
FILE: karate-core/src/main/java/com/intuit/karate/driver/DevToolsWait.java
class DevToolsWait (line 33) | public class DevToolsWait {
method forEvent (line 75) | public static Predicate<DevToolsMessage> forEvent(String name) {
method DevToolsWait (line 79) | public DevToolsWait(DevToolsDriver driver, DriverOptions options) {
method setLogger (line 88) | public void setLogger(Logger logger) {
method setCondition (line 92) | public void setCondition(Predicate<DevToolsMessage> condition) {
method send (line 96) | public DevToolsMessage send(DevToolsMessage dtm, Predicate<DevToolsMes...
method receive (line 119) | public void receive(DevToolsMessage dtm) {
FILE: karate-core/src/main/java/com/intuit/karate/driver/DockerTarget.java
class DockerTarget (line 44) | public class DockerTarget implements Target {
method DockerTarget (line 56) | public DockerTarget(String dockerImage) {
method DockerTarget (line 60) | public DockerTarget(Map<String, Object> options) {
method setCommand (line 91) | public void setCommand(Function<Integer, String> command) {
method getCommand (line 95) | public Function<Integer, String> getCommand() {
method start (line 99) | @Override
method stop (line 135) | @Override
method getContainerPort (line 159) | private int getContainerPort(String containerId) {
method getContainerId (line 182) | public String getContainerId() {
FILE: karate-core/src/main/java/com/intuit/karate/driver/Driver.java
type Driver (line 47) | public interface Driver extends Plugin {
method start (line 49) | public static Driver start(String browserType) {
method start (line 53) | public static Driver start(Map<String, Object> options) {
method activate (line 59) | @AutoDef
method refresh (line 62) | @AutoDef
method reload (line 65) | @AutoDef
method back (line 68) | @AutoDef
method forward (line 71) | @AutoDef
method maximize (line 74) | @AutoDef
method minimize (line 77) | @AutoDef
method fullscreen (line 80) | @AutoDef
method close (line 83) | @AutoDef
method quit (line 86) | @AutoDef
method switchPage (line 89) | @AutoDef
method switchPage (line 92) | @AutoDef
method switchFrame (line 95) | @AutoDef
method switchFrame (line 98) | @AutoDef
method getUrl (line 101) | String getUrl();
method setUrl (line 103) | void setUrl(String url);
method getDimensions (line 105) | Map<String, Object> getDimensions();
method setDimensions (line 107) | void setDimensions(Map<String, Object> map);
method getTitle (line 109) | String getTitle();
method getPages (line 111) | List<String> getPages();
method getDialogText (line 113) | String getDialogText();
method screenshot (line 115) | @AutoDef
method screenshot (line 118) | @AutoDef
method cookie (line 123) | @AutoDef
method setCookies (line 126) | @AutoDef
method cookie (line 132) | @AutoDef
method deleteCookie (line 135) | @AutoDef
method clearCookies (line 138) | @AutoDef
method getCookies (line 141) | List<Map> getCookies();
method dialog (line 143) | @AutoDef
method dialog (line 146) | @AutoDef
method script (line 149) | @AutoDef
method waitUntil (line 152) | @AutoDef
method submit (line 155) | @AutoDef
method retry (line 158) | @AutoDef
method retry (line 163) | @AutoDef
method retry (line 168) | @AutoDef
method delay (line 174) | @AutoDef
method timeout (line 180) | @AutoDef
method timeout (line 183) | @AutoDef
method focus (line 188) | @AutoDef
method clear (line 191) | @AutoDef
method click (line 194) | @AutoDef
method input (line 197) | @AutoDef
method input (line 200) | @AutoDef
method input (line 205) | @AutoDef
method input (line 214) | @AutoDef
method select (line 226) | @AutoDef
method select (line 229) | @AutoDef
method value (line 232) | @AutoDef
method waitFor (line 235) | @AutoDef
method waitForUrl (line 240) | @AutoDef
method waitForText (line 245) | @AutoDef
method waitForEnabled (line 250) | @AutoDef
method waitForResultCount (line 255) | @AutoDef
method waitForResultCount (line 263) | @AutoDef
method waitForAny (line 271) | @AutoDef
method waitForAny (line 276) | @AutoDef
method waitUntil (line 281) | @AutoDef
method waitUntil (line 286) | @AutoDef
method locate (line 291) | @AutoDef
method locateAll (line 300) | @AutoDef
method locateAll (line 305) | @AutoDef
method scroll (line 317) | @AutoDef
method highlight (line 323) | @AutoDef
method highlight (line 328) | default Element highlight(String locator, int millis) {
method highlightAll (line 334) | @AutoDef
method highlightAll (line 339) | default void highlightAll(String locator, int millis) {
method rightOf (line 346) | @AutoDef
method leftOf (line 351) | @AutoDef
method above (line 356) | @AutoDef
method below (line 361) | @AutoDef
method near (line 366) | @AutoDef
method mouse (line 373) | @AutoDef
method mouse (line 378) | @AutoDef
method mouse (line 383) | @AutoDef
method keys (line 388) | @AutoDef
method actions (line 393) | @AutoDef
method html (line 398) | @AutoDef
method text (line 401) | @AutoDef
method value (line 404) | @AutoDef
method attribute (line 407) | @AutoDef
method property (line 410) | @AutoDef
method enabled (line 413) | @AutoDef
method exists (line 416) | @AutoDef
method optional (line 421) | @AutoDef
method position (line 426) | @AutoDef
method position (line 429) | @AutoDef
method screenshot (line 432) | @AutoDef
method screenshot (line 435) | @AutoDef
method script (line 440) | @AutoDef
method scriptAll (line 446) | @AutoDef
method scriptAll (line 452) | @AutoDef
method pdf (line 464) | @AutoDef
method isTerminated (line 469) | boolean isTerminated();
method getOptions (line 471) | DriverOptions getOptions();
method elementId (line 473) | Object elementId(String locator);
method elementIds (line 475) | List elementIds(String locator);
method methodNames (line 479) | @Override
method afterScenario (line 484) | @Override
method onFailure (line 489) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/DriverElement.java
class DriverElement (line 35) | public class DriverElement implements Element {
method DriverElement (line 42) | private DriverElement(Driver driver, String locator, Boolean exists) {
method locatorExists (line 48) | public static Element locatorExists(Driver driver, String locator) {
method locatorUnknown (line 52) | public static Element locatorUnknown(Driver driver, String locator) {
method getLocator (line 56) | @Override
method isPresent (line 61) | @Override
method setExists (line 69) | public void setExists(Boolean exists) {
method getPosition (line 73) | @Override
method screenshot (line 78) | @Override
method isEnabled (line 83) | @Override
method highlight (line 88) | @Override
method focus (line 93) | @Override
method clear (line 98) | @Override
method click (line 103) | @Override
method submit (line 108) | @Override
method scroll (line 114) | @Override
method mouse (line 120) | @Override
method input (line 125) | @Override
method input (line 130) | @Override
method input (line 135) | @Override
method select (line 140) | @Override
method select (line 145) | @Override
method switchFrame (line 150) | @Override
method delay (line 156) | @Override
method retry (line 162) | @Override
method retry (line 168) | @Override
method retry (line 174) | @Override
method waitFor (line 180) | @Override
method waitForText (line 186) | @Override
method waitUntil (line 191) | @Override
method script (line 196) | @Override
method scriptAll (line 201) | @Override
method thisLocator (line 207) | private String thisLocator() {
method optional (line 212) | @Override
method exists (line 223) | @Override
method locate (line 228) | @Override
method locateAll (line 237) | @Override
method refsToElements (line 244) | private List<Element> refsToElements(List<String> refs) {
method attribute (line 253) | @Override
method property (line 258) | @Override
method getHtml (line 265) | @Override
method setHtml (line 270) | @Override
method getText (line 275) | @Override
method setText (line 280) | @Override
method getValue (line 285) | @Override
method setValue (line 290) | @Override
method relationLocator (line 295) | private Element relationLocator(String relation) {
method getParent (line 302) | @Override
method getChildren (line 307) | @Override
method getFirstChild (line 316) | @Override
method getLastChild (line 321) | @Override
method getPreviousSibling (line 326) | @Override
method getNextSibling (line 331) | @Override
method rightOf (line 336) | @Override
method leftOf (line 341) | @Override
method above (line 346) | @Override
method below (line 351) | @Override
method near (line 356) | @Override
method toString (line 361) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/DriverMouse.java
class DriverMouse (line 36) | public class DriverMouse implements Mouse {
method DriverMouse (line 40) | public DriverMouse(Driver driver) {
method moveAction (line 48) | private Map<String, Object> moveAction(int x, int y) {
method duration (line 60) | @Override
method pause (line 66) | @Override
method move (line 75) | @Override
method move (line 85) | @Override
method offset (line 94) | @Override
method down (line 113) | @Override
method up (line 122) | @Override
method submit (line 131) | @Override
method click (line 137) | @Override
method doubleClick (line 142) | @Override
method go (line 149) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/DriverOptions.java
class DriverOptions (line 62) | public class DriverOptions {
method isRetryEnabled (line 123) | public boolean isRetryEnabled() {
method getPreSubmitHash (line 127) | public String getPreSubmitHash() {
method isRemoteHost (line 131) | public boolean isRemoteHost() {
method isHostDockerHost (line 135) | public boolean isHostDockerHost() {
method setPreSubmitHash (line 139) | public void setPreSubmitHash(String preSubmitHash) {
method get (line 143) | private <T> T get(String key, T defaultValue) {
method DriverOptions (line 148) | public DriverOptions(Map<String, Object> options, ScenarioRuntime sr, ...
method resolvePort (line 217) | private int resolvePort(int defaultPort) {
method getHttp (line 232) | public Http getHttp() {
method getUrlBase (line 244) | private String getUrlBase() {
method arg (line 255) | public void arg(String arg) {
method startProcess (line 259) | public Command startProcess() {
method startProcess (line 263) | public Command startProcess(Consumer<String> listener) {
method start (line 291) | public static Driver start(Map<String, Object> options, ScenarioRuntim...
method driverRunners (line 327) | public static Map<String, DriverRunner> driverRunners() {
method getSession (line 344) | private Map<String, Object> getSession(String browserName) {
method getWebDriverSessionPayload (line 364) | public Map<String, Object> getWebDriverSessionPayload() {
method preProcessWildCard (line 383) | public static String preProcessWildCard(String locator) {
method selector (line 434) | public static String selector(String locator) {
method selector (line 438) | public static String selector(String locator, String contextNode) {
method setTimeout (line 460) | public void setTimeout(Integer timeout) {
method getTimeout (line 464) | public int getTimeout() {
method setRetryInterval (line 471) | public void setRetryInterval(Integer retryInterval) {
method getRetryInterval (line 475) | public int getRetryInterval() {
method getRetryCount (line 487) | public int getRetryCount() {
method retry (line 499) | public <T> T retry(Supplier<T> action, Predicate<T> condition, String ...
method wrapInFunctionInvoke (line 523) | public static String wrapInFunctionInvoke(String text) {
method highlightFn (line 531) | private static String highlightFn(int millis) {
method highlight (line 535) | public String highlight(String locator, int millis) {
method highlightAll (line 541) | public String highlightAll(String locator, int millis) {
method optionSelector (line 545) | public String optionSelector(String locator, String text) {
method optionSelector (line 562) | public String optionSelector(String id, int index) {
method fun (line 570) | private String fun(String expression) {
method scriptSelector (line 584) | public String scriptSelector(String locator, String expression) {
method scriptSelector (line 588) | public String scriptSelector(String locator, String expression, String...
method scriptAllSelector (line 593) | public String scriptAllSelector(String locator, String expression) {
method scriptAllSelector (line 599) | public String scriptAllSelector(String locator, String expression, Str...
method sleep (line 619) | public void sleep() {
method sleep (line 623) | public void sleep(int millis) {
method getRelativePositionJs (line 635) | public static String getRelativePositionJs(String locator) {
method getPositionJs (line 641) | public static String getPositionJs(String locator) {
method newMapWithSelectedKeys (line 648) | public Map<String, Object> newMapWithSelectedKeys(Map<String, Object> ...
method disableRetry (line 659) | public void disableRetry() {
method enableRetry (line 665) | public void enableRetry(Integer count, Integer interval) {
method waitUntil (line 671) | public Element waitUntil(Driver driver, String locator, String express...
method waitForUrl (line 683) | public String waitForUrl(Driver driver, String expected) {
method waitForAny (line 687) | public Element waitForAny(Driver driver, String... locators) {
method optional (line 720) | public Element optional(Driver driver, String locator) {
method karateLocator (line 731) | public static String karateLocator(String karateRef) {
method focusJs (line 735) | public String focusJs(String locator) {
method findAll (line 739) | public List<Element> findAll(Driver driver, String locator) {
FILE: karate-core/src/main/java/com/intuit/karate/driver/DriverRunner.java
type DriverRunner (line 30) | @FunctionalInterface
method start (line 33) | D start(Map<String, Object> options, ScenarioRuntime sr);
FILE: karate-core/src/main/java/com/intuit/karate/driver/Element.java
type Element (line 33) | public interface Element {
method getLocator (line 35) | String getLocator();
method isPresent (line 37) | boolean isPresent();
method isEnabled (line 39) | boolean isEnabled();
method getPosition (line 41) | Map<String, Object> getPosition();
method screenshot (line 43) | byte[] screenshot();
method highlight (line 45) | Element highlight();
method focus (line 47) | Element focus();
method clear (line 49) | Element clear();
method click (line 51) | Element click();
method submit (line 53) | Element submit();
method scroll (line 55) | Element scroll();
method mouse (line 57) | Mouse mouse();
method input (line 59) | Element input(String value);
method input (line 61) | Element input(String[] values);
method input (line 63) | Element input(String[] values, int delay);
method select (line 65) | Element select(String text);
method select (line 67) | Element select(int index);
method switchFrame (line 69) | Element switchFrame();
method delay (line 71) | Element delay(int millis);
method retry (line 73) | Element retry();
method retry (line 75) | Element retry(int count);
method retry (line 77) | Element retry(Integer count, Integer interval);
method waitFor (line 79) | Element waitFor();
method waitUntil (line 81) | Element waitUntil(String expression);
method waitForText (line 83) | Element waitForText(String text);
method script (line 85) | Object script(String expression);
method scriptAll (line 87) | Object scriptAll(String locator, String expression);
method optional (line 89) | Element optional(String locator);
method exists (line 91) | boolean exists(String locator);
method locate (line 93) | Element locate(String locator);
method locateAll (line 95) | List<Element> locateAll(String locator);
method getHtml (line 97) | String getHtml();
method setHtml (line 99) | void setHtml(String html);
method getText (line 101) | String getText();
method setText (line 103) | void setText(String text);
method getValue (line 105) | String getValue();
method setValue (line 107) | void setValue(String value);
method attribute (line 109) | String attribute(String name);
method property (line 111) | String property(String name);
method getParent (line 113) | Element getParent();
method getFirstChild (line 115) | Element getFirstChild();
method getLastChild (line 117) | Element getLastChild();
method getPreviousSibling (line 119) | Element getPreviousSibling();
method getNextSibling (line 121) | Element getNextSibling();
method getChildren (line 123) | List<Element> getChildren();
method rightOf (line 125) | Finder rightOf();
method leftOf (line 127) | Finder leftOf();
method above (line 129) | Finder above();
method below (line 131) | Finder below();
method near (line 133) | Finder near();
FILE: karate-core/src/main/java/com/intuit/karate/driver/ElementFinder.java
class ElementFinder (line 33) | public class ElementFinder implements Finder {
type Type (line 35) | public static enum Type {
method ElementFinder (line 49) | public ElementFinder(Driver driver, String fromLocator, Type type) {
method forLoopChunk (line 55) | private static String forLoopChunk(ElementFinder.Type type) {
method exitCondition (line 70) | public static String exitCondition(String findTag) {
method findScript (line 90) | private static String findScript(Driver driver, String locator, Elemen...
method getDebugString (line 111) | private String getDebugString() {
method find (line 115) | @Override
method find (line 125) | @Override
method getValue (line 131) | @Override
method clear (line 136) | @Override
method input (line 141) | @Override
method select (line 146) | @Override
method select (line 151) | @Override
method click (line 156) | @Override
method highlight (line 161) | @Override
method retry (line 166) | @Override
method retry (line 171) | @Override
method retry (line 176) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/Finder.java
type Finder (line 30) | public interface Finder {
method input (line 32) | Element input(String value);
method select (line 34) | Element select(String value);
method select (line 36) | Element select(int index);
method click (line 38) | Element click();
method getValue (line 40) | String getValue();
method clear (line 42) | Element clear();
method find (line 44) | Element find();
method find (line 46) | Element find(String tag);
method highlight (line 48) | Element highlight();
method retry (line 50) | Element retry();
method retry (line 52) | Element retry(int count);
method retry (line 54) | Element retry(Integer count, Integer interval);
FILE: karate-core/src/main/java/com/intuit/karate/driver/Frame.java
class Frame (line 30) | public class Frame {
method Frame (line 36) | public Frame(String id, String url, String name) {
method toString (line 42) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/Input.java
class Input (line 34) | public class Input {
method Input (line 47) | public Input(String chars) {
method hasNext (line 51) | public boolean hasNext() {
method getKeyCodesToRelease (line 55) | public List<Integer> getKeyCodesToRelease() {
method updateModifiers (line 76) | private void updateModifiers(char c) {
method next (line 99) | public char next() {
method getModifierFlags (line 105) | public int getModifierFlags() {
FILE: karate-core/src/main/java/com/intuit/karate/driver/Key.java
class Key (line 30) | public class Key {
FILE: karate-core/src/main/java/com/intuit/karate/driver/Keys.java
class Keys (line 33) | public class Keys {
method Keys (line 37) | public Keys(Driver driver) {
method code (line 41) | public static Integer code(char c) {
method keyValue (line 45) | public static String keyValue(char c) {
method isNormal (line 49) | public static boolean isNormal(char c) {
method isModifier (line 53) | public static boolean isModifier(char c) {
method keyIdentifier (line 65) | public static String keyIdentifier(char c) {
method put (line 132) | private static void put(char c, int code, String value) {
FILE: karate-core/src/main/java/com/intuit/karate/driver/MissingElement.java
class MissingElement (line 34) | public class MissingElement implements Element {
method MissingElement (line 39) | public MissingElement(Driver driver, String locator) {
method getLocator (line 44) | @Override
method isPresent (line 49) | @Override
method isEnabled (line 54) | @Override
method getPosition (line 59) | @Override
method screenshot (line 64) | @Override
method highlight (line 69) | @Override
method focus (line 74) | @Override
method clear (line 79) | @Override
method click (line 84) | @Override
method submit (line 89) | @Override
method scroll (line 94) | @Override
method mouse (line 99) | @Override
method input (line 104) | @Override
method input (line 109) | @Override
method input (line 114) | @Override
method select (line 119) | @Override
method select (line 124) | @Override
method switchFrame (line 129) | @Override
method delay (line 134) | @Override
method retry (line 140) | @Override
method retry (line 145) | @Override
method retry (line 150) | @Override
method waitFor (line 155) | @Override
method waitForText (line 160) | @Override
method waitUntil (line 165) | @Override
method script (line 170) | @Override
method scriptAll (line 175) | @Override
method optional (line 180) | @Override
method exists (line 185) | @Override
method locate (line 190) | @Override
method locateAll (line 195) | @Override
method attribute (line 200) | @Override
method property (line 205) | @Override
method getHtml (line 210) | @Override
method setHtml (line 215) | @Override
method getText (line 220) | @Override
method setText (line 225) | @Override
method getValue (line 230) | @Override
method setValue (line 235) | @Override
method getParent (line 240) | @Override
method getChildren (line 245) | @Override
method getFirstChild (line 250) | @Override
method getLastChild (line 255) | @Override
method getPreviousSibling (line 260) | @Override
method getNextSibling (line 265) | @Override
method rightOf (line 270) | @Override
method leftOf (line 275) | @Override
method above (line 280) | @Override
method below (line 285) | @Override
method near (line 290) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/MissingFinder.java
class MissingFinder (line 30) | public class MissingFinder implements Finder {
method MissingFinder (line 34) | public MissingFinder(MissingElement element) {
method input (line 38) | @Override
method select (line 43) | @Override
method select (line 48) | @Override
method click (line 53) | @Override
method getValue (line 58) | @Override
method clear (line 63) | @Override
method find (line 68) | @Override
method find (line 73) | @Override
method highlight (line 78) | @Override
method retry (line 83) | @Override
method retry (line 88) | @Override
method retry (line 93) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/Mouse.java
type Mouse (line 30) | public interface Mouse {
method move (line 32) | Mouse move(String locator);
method move (line 34) | Mouse move(Number x, Number y);
method offset (line 36) | Mouse offset(Number x, Number y);
method down (line 38) | Mouse down();
method up (line 40) | Mouse up();
method submit (line 42) | Mouse submit();
method click (line 44) | Mouse click();
method doubleClick (line 46) | Mouse doubleClick();
method go (line 48) | Mouse go();
method duration (line 50) | Mouse duration(Integer duration);
method pause (line 52) | Mouse pause(Integer duration);
FILE: karate-core/src/main/java/com/intuit/karate/driver/Target.java
type Target (line 33) | public interface Target {
method start (line 35) | Map<String, Object> start(ScenarioRuntime sr);
method stop (line 37) | Map<String, Object> stop(ScenarioRuntime sr);
FILE: karate-core/src/main/java/com/intuit/karate/driver/WebDriver.java
class WebDriver (line 41) | public abstract class WebDriver implements Driver {
method WebDriver (line 55) | protected WebDriver(DriverOptions options) {
method timeout (line 77) | @Override
method timeout (line 85) | @Override
method getSessionId (line 90) | public String getSessionId() {
method getHttp (line 95) | public Http getHttp() {
method getSubmitHash (line 99) | private String getSubmitHash() {
method retryIfEnabled (line 103) | protected <T> T retryIfEnabled(String locator, Supplier<T> action) {
method isJavaScriptError (line 125) | protected boolean isJavaScriptError(Response res) {
method isLocatorError (line 130) | protected boolean isLocatorError(Response res) {
method isCookieError (line 134) | protected boolean isCookieError(Response res) {
method evalLocator (line 138) | private Element evalLocator(String locator, String dotExpression) {
method evalFocus (line 144) | private Element evalFocus(String locator) {
method eval (line 150) | protected Variable eval(String expression, List args) {
method eval (line 166) | protected Variable eval(String expression) {
method getElementKeys (line 170) | protected List<String> getElementKeys() {
method getJsonForInput (line 177) | protected String getJsonForInput(String text) {
method getJsonForLegacyInput (line 181) | protected String getJsonForLegacyInput(String text) {
method getJsonForHandle (line 185) | protected String getJsonForHandle(String text) {
method getJsonForFrame (line 189) | protected String getJsonForFrame(String text) {
method selectorPayload (line 193) | protected String selectorPayload(String locator) {
method elementId (line 206) | @Override
method elementIds (line 232) | @Override
method getOptions (line 241) | @Override
method setUrl (line 246) | @Override
method getDimensions (line 252) | @Override
method setDimensions (line 257) | @Override
method refresh (line 262) | @Override
method reload (line 267) | @Override
method back (line 273) | @Override
method forward (line 278) | @Override
method maximize (line 283) | @Override
method minimize (line 288) | @Override
method fullscreen (line 293) | @Override
method focus (line 298) | @Override
method clear (line 303) | @Override
method input (line 308) | @Override
method click (line 341) | @Override
method submit (line 346) | @Override
method select (line 352) | @Override
method select (line 361) | @Override
method actions (line 370) | @Override
method close (line 375) | @Override
method isTerminated (line 381) | @Override
method isSpecCompliant (line 386) | public boolean isSpecCompliant() {
method checkForSpecCompliance (line 390) | public boolean checkForSpecCompliance() {
method quit (line 394) | @Override
method getUrl (line 414) | @Override
method evalReturn (line 419) | private String evalReturn(String locator, String dotExpression) {
method html (line 423) | @Override
method text (line 428) | @Override
method value (line 433) | @Override
method value (line 438) | @Override
method attribute (line 443) | @Override
method property (line 448) | @Override
method position (line 453) | @Override
method position (line 458) | @Override
method enabled (line 464) | @Override
method prefixReturn (line 470) | private String prefixReturn(String expression) {
method waitUntil (line 474) | @Override
method script (line 486) | @Override
method getTitle (line 492) | @Override
method getCookies (line 497) | @Override
method cookie (line 502) | @Override
method cookie (line 507) | @Override
method deleteCookie (line 515) | @Override
method clearCookies (line 520) | @Override
method dialog (line 525) | @Override
method getDialogText (line 530) | @Override
method dialog (line 535) | @Override
method screenshot (line 545) | @Override
method screenshot (line 550) | @Override
method getPages (line 568) | @Override
method switchPage (line 573) | @Override
method switchPage (line 594) | @Override
method switchFrame (line 603) | @Override
method switchFrame (line 613) | @Override
method getDecoder (line 636) | protected Base64.Decoder getDecoder() {
method pdf (line 640) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/appium/AndroidDriver.java
class AndroidDriver (line 33) | public class AndroidDriver extends AppiumDriver {
method AndroidDriver (line 37) | protected AndroidDriver(MobileDriverOptions options) {
method start (line 41) | public static AndroidDriver start(Map<String, Object> map, ScenarioRun...
method activate (line 54) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/appium/AppiumDriver.java
class AppiumDriver (line 46) | public abstract class AppiumDriver extends WebDriver {
method AppiumDriver (line 50) | protected AppiumDriver(MobileDriverOptions options) {
method attribute (line 57) | @Override
method selectorPayload (line 63) | @Override
method click (line 87) | @Override
method setContext (line 94) | public void setContext(String context) {
method hideKeyboard (line 100) | public void hideKeyboard() {
method startRecordingScreen (line 104) | public String startRecordingScreen() {
method startRecordingScreen (line 108) | public String startRecordingScreen(Map<String, Object> payload) {
method stopRecordingScreen (line 114) | public String stopRecordingScreen() {
method stopRecordingScreen (line 118) | public String stopRecordingScreen(Map<String, Object> payload) {
method saveRecordingScreen (line 124) | public void saveRecordingScreen(String fileName, boolean embed) {
method saveRecordingScreen (line 140) | public void saveRecordingScreen(String fileName) {
method text (line 144) | @Override
method getDecoder (line 150) | @Override
method close (line 155) | @Override
method script (line 160) | @Override
method script (line 168) | public Object script(String expression, List<Map<String, Object>> args) {
method script (line 172) | public Object script(String expression, Map<String, Object> args) {
method retryIfEnabled (line 178) | @Override
method getOptions (line 189) | @Override
method waitForText (line 197) | @Override
method clear (line 211) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/appium/IosDriver.java
class IosDriver (line 32) | public class IosDriver extends AppiumDriver {
method IosDriver (line 36) | public IosDriver(MobileDriverOptions options) {
method start (line 40) | public static IosDriver start(Map<String, Object> map, ScenarioRuntime...
method activate (line 46) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/appium/MobileDriverOptions.java
class MobileDriverOptions (line 40) | public class MobileDriverOptions extends DriverOptions {
method MobileDriverOptions (line 42) | public MobileDriverOptions(Map<String, Object> options, ScenarioRuntim...
method isWebSession (line 46) | public boolean isWebSession() {
method waitForAny (line 52) | @Override
method optional (line 91) | @Override
method getBrowserName (line 113) | protected static String getBrowserName(Map<String, Object> sessionPayl...
FILE: karate-core/src/main/java/com/intuit/karate/driver/chrome/Chrome.java
class Chrome (line 48) | public class Chrome extends DevToolsDriver {
method Chrome (line 58) | public Chrome(DriverOptions options, Command command, String webSocket...
method start (line 62) | public static Chrome start(Map<String, Object> map, ScenarioRuntime sr) {
method start (line 117) | public static Chrome start(String chromeExecutablePath, boolean headle...
method start (line 124) | public static Chrome start(Map<String, Object> options) {
method start (line 134) | public static Chrome start() {
method startHeadless (line 138) | public static Chrome startHeadless() {
FILE: karate-core/src/main/java/com/intuit/karate/driver/chrome/ChromeWebDriver.java
class ChromeWebDriver (line 37) | public class ChromeWebDriver extends WebDriver {
method ChromeWebDriver (line 41) | public ChromeWebDriver(DriverOptions options) {
method start (line 45) | public static ChromeWebDriver start(Map<String, Object> map, ScenarioR...
method activate (line 54) | @Override
method isJavaScriptError (line 71) | @Override
method isLocatorError (line 77) | @Override
method isCookieError (line 83) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/firefox/GeckoWebDriver.java
class GeckoWebDriver (line 37) | public class GeckoWebDriver extends WebDriver {
method GeckoWebDriver (line 41) | public GeckoWebDriver(DriverOptions options) {
method start (line 45) | public static GeckoWebDriver start(Map<String, Object> map, ScenarioRu...
method getJsonForFrame (line 51) | @Override
method activate (line 56) | @Override
method quit (line 73) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/microsoft/EdgeChromium.java
class EdgeChromium (line 48) | public class EdgeChromium extends DevToolsDriver {
method EdgeChromium (line 58) | public EdgeChromium(DriverOptions options, Command command, String web...
method start (line 62) | public static EdgeChromium start(Map<String, Object> map, ScenarioRunt...
method start (line 119) | public static EdgeChromium start(String chromeExecutablePath, boolean ...
method start (line 126) | public static EdgeChromium start(Map<String, Object> options) {
method start (line 136) | public static EdgeChromium start() {
method startHeadless (line 140) | public static EdgeChromium startHeadless() {
FILE: karate-core/src/main/java/com/intuit/karate/driver/microsoft/IeWebDriver.java
class IeWebDriver (line 35) | public class IeWebDriver extends WebDriver {
method IeWebDriver (line 39) | public IeWebDriver(DriverOptions options) {
method start (line 43) | public static IeWebDriver start(Map<String, Object> map, ScenarioRunti...
method activate (line 49) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/microsoft/MsEdgeDriver.java
class MsEdgeDriver (line 35) | public class MsEdgeDriver extends WebDriver {
method MsEdgeDriver (line 39) | public MsEdgeDriver(DriverOptions options) {
method start (line 43) | public static MsEdgeDriver start(Map<String, Object> map, ScenarioRunt...
method activate (line 49) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/microsoft/MsWebDriver.java
class MsWebDriver (line 36) | public class MsWebDriver extends WebDriver {
method MsWebDriver (line 40) | public MsWebDriver(DriverOptions options) {
method start (line 44) | public static MsWebDriver start(Map<String, Object> map, ScenarioRunti...
method getJsonForInput (line 50) | @Override
method activate (line 55) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/microsoft/WinAppDriver.java
class WinAppDriver (line 38) | public class WinAppDriver extends WebDriver {
method WinAppDriver (line 42) | public WinAppDriver(DriverOptions options) {
method start (line 46) | public static WinAppDriver start(Map<String, Object> map, ScenarioRunt...
method activate (line 53) | @Override
method getElementSelector (line 58) | private String getElementSelector(String id) {
method elementId (line 72) | @Override
method click (line 78) | @Override
method text (line 85) | @Override
method getJsonForInput (line 91) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/playwright/PlaywrightDriver.java
class PlaywrightDriver (line 60) | public class PlaywrightDriver implements Driver {
method lockAndWait (line 79) | private void lockAndWait() {
method unlockAndProceed (line 89) | protected void unlockAndProceed() {
method nextId (line 98) | public int nextId() {
method waitSync (line 102) | public void waitSync() {
method start (line 106) | public static PlaywrightDriver start(Map<String, Object> map, Scenario...
method PlaywrightDriver (line 149) | public PlaywrightDriver(DriverOptions options, Command command, String...
method method (line 173) | private PlaywrightMessage method(String method, String guid) {
method send (line 177) | public void send(PlaywrightMessage pwm) {
method page (line 194) | private PlaywrightMessage page(String method) {
method frame (line 198) | private PlaywrightMessage frame(String method) {
class Frame (line 202) | private static class Frame {
method Frame (line 208) | Frame(String frameGuid, String url, String name) {
method receive (line 216) | public void receive(PlaywrightMessage pwm) {
method sendAndWait (line 290) | public PlaywrightMessage sendAndWait(PlaywrightMessage pwm, Predicate<...
method getOptions (line 304) | @Override
method timeout (line 309) | @Override
method timeout (line 315) | @Override
method evalOnce (line 322) | private PlaywrightMessage evalOnce(String expression, boolean quickly,...
method eval (line 337) | private PlaywrightMessage eval(String expression) {
method eval (line 341) | private PlaywrightMessage eval(String expression, boolean quickly) {
method script (line 359) | @Override
method elementId (line 364) | @Override
method elementIds (line 369) | @Override
method retryIfEnabled (line 374) | private void retryIfEnabled(String locator) {
method setUrl (line 385) | @Override
method activate (line 390) | @Override
method refresh (line 395) | @Override
method reload (line 400) | @Override
method back (line 405) | @Override
method forward (line 410) | @Override
method maximize (line 415) | @Override
method minimize (line 420) | @Override
method fullscreen (line 425) | @Override
method close (line 430) | @Override
method quit (line 435) | @Override
method property (line 449) | @Override
method html (line 455) | @Override
method text (line 460) | @Override
method value (line 465) | @Override
method getUrl (line 470) | @Override
method setDimensions (line 475) | @Override
method getTitle (line 480) | @Override
method click (line 485) | @Override
method value (line 492) | @Override
method attribute (line 499) | @Override
method enabled (line 505) | @Override
method waitUntil (line 513) | @Override
method submit (line 525) | @Override
method focus (line 531) | @Override
method clear (line 538) | @Override
method position (line 544) | @Override
method position (line 549) | @Override
method evalFrame (line 559) | private PlaywrightMessage evalFrame(String frameGuid, String expressio...
method switchPage (line 566) | @Override
method switchPage (line 592) | @Override
method waitForFrame (line 604) | private void waitForFrame(String previousFrame) {
method switchFrame (line 614) | @Override
method switchFrame (line 628) | @Override
method getDimensions (line 648) | @Override
method getPages (line 654) | @Override
method getDialogText (line 659) | @Override
method screenshot (line 664) | @Override
method cookie (line 669) | @Override
method cookie (line 683) | @Override
method deleteCookie (line 692) | @Override
method clearCookies (line 705) | @Override
method getCookies (line 710) | @Override
method dialog (line 715) | @Override
method dialog (line 720) | @Override
method input (line 726) | @Override
method actions (line 756) | @Override
method select (line 816) | @Override
method select (line 823) | @Override
method screenshot (line 830) | @Override
method pdf (line 845) | @Override
method isTerminated (line 855) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/playwright/PlaywrightMessage.java
class PlaywrightMessage (line 40) | public class PlaywrightMessage {
method sendWithoutWaiting (line 54) | public void sendWithoutWaiting() {
method send (line 58) | public PlaywrightMessage send() {
method send (line 62) | public PlaywrightMessage send(Predicate<PlaywrightMessage> condition) {
method methodIs (line 66) | public boolean methodIs(String method) {
method getTimeout (line 70) | public Integer getTimeout() {
method setTimeout (line 74) | public void setTimeout(Integer timeout) {
method param (line 78) | public PlaywrightMessage param(String path, Object value) {
method params (line 86) | public PlaywrightMessage params(Json json) {
method params (line 91) | public PlaywrightMessage params(Map<String, Object> map) {
method getParam (line 96) | public <T> T getParam(String path) {
method paramHas (line 103) | public <T> boolean paramHas(String path, T expected) {
method getResult (line 111) | public Json getResult() {
method getResult (line 115) | public <T> T getResult(String path) {
method getResultValue (line 122) | public <T> T getResultValue() {
method recurse (line 130) | private static Object recurse(Map<String, Object> raw) {
method isError (line 158) | public boolean isError() {
method getError (line 162) | public Json getError() {
method PlaywrightMessage (line 166) | public PlaywrightMessage(PlaywrightDriver driver, String method, Strin...
method PlaywrightMessage (line 174) | public PlaywrightMessage(PlaywrightDriver driver, Map<String, Object> ...
method toMap (line 196) | public Map<String, Object> toMap() {
method getId (line 209) | public Integer getId() {
method setId (line 213) | public void setId(Integer id) {
method getGuid (line 217) | public String getGuid() {
method getMethod (line 221) | public String getMethod() {
method toString (line 225) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/driver/playwright/PlaywrightWait.java
class PlaywrightWait (line 34) | public class PlaywrightWait {
method PlaywrightWait (line 47) | public PlaywrightWait(PlaywrightDriver driver, DriverOptions options) {
method setLogger (line 56) | public void setLogger(Logger logger) {
method send (line 60) | public PlaywrightMessage send(PlaywrightMessage pwm, Predicate<Playwri...
method receive (line 83) | public void receive(PlaywrightMessage pwm) {
FILE: karate-core/src/main/java/com/intuit/karate/driver/safari/SafariWebDriver.java
class SafariWebDriver (line 37) | public class SafariWebDriver extends WebDriver {
method SafariWebDriver (line 41) | public SafariWebDriver(DriverOptions options) {
method start (line 45) | public static SafariWebDriver start(Map<String, Object> map, ScenarioR...
method setDimensions (line 51) | @Override
method activate (line 66) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/graal/JsArray.java
class JsArray (line 33) | public class JsArray implements ProxyArray {
method JsArray (line 37) | public JsArray(Object[] array) {
method get (line 41) | @Override
method set (line 46) | @Override
method getSize (line 51) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/graal/JsEngine.java
class JsEngine (line 49) | public class JsEngine {
method initialValue (line 63) | @Override
method createContext (line 69) | private static Context createContext(Engine engine) {
method evalGlobal (line 84) | public static JsValue evalGlobal(String src) {
method evalGlobal (line 88) | public static JsValue evalGlobal(InputStream is) {
method global (line 92) | public static JsEngine global() {
method remove (line 96) | public static void remove() {
method local (line 100) | public static JsEngine local() {
method JsEngine (line 110) | private JsEngine(Context context) {
method copy (line 115) | public JsEngine copy() {
method attach (line 128) | public Value attach(Value value) {
method attachAll (line 138) | public Object attachAll(Object o) {
method eval (line 156) | public JsValue eval(InputStream is) {
method eval (line 160) | public JsValue eval(File file) {
method eval (line 164) | public JsValue eval(String exp) {
method evalForValue (line 168) | public Value evalForValue(String exp) {
method put (line 172) | public void put(String key, Object value) {
method remove (line 176) | public void remove(String key) {
method putAll (line 180) | public void putAll(Map<String, Object> map) {
method get (line 184) | public JsValue get(String key) {
method execute (line 191) | public static Object execute(ProxyExecutable function, Object... args) {
method execute (line 199) | public static Value execute(Value function, Object... args) {
method evalWith (line 206) | public Value evalWith(Value value, String src, boolean returnValue) {
method evalWith (line 210) | public Value evalWith(Map<String, Object> variables, String src, boole...
method evalWith (line 214) | public Value evalWith(Set<String> names, Function<String, Object> getV...
method fromJsEvalException (line 230) | public static KarateException fromJsEvalException(String js, Exception...
method toString (line 256) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/graal/JsFunction.java
class JsFunction (line 38) | public abstract class JsFunction implements ProxyObject {
method JsFunction (line 46) | protected JsFunction(Value v) {
method wrap (line 50) | public static ProxyExecutable wrap(Value value) {
method getValue (line 54) | public Value getValue() {
method putMember (line 58) | @Override
method hasMember (line 63) | @Override
method getMemberKeys (line 68) | @Override
method getMember (line 73) | @Override
method removeMember (line 78) | @Override
class Executable (line 83) | public static class Executable extends JsFunction implements ProxyExec...
method Executable (line 88) | protected Executable(Value value) {
method Executable (line 92) | protected Executable(Value value, boolean lock) {
method execute (line 98) | public Object execute(JsEngine je, Object... args) {
method execute (line 107) | @Override
class Instantiable (line 129) | protected static class Instantiable extends Executable implements Prox...
method Instantiable (line 131) | protected Instantiable(Value value) {
method newInstance (line 135) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/graal/JsLambda.java
class JsLambda (line 34) | public class JsLambda extends JsFunction.Instantiable implements Consume...
method JsLambda (line 36) | public JsLambda(Value v) {
method accept (line 40) | @Override
method apply (line 45) | @Override
method run (line 50) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/graal/JsList.java
class JsList (line 40) | public class JsList implements ProxyArray, List {
method JsList (line 46) | public JsList(Collection collection) {
method JsList (line 50) | public JsList(List list) {
method getList (line 54) | public List getList() {
method get (line 58) | @Override
method set (line 63) | @Override
method getSize (line 71) | @Override
method remove (line 76) | @Override
method toString (line 82) | @Override
method size (line 89) | @Override
method isEmpty (line 94) | @Override
method contains (line 99) | @Override
method iterator (line 104) | @Override
method toArray (line 109) | @Override
method toArray (line 114) | @Override
method add (line 119) | @Override
method remove (line 124) | @Override
method containsAll (line 129) | @Override
method addAll (line 134) | @Override
method addAll (line 139) | @Override
method removeAll (line 144) | @Override
method retainAll (line 149) | @Override
method clear (line 154) | @Override
method get (line 159) | @Override
method set (line 164) | @Override
method add (line 169) | @Override
method remove (line 174) | @Override
method indexOf (line 179) | @Override
method lastIndexOf (line 184) | @Override
method listIterator (line 189) | @Override
method listIterator (line 194) | @Override
method subList (line 199) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/graal/JsMap.java
class JsMap (line 37) | public class JsMap implements ProxyObject, Map {
method JsMap (line 43) | public JsMap(Map map) {
method getMap (line 47) | public Map getMap() {
method getMember (line 51) | @Override
method getMemberKeys (line 56) | @Override
method hasMember (line 61) | @Override
method putMember (line 66) | @Override
method removeMember (line 71) | @Override
method toString (line 76) | @Override
method size (line 83) | @Override
method isEmpty (line 88) | @Override
method containsKey (line 93) | @Override
method containsValue (line 98) | @Override
method get (line 103) | @Override
method put (line 108) | @Override
method remove (line 113) | @Override
method putAll (line 118) | @Override
method clear (line 123) | @Override
method keySet (line 128) | @Override
method values (line 133) | @Override
method entrySet (line 138) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/graal/JsValue.java
class JsValue (line 44) | public class JsValue {
type Type (line 48) | public static enum Type {
method JsValue (line 63) | public JsValue(Value v) {
method getValue (line 151) | public <T> T getValue() {
method getAsMap (line 155) | public Map<String, Object> getAsMap() {
method getAsList (line 159) | public List getAsList() {
method getOriginal (line 163) | public Value getOriginal() {
method isXml (line 167) | public boolean isXml() {
method isNull (line 171) | public boolean isNull() {
method isObject (line 175) | public boolean isObject() {
method isArray (line 179) | public boolean isArray() {
method isTrue (line 183) | public boolean isTrue() {
method isFunction (line 190) | public boolean isFunction() {
method isOther (line 194) | public boolean isOther() {
method toString (line 198) | @Override
method toJsonOrXmlString (line 203) | public String toJsonOrXmlString(boolean pretty) {
method getAsString (line 207) | public String getAsString() {
method fromJava (line 211) | public static Object fromJava(Object o) {
method toJava (line 225) | public static Object toJava(Value v) {
method unWrap (line 229) | public static Object unWrap(Object o) {
method toBytes (line 241) | public static byte[] toBytes(Value v) {
method isTruthy (line 245) | public static boolean isTruthy(Object o) {
FILE: karate-core/src/main/java/com/intuit/karate/graal/JsXml.java
class JsXml (line 34) | public class JsXml extends JsMap {
method JsXml (line 38) | public JsXml(Node node) {
method getNode (line 43) | public Node getNode() {
FILE: karate-core/src/main/java/com/intuit/karate/graal/Methods.java
class Methods (line 30) | public class Methods {
method Methods (line 32) | private Methods() {
type FunVar (line 36) | @FunctionalInterface
method call (line 39) | U call(T... args);
FILE: karate-core/src/main/java/com/intuit/karate/http/ApacheHttpClient.java
class ApacheHttpClient (line 97) | public class ApacheHttpClient implements HttpClient, HttpRequestIntercep...
class LenientCookieSpec (line 106) | public static class LenientCookieSpec extends DefaultCookieSpec {
method LenientCookieSpec (line 110) | public LenientCookieSpec() {
method match (line 114) | @Override
method validate (line 119) | @Override
method registry (line 124) | public static Registry<CookieSpecProvider> registry() {
method ApacheHttpClient (line 132) | public ApacheHttpClient(ScenarioEngine engine) {
method configure (line 139) | private void configure(Config config) {
method setConfig (line 252) | @Override
method getConfig (line 257) | @Override
method invoke (line 264) | @Override
method process (line 359) | @Override
method toHeaders (line 366) | private static Map<String, List<String>> toHeaders(HttpMessage msg) {
FILE: karate-core/src/main/java/com/intuit/karate/http/ArmeriaHttpClient.java
class ArmeriaHttpClient (line 53) | public class ArmeriaHttpClient implements HttpClient, DecoratingHttpClie...
method setRequestContext (line 62) | public void setRequestContext(RequestContext requestContext) {
method ArmeriaHttpClient (line 66) | public ArmeriaHttpClient(Config config, Logger logger) {
method invoke (line 72) | @Override
method setConfig (line 110) | @Override
method getConfig (line 115) | @Override
method execute (line 120) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/http/AwsLambdaHandler.java
class AwsLambdaHandler (line 44) | public class AwsLambdaHandler {
method AwsLambdaHandler (line 63) | public AwsLambdaHandler(ServerHandler handler) {
method handle (line 67) | public void handle(InputStream in, OutputStream out) throws IOException {
FILE: karate-core/src/main/java/com/intuit/karate/http/Cookies.java
class Cookies (line 41) | public class Cookies {
method Cookies (line 45) | private Cookies() {
method toMap (line 59) | public static Map<String, Object> toMap(Cookie cookie) {
method fromMap (line 78) | public static Cookie fromMap(Map<String, Object> map) {
method normalize (line 113) | public static Map<String, Map> normalize(Object mapOrList) {
FILE: karate-core/src/main/java/com/intuit/karate/http/CustomHttpRequestRetryHandler.java
class CustomHttpRequestRetryHandler (line 16) | public class CustomHttpRequestRetryHandler implements HttpRequestRetryHa...
method CustomHttpRequestRetryHandler (line 20) | public CustomHttpRequestRetryHandler(Logger logger)
method retryRequest (line 25) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/http/GenericHttpHeaderTracking.java
class GenericHttpHeaderTracking (line 6) | public class GenericHttpHeaderTracking implements HttpHeaderTracking {
method putHeaderReference (line 10) | @Override
method getOriginalHeader (line 19) | @Override
FILE: karate-core/src/main/java/com/intuit/karate/http/HttpClient.java
type HttpClient (line 32) | public interface HttpClient {
method setConfig (line 34) | void setConfig(Config config);
method getConfig (line 36) | Config getConfig();
method invoke (line 38) | Response invoke(HttpRequest request);
FILE: karate-core/src/main/java/com/intuit/karate/http/HttpClientFactory.java
type HttpClientFactory (line 32) | @FunctionalInterface
method create (line 35) | HttpClient create(ScenarioEngine engine);
FILE: karate-core/src/main/java/com/intuit/karate/http/HttpConstants.java
class HttpConstants (line 34) | public class HttpConstants {
method HttpConstants (line 36) | private HttpConstants() {
FILE: karate-core/src/main/java/com/intuit/karate/http/HttpHeaderTracking.java
type HttpHeaderTracking (line 3) | public interface HttpHeaderTracking {
method putHeaderReference (line 5) | void putHeaderReference(String originalHeader);
method getOriginalHeader (line 7) | String getOriginalHeader(String headerReference);
FILE: karate-core/src/main/java/com/intuit/karate/http/HttpLogModifier.java
type HttpLogModifier (line 30) | public interface HttpLogModifier {
method enableForUri (line 32) | boolean enableForUri(String uri);
method uri (line 34) | String uri(String uri);
method header (line 36) | String header(String header, String value);
method request (line 38) | String request(String uri, String request);
method response (line 40) | String response(String uri, String response);
FILE: karate-core/src/main/java/com/intuit/karate/http/HttpLogger.java
class HttpLogger (line 38) | public class HttpLogger {
method HttpLogger (line 43) | public HttpLogger(Logger logger) {
method logHeaders (line 47) | private static void logHeaders(int num, String prefix, StringBuilder sb,
method logBody (line 66) | private static void logBody(Config config, HttpLogModifier logModifier,
method needsPrettyLogging (line 85) | private static boolean needsPrettyLogging(Config config, boolean reque...
method logPrettyResponse (line 89) | private static boolean logPrettyResponse(Config config, boolean reques...
method logPrettyRequest (line 93) | private static boolean logPrettyRequest(Config config, boolean request) {
method logModifier (line 97) | private static HttpLogModifier logModifier(Config config, String uri) {
method getStatusFailureMessage (line 102) | public static String getStatusFailureMessage(int expected, Config conf...
method logRequest (line 116) | public void logRequest(Config config, HttpRequest request) {
method logResponse (line 141) | public void logResponse(Config config, HttpRequest request, Response r...
FILE: karate-core/src/main/java/com/intuit/karate/http/HttpRequest.java
class HttpRequest (line 37) | public class HttpRequest {
method putHeader (line 47) | public void putHeader(String name, String... values) {
method putHeader (line 51) | public void putHeader(String name, List<String> values) {
method getStartTime (line 64) | public long getStartTime() {
method setStartTime (line 68) | public void setStartTime(long startTime) {
method getEndTime (line 72) | public long getEndTime() {
method setEndTime (line 76) | public void setEndTime(long endTime) {
method getUrl (line 80) | public String getUrl() {
method setUrl (line 84) | public void setUrl(String url) {
method getMethod (line 88) | public String getMethod() {
method setMethod (line 92) | public void setMethod(String method) {
method getHeaders (line 96) | public Map<String, List<String>> getHeaders() {
method setHeaders (line 100) | public void setHeaders(Map<String, List<String>> headers) {
method getBody (line 104) | public byte[] getBody() {
method getBodyAsString (line 108) | public String getBodyAsString() {
method setBody (line 112) | public void setBody(byte[] body) {
method getBodyForDisplay (line 116) | public String getBodyForDisplay() {
method setBodyForDisplay (line 120) | public void setBodyForDisplay(String bodyForDisplay) {
Condensed preview — 1264 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3,403K chars).
[
{
"path": ".github/CODE_OF_CONDUCT.md",
"chars": 5023,
"preview": "\r\n# Contributor Covenant Code of Conduct\r\n\r\n## Our Pledge\r\n\r\nWe as members, contributors, and leaders pledge to make par"
},
{
"path": ".github/CONTRIBUTING.md",
"chars": 1411,
"preview": "# Contribution Guidelines\n\nFirst of all, thank you for your interest in contributing to this project !\n\n* Before submitt"
},
{
"path": ".github/FUNDING.yml",
"chars": 21,
"preview": "github: [karatelabs]\n"
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 317,
"preview": "IMPORTANT: If you have a general question please use Stack Overflow instead where Karate has a dedicated \"tag\": https://"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 486,
"preview": "### Description\n\nThanks for contributing this Pull Request. Make sure that you submit this Pull Request against the `dev"
},
{
"path": ".github/dependabot.yml",
"chars": 169,
"preview": "version: 2\nupdates:\n # Dependencies listed in .github/workflows/*.yml\n - package-ecosystem: \"github-actions\"\n direc"
},
{
"path": ".github/workflows/codeql.yml",
"chars": 3141,
"preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
},
{
"path": ".github/workflows/delete-workflow-runs.yml",
"chars": 750,
"preview": "name: delete-workflow-runs\non:\n workflow_dispatch:\n inputs:\n days:\n description: 'no. of days'\n r"
},
{
"path": ".github/workflows/jdk-compat.yml",
"chars": 650,
"preview": "name: jdk-compat\n\non:\n push:\n branches: [ develop ]\n\njobs:\n build:\n timeout-minutes: 10\n runs-on: ubuntu-late"
},
{
"path": ".github/workflows/maven-build.yml",
"chars": 994,
"preview": "name: maven-build\n\non:\n push:\n branches: [ master, develop ]\n pull_request:\n branches: [ master, develop ]\n\njobs"
},
{
"path": ".github/workflows/maven-release.yml",
"chars": 2809,
"preview": "name: maven-release\n\non:\n workflow_dispatch:\n inputs:\n version:\n description: maven and docker release v"
},
{
"path": ".gitignore",
"chars": 457,
"preview": ".DS_Store\ntarget/\n.idea\n.project\n.settings\n.classpath\n.vscode\n.java-version\n*.iml\n*.tokens\nbuild/\nbin/\n.gradle\ngradle\ngr"
},
{
"path": "LICENSE",
"chars": 1055,
"preview": "Copyright 2022 Karate Labs Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this so"
},
{
"path": "README.md",
"chars": 1816,
"preview": "# Karate\n\n**The open-source tool that combines API testing, mocks, performance testing, and UI automation into a single,"
},
{
"path": "SECURITY.md",
"chars": 526,
"preview": "# Security Policy\n\n## Supported Versions\n\n| Version | Supported |\n| ------- | ------------------ |\n| [latest (n"
},
{
"path": "_config.yml",
"chars": 347,
"preview": "# Site settings\ntitle: Karate\ndescription: Test Automation Made Simple.\ntwitter_username: getkarate\ngithub_username: ptr"
},
{
"path": "_includes/nav.html",
"chars": 2650,
"preview": "<nav>\n <ul class=\"navigation-list\">\n {% assign pages_list = site.html_pages | sort:\"nav_order\" %}\n {% for node in"
},
{
"path": "_includes/toc.html",
"chars": 4182,
"preview": "{% capture tocWorkspace %}\n {% comment %}\n Version 1.0.6\n https://github.com/allejo/jekyll-toc\n\n "
},
{
"path": "build-docker.sh",
"chars": 2727,
"preview": "#!/bin/bash\n#set -x -e\n\n# assume that karate jars are installed in maven local repo\n# mvn clean install -DskipTests -P p"
},
{
"path": "examples/README.md",
"chars": 294,
"preview": "# Karate Examples\n\nKarate Examples are being moved to this url: [Examples](https://github.com/karatelabs/karate-examples"
},
{
"path": "examples/consumer-driven-contracts/.gitignore",
"chars": 19,
"preview": ".DS_Store\ntarget/\n\n"
},
{
"path": "examples/consumer-driven-contracts/README.md",
"chars": 2383,
"preview": "# Karate Consumer Driven Contracts Demo\n\n## References\nThis is a simplified version of the [example in the Karate test-d"
},
{
"path": "examples/consumer-driven-contracts/payment-consumer/pom.xml",
"chars": 998,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "examples/consumer-driven-contracts/payment-consumer/src/main/java/payment/consumer/Consumer.java",
"chars": 1665,
"preview": "package payment.consumer;\n\nimport com.fasterxml.jackson.databind.ObjectMapper;\nimport java.net.HttpURLConnection;\nimport"
},
{
"path": "examples/consumer-driven-contracts/payment-consumer/src/test/java/logback-test.xml",
"chars": 808,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n \n <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleA"
},
{
"path": "examples/consumer-driven-contracts/payment-consumer/src/test/java/payment/consumer/ConsumerIntegrationAgainstMockTest.java",
"chars": 1227,
"preview": "package payment.consumer;\n\nimport com.intuit.karate.core.MockServer;\nimport java.io.File;\nimport org.junit.jupiter.api.A"
},
{
"path": "examples/consumer-driven-contracts/payment-consumer/src/test/java/payment/consumer/ConsumerIntegrationTest.java",
"chars": 1185,
"preview": "package payment.consumer;\n\nimport org.junit.jupiter.api.AfterAll;\nimport static org.junit.jupiter.api.Assertions.*;\nimpo"
},
{
"path": "examples/consumer-driven-contracts/payment-producer/pom.xml",
"chars": 1138,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/main/java/payment/producer/Payment.java",
"chars": 606,
"preview": "package payment.producer;\n\n/**\n *\n * @author pthomas3\n */\npublic class Payment {\n \n private int id;\n private do"
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/main/java/payment/producer/PaymentService.java",
"chars": 3262,
"preview": "package payment.producer;\n\nimport java.util.Collection;\nimport java.util.Map;\nimport java.util.concurrent.ConcurrentHash"
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/main/java/payment/producer/ServerStartedInitializingBean.java",
"chars": 1142,
"preview": "package payment.producer;\n\nimport java.util.Arrays;\nimport org.slf4j.Logger;\nimport org.slf4j.LoggerFactory;\nimport org."
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/test/java/karate-config.js",
"chars": 88,
"preview": "function() {\n return { paymentServiceUrl: karate.properties['payment.service.url'] }\n}\n"
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/test/java/logback-test.xml",
"chars": 808,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n \n <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleA"
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/contract/PaymentContractTest.java",
"chars": 1084,
"preview": "package payment.producer.contract;\n\nimport com.intuit.karate.Results;\nimport com.intuit.karate.Runner;\nimport org.junit."
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/contract/payment-contract.feature",
"chars": 1038,
"preview": "Feature: payment service contract test\n\nBackground:\n* url paymentServiceUrl + '/payments'\n\nScenario: create, get, update"
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/mock/PaymentContractAgainstMockTest.java",
"chars": 1041,
"preview": "package payment.producer.mock;\n\nimport com.intuit.karate.Results;\nimport com.intuit.karate.Runner;\nimport com.intuit.kar"
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/mock/payment-mock.feature",
"chars": 666,
"preview": "Feature: payment service mock\n\nBackground:\n* def id = 0\n* def payments = {}\n\nScenario: pathMatches('/payments') && metho"
},
{
"path": "examples/consumer-driven-contracts/payment-producer/src/test/java/payment/producer/mock/test.feature",
"chars": 35,
"preview": "Feature:\n\nScenario:\n* print 'hello'"
},
{
"path": "examples/consumer-driven-contracts/pom.xml",
"chars": 2950,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "examples/gatling/.gitignore",
"chars": 26,
"preview": ".DS_Store\ntarget/\n.idea/\n\n"
},
{
"path": "examples/gatling/README.md",
"chars": 804,
"preview": "# karate-gatling-demo\ndemo sample project for karate [test-doubles](https://github.com/karatelabs/karate/tree/master/kar"
},
{
"path": "examples/gatling/build.gradle",
"chars": 1128,
"preview": "plugins {\n id 'scala'\n}\n\next {\n karateVersion = '1.5.2'\n}\n\ndependencies {\n testImplementation \"io.karatelabs:ka"
},
{
"path": "examples/gatling/pom.xml",
"chars": 4174,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "examples/gatling/src/test/java/karate-config.js",
"chars": 28,
"preview": "function(){\n return {};\n}"
},
{
"path": "examples/gatling/src/test/java/logback-test.xml",
"chars": 800,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\n <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleA"
},
{
"path": "examples/gatling/src/test/java/mock/CatsGatlingSimulation.scala",
"chars": 1971,
"preview": "package mock\n\nimport scala.language.postfixOps\nimport io.gatling.core.Predef._\nimport io.gatling.http.Predef._\n\nimport s"
},
{
"path": "examples/gatling/src/test/java/mock/CatsKarateSimulation.scala",
"chars": 1063,
"preview": "package mock\n\nimport scala.language.postfixOps\nimport com.intuit.karate.gatling.PreDef._\nimport io.gatling.core.Predef._"
},
{
"path": "examples/gatling/src/test/java/mock/MockUtils.java",
"chars": 1567,
"preview": "package mock;\n\nimport com.intuit.karate.core.MockServer;\nimport com.intuit.karate.PerfContext;\nimport com.intuit.karate."
},
{
"path": "examples/gatling/src/test/java/mock/cats-create.feature",
"chars": 1019,
"preview": "Feature: cats crud\n\n Background:\n * url karate.properties['mock.cats.url']\n\n Scenario: create, get and update cat\n "
},
{
"path": "examples/gatling/src/test/java/mock/cats-delete-one.feature",
"chars": 298,
"preview": "@ignore\nFeature: delete cat by id and verify\n\n Scenario:\n Given url karate.properties['mock.cats.url']\n And path "
},
{
"path": "examples/gatling/src/test/java/mock/cats-delete.feature",
"chars": 483,
"preview": "Feature: delete all cats found\n\n Background:\n * url karate.properties['mock.cats.url']\n\n Scenario: this scenario wi"
},
{
"path": "examples/gatling/src/test/java/mock/custom-rpc.feature",
"chars": 622,
"preview": "@ignore\nFeature: even java interop performance test reports are possible\n\n Background:\n * def Utils = Java.type('moc"
},
{
"path": "examples/gatling/src/test/java/mock/feeder.feature",
"chars": 175,
"preview": "Feature: to generate a list of cat names\n\n Scenario: any variables defined can be retrieved when called via the java ap"
},
{
"path": "examples/gatling/src/test/java/mock/mock.feature",
"chars": 746,
"preview": "Feature: cats stateful crud\n\n Background:\n * def uuid = function(){ return java.util.UUID.randomUUID() + '' }\n * "
},
{
"path": "examples/image-comparison/README.md",
"chars": 2693,
"preview": "# Karate Image Comparison\nThis project is designed to demonstrate basic usage of the [Image Comparison](https://github.c"
},
{
"path": "examples/image-comparison/pom.xml",
"chars": 2038,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "examples/image-comparison/src/test/java/karate-config.js",
"chars": 1028,
"preview": "function fn() {\n karate.configure('retry', { count: 20, interval: 200 })\n\n return {\n baseUrl: karate.proper"
},
{
"path": "examples/image-comparison/src/test/java/logback-test.xml",
"chars": 754,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n \n <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleA"
},
{
"path": "examples/image-comparison/src/test/java/ui/1_establish_baseline.feature",
"chars": 500,
"preview": "Feature: Image comparison demo\n\nBackground:\n * configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailur"
},
{
"path": "examples/image-comparison/src/test/java/ui/2_compare_baseline.feature",
"chars": 582,
"preview": "Feature: Image comparison demo\n\nBackground:\n * configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailur"
},
{
"path": "examples/image-comparison/src/test/java/ui/3_custom_rebase.feature",
"chars": 751,
"preview": "Feature: Image comparison demo\n\nBackground:\n * configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailur"
},
{
"path": "examples/image-comparison/src/test/java/ui/4_generic_rebase.feature",
"chars": 853,
"preview": "Feature: Image comparison demo\n\nBackground:\n * configure imageComparison = { onShowRebase: '(cfg, saveAs) => saveAs(c"
},
{
"path": "examples/image-comparison/src/test/java/ui/5_custom_config.feature",
"chars": 1105,
"preview": "Feature: Image comparison demo\n\nBackground:\n * configure imageComparison = { onShowRebase: '(cfg, saveAs) => saveAs(c"
},
{
"path": "examples/image-comparison/src/test/java/ui/6_outline.feature",
"chars": 1733,
"preview": "Feature: Image comparison demo\n\nBackground:\n * configure driver = { type: 'chrome', timeout: 5000, screenshotOnFailur"
},
{
"path": "examples/image-comparison/src/test/java/ui/7_api.feature",
"chars": 2774,
"preview": "Feature: Image comparison demo\n\nBackground:\n # `screenGrab` processes a named image comparison by:\n # - capturin"
},
{
"path": "examples/image-comparison/src/test/java/ui/ImageComparisonRunner.java",
"chars": 484,
"preview": "package ui;\n\nimport com.intuit.karate.http.HttpServer;\nimport com.intuit.karate.junit5.Karate;\nimport org.junit.jupiter."
},
{
"path": "examples/image-comparison/src/test/java/ui/MockRunner.java",
"chars": 630,
"preview": "package ui;\n\nimport com.intuit.karate.http.HttpServer;\nimport com.intuit.karate.http.ServerConfig;\nimport org.junit.jupi"
},
{
"path": "examples/image-comparison/src/test/java/ui/html/index.html",
"chars": 3271,
"preview": "<!doctype html>\n<html>\n<head>\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1\">\n <title>Karate "
},
{
"path": "examples/image-comparison/src/test/java/ui/screenshots/config/loaded_phone.json",
"chars": 115,
"preview": "{\n \"ignoredBoxes\": [\n {\n \"top\": 75,\n \"left\": 13,\n \"bottom\": 128,\n \"right\": 191\n }\n ]\n}\n"
},
{
"path": "examples/image-comparison/src/test/java/ui/screenshots/config/loaded_tablet.json",
"chars": 115,
"preview": "{\n \"ignoredBoxes\": [\n {\n \"top\": 59,\n \"left\": 10,\n \"bottom\": 139,\n \"right\": 195\n }\n ]\n}\n"
},
{
"path": "examples/image-comparison/src/test/java/ui/screenshots/config/loading_phone.json",
"chars": 117,
"preview": "{\n \"ignoredBoxes\": [\n {\n \"top\": 262,\n \"left\": 108,\n \"bottom\": 396,\n \"right\": 261\n }\n ]\n}\n"
},
{
"path": "examples/image-comparison/src/test/java/ui/screenshots/config/loading_tablet.json",
"chars": 117,
"preview": "{\n \"ignoredBoxes\": [\n {\n \"top\": 531,\n \"left\": 344,\n \"bottom\": 652,\n \"right\": 471\n }\n ]\n}\n"
},
{
"path": "examples/mobile-test/README.md",
"chars": 1285,
"preview": "# Examples - Karate Mobile (Appium)\n> Please consider Mobile support as experimental. But we are very close and there ar"
},
{
"path": "examples/mobile-test/pom.xml",
"chars": 2249,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n xsi:s"
},
{
"path": "examples/mobile-test/src/test/java/android/AndroidTest.java",
"chars": 228,
"preview": "package android;\n\nimport com.intuit.karate.junit5.Karate;\n\n/**\n * @author babusekaran\n */\nclass AndroidTest {\n\n @Kara"
},
{
"path": "examples/mobile-test/src/test/java/android/android.feature",
"chars": 944,
"preview": "Feature: android test\r\n\r\n Background: App Preset\r\n * configure driver = { type: 'android', webDriverPath : \"/wd/hub\""
},
{
"path": "examples/mobile-test/src/test/java/karate-config.js",
"chars": 445,
"preview": "function fn() {\n var config = {}\n var android = {}\n android[\"desiredConfig\"] = {\n \"app\" : \"https://github.com/babus"
},
{
"path": "examples/mobile-test/src/test/java/logback-test.xml",
"chars": 692,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\n <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAp"
},
{
"path": "examples/profiling-test/pom.xml",
"chars": 3746,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "examples/profiling-test/src/test/java/karate-config.js",
"chars": 128,
"preview": "function fn() {\n var config = karate.call('classpath:perf/called.feature');\n karate.log('config:', config);\n return c"
},
{
"path": "examples/profiling-test/src/test/java/logback-test.xml",
"chars": 799,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\n <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleA"
},
{
"path": "examples/profiling-test/src/test/java/perf/Main.java",
"chars": 1408,
"preview": "package perf;\n\nimport com.intuit.karate.PerfHook;\nimport com.intuit.karate.Runner;\nimport com.intuit.karate.core.Feature"
},
{
"path": "examples/profiling-test/src/test/java/perf/TestSimulation.scala",
"chars": 680,
"preview": "package perf\n\nimport com.intuit.karate.gatling.PreDef._\nimport io.gatling.core.Predef._\n\nimport scala.concurrent.duratio"
},
{
"path": "examples/profiling-test/src/test/java/perf/TestUtils.java",
"chars": 345,
"preview": "package perf;\n\nimport com.intuit.karate.core.MockServer;\n\n/**\n *\n * @author pthomas3\n */\npublic class TestUtils {\n \n "
},
{
"path": "examples/profiling-test/src/test/java/perf/called.feature",
"chars": 334,
"preview": "Feature:\n\n Scenario:\n * def var1 = { foo: 'bar' }\n * def var2 = { baz: { hello: 'world' } }\n * def var3 = func"
},
{
"path": "examples/profiling-test/src/test/java/perf/main.feature",
"chars": 441,
"preview": "Feature:\n\n Background:\n * def backgroundData = callonce read('called.feature')\n * url karate.properties['mock.ser"
},
{
"path": "examples/profiling-test/src/test/java/perf/mock.feature",
"chars": 82,
"preview": "Feature:\n\n Scenario: pathMatches('/test')\n * def response = { success: true }\n"
},
{
"path": "examples/robot-test/README.md",
"chars": 377,
"preview": "# Examples - Karate Robot\n\nThis is designed to be a simple Maven project to get started with [`karate-robot`](https://gi"
},
{
"path": "examples/robot-test/pom.xml",
"chars": 2484,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "examples/robot-test/src/test/java/karate-config.js",
"chars": 33,
"preview": "function fn() {\n return {}; \n}\n"
},
{
"path": "examples/robot-test/src/test/java/logback-test.xml",
"chars": 709,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n \n <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleA"
},
{
"path": "examples/robot-test/src/test/java/mac/ChromeRunner.java",
"chars": 233,
"preview": "package mac;\n\nimport com.intuit.karate.junit5.Karate;\n\n/**\n *\n * @author pthomas3\n */\nclass ChromeRunner {\n \n @Kar"
},
{
"path": "examples/robot-test/src/test/java/mac/chrome.feature",
"chars": 288,
"preview": "Feature: mac - robot and chrome\n\nScenario:\n# * karate.exec('Chrome')\n# or make sure Chrome is open\n* robot { window: '^C"
},
{
"path": "examples/robot-test/src/test/java/win/CalcRunner.java",
"chars": 227,
"preview": "package win;\n\nimport com.intuit.karate.junit5.Karate;\n\n/**\n *\n * @author pthomas3\n */\nclass CalcRunner {\n \n @Karat"
},
{
"path": "examples/robot-test/src/test/java/win/calc.feature",
"chars": 310,
"preview": "Feature: windows calculator\n\nScenario:\n* robot { window: 'Calculator', fork: 'calc', highlight: true, highlightDuration:"
},
{
"path": "examples/ui-test/README.md",
"chars": 5199,
"preview": "# Karate UI Test\nThis project is designed to be the simplest way to replicate issues with the [Karate UI framework](http"
},
{
"path": "examples/ui-test/pom.xml",
"chars": 2044,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "examples/ui-test/src/test/java/logback-test.xml",
"chars": 754,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n \n <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleA"
},
{
"path": "examples/ui-test/src/test/java/ui/MockRunner.java",
"chars": 640,
"preview": "package ui;\n\nimport com.intuit.karate.http.HttpServer;\nimport com.intuit.karate.http.ServerConfig;\nimport org.junit.jupi"
},
{
"path": "examples/ui-test/src/test/java/ui/UiRunner.java",
"chars": 470,
"preview": "package ui;\n\nimport com.intuit.karate.http.HttpServer;\nimport com.intuit.karate.junit5.Karate;\nimport org.junit.jupiter."
},
{
"path": "examples/ui-test/src/test/java/ui/html/index.html",
"chars": 138,
"preview": "<!doctype html>\n<html>\n <head>\n <title>Index</title>\n </head>\n <body>\n <p><a href=\"/page-01\">Page 01</a></p>\n "
},
{
"path": "examples/ui-test/src/test/java/ui/html/karate.js",
"chars": 156,
"preview": "var karate = {};\nkarate.get = function(id) { return document.getElementById(id) };\nkarate.setHtml = function(id, value) "
},
{
"path": "examples/ui-test/src/test/java/ui/html/page-01.html",
"chars": 640,
"preview": "<!doctype html>\n<html>\n <head>\n <title>Page One</title>\n <style>\n .foo { color: blue };\n </style>\n <"
},
{
"path": "examples/ui-test/src/test/java/ui/test.feature",
"chars": 406,
"preview": "Feature: ui test\n\nScenario Outline: <type>\n * def webUrlBase = karate.properties['web.url.base']\n * configure driver ="
},
{
"path": "examples/zip-release/src/demo/api/httpbin.feature",
"chars": 272,
"preview": "Feature: simple requests\n\nScenario: simple sequence\nGiven url 'https://httpbin.org/anything'\nAnd request { myKey: 'myVal"
},
{
"path": "examples/zip-release/src/demo/api/users.feature",
"chars": 977,
"preview": "Feature: sample karate api test script\n\n Background:\n * url 'https://jsonplaceholder.typicode.com'\n\n Scenario: get "
},
{
"path": "examples/zip-release/src/demo/mock/cats-mock.feature",
"chars": 726,
"preview": "@ignore\nFeature: stateful mock server\n\nBackground:\n* configure cors = true\n* def uuid = function(){ return java.util.UUI"
},
{
"path": "examples/zip-release/src/demo/mock/cats-test.feature",
"chars": 1014,
"preview": "Feature: integration test for the mock\n\nBackground:\n * def port = karate.env == 'mock' ? karate.start('cats-mock.feat"
},
{
"path": "examples/zip-release/src/demo/mock/cats.html",
"chars": 1031,
"preview": "<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\">\n <title>Cats</title>\n <script src=\"https://code.jquery."
},
{
"path": "examples/zip-release/src/demo/robot/calc-old.feature",
"chars": 436,
"preview": "Feature: windows calculator\n\tdepending on your version of windows, if \"calc.feature\" doesn't work, try this one instead\n"
},
{
"path": "examples/zip-release/src/demo/robot/calc.feature",
"chars": 519,
"preview": "Feature: windows calculator\n\tdid you know that Karate can do Windows desktop / app automation ?\n\tyou are almost set - ju"
},
{
"path": "examples/zip-release/src/demo/web/google.feature",
"chars": 642,
"preview": "Feature: web-browser automation\n\nBackground:\n * configure driver = { type: 'chrome' }\n\nScenario: try to login to githu"
},
{
"path": "jbang-catalog.json",
"chars": 120,
"preview": "{\n \"catalogs\": {},\n \"aliases\": {\n \"karate\": {\n \"script-ref\": \"io.karatelabs:karate-core:1.5.0:all\"\n }\n }\n}"
},
{
"path": "karate-archetype/pom.xml",
"chars": 932,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "karate-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml",
"chars": 320,
"preview": "<archetype-descriptor name=\"karate-archetype\">\n\n <fileSets>\n <fileSet filtered=\"false\" packaged=\"false\" encodi"
},
{
"path": "karate-archetype/src/main/resources/archetype-resources/.gitignore",
"chars": 68,
"preview": ".DS_Store\n.vscode\n.idea\n.project\n.settings\n.classpath\n*.iml\ntarget/\n"
},
{
"path": "karate-archetype/src/main/resources/archetype-resources/pom.xml",
"chars": 2160,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "karate-archetype/src/main/resources/archetype-resources/src/test/java/examples/ExamplesTest.java",
"chars": 450,
"preview": "package examples;\n\nimport com.intuit.karate.Results;\nimport com.intuit.karate.Runner;\nimport static org.junit.jupiter.ap"
},
{
"path": "karate-archetype/src/main/resources/archetype-resources/src/test/java/examples/users/UsersRunner.java",
"chars": 205,
"preview": "package examples.users;\n\nimport com.intuit.karate.junit5.Karate;\n\nclass UsersRunner {\n \n @Karate.Test\n Karate t"
},
{
"path": "karate-archetype/src/main/resources/archetype-resources/src/test/java/examples/users/users.feature",
"chars": 1044,
"preview": "Feature: sample karate test script\n for help, see: https://github.com/karatelabs/karate/wiki/IDE-Support\n\n Background:"
},
{
"path": "karate-archetype/src/main/resources/archetype-resources/src/test/java/karate-config.js",
"chars": 366,
"preview": "function fn() {\n var env = karate.env; // get system property 'karate.env'\n karate.log('karate.env system property was"
},
{
"path": "karate-archetype/src/main/resources/archetype-resources/src/test/java/logback-test.xml",
"chars": 709,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n \n <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleA"
},
{
"path": "karate-core/README.md",
"chars": 118670,
"preview": "# Karate UI\n## UI Test Automation Made `Simple.`\n\n### Hello World\n\n<a href=\"https://twitter.com/getkarate/status/1167533"
},
{
"path": "karate-core/pom.xml",
"chars": 22509,
"preview": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n xsi:sc"
},
{
"path": "karate-core/src/main/antlr4/com/intuit/karate/core/KarateLexer.g4",
"chars": 2087,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/antlr4/com/intuit/karate/core/KarateParser.g4",
"chars": 2001,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Actions.java",
"chars": 3901,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Constants.java",
"chars": 1943,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/FileUtils.java",
"chars": 8979,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Http.java",
"chars": 4005,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/ImageComparison.java",
"chars": 15541,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Json.java",
"chars": 8572,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/JsonUtils.java",
"chars": 16979,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/KarateException.java",
"chars": 1433,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/LogAppender.java",
"chars": 1727,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Logger.java",
"chars": 4793,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Main.java",
"chars": 16611,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Match.java",
"chars": 17375,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/MatchOperation.java",
"chars": 5550,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/MatchOperator.java",
"chars": 32907,
"preview": "package com.intuit.karate;\n\nimport com.intuit.karate.graal.JsValue;\n\nimport java.math.BigDecimal;\nimport java.util.*;\nim"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/MatchStep.java",
"chars": 6656,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/PerfContext.java",
"chars": 1311,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/PerfHook.java",
"chars": 1644,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Results.java",
"chars": 7958,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Runner.java",
"chars": 19217,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/RuntimeHook.java",
"chars": 2463,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/ScenarioActions.java",
"chars": 10578,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/StringUtils.java",
"chars": 8392,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/Suite.java",
"chars": 14630,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/XmlUtils.java",
"chars": 17737,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Action.java",
"chars": 1480,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/AfterHookType.java",
"chars": 1516,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/AssignType.java",
"chars": 1351,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/AutoDef.java",
"chars": 1464,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Background.java",
"chars": 1793,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Channel.java",
"chars": 1297,
"preview": "/*\n * The MIT License\n *\n * Copyright 2023 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ChannelFactory.java",
"chars": 1346,
"preview": "/*\n * The MIT License\n *\n * Copyright 2023 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Config.java",
"chars": 23591,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Embed.java",
"chars": 3986,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ExamplesTable.java",
"chars": 2210,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Feature.java",
"chars": 6513,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/FeatureCall.java",
"chars": 1839,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/FeatureParser.java",
"chars": 11590,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/FeatureResult.java",
"chars": 11351,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/FeatureRuntime.java",
"chars": 8898,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/FeatureSection.java",
"chars": 2135,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/MockHandler.java",
"chars": 16981,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/MockInterceptor.java",
"chars": 236,
"preview": "package com.intuit.karate.core;\n\nimport com.intuit.karate.http.Request;\nimport com.intuit.karate.http.Response;\n\n@Functi"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/MockServer.java",
"chars": 7232,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ParallelProcessor.java",
"chars": 3361,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ParserErrorListener.java",
"chars": 3589,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/PerfEvent.java",
"chars": 2542,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Plugin.java",
"chars": 1851,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/PluginFactory.java",
"chars": 1344,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Result.java",
"chars": 7109,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/RuntimeHookFactory.java",
"chars": 1318,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Scenario.java",
"chars": 7666,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ScenarioBridge.java",
"chars": 40144,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ScenarioCall.java",
"chars": 4071,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ScenarioEngine.java",
"chars": 86494,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ScenarioFileReader.java",
"chars": 6532,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ScenarioIterator.java",
"chars": 7421,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ScenarioOutline.java",
"chars": 6647,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ScenarioOutlineResult.java",
"chars": 3421,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ScenarioResult.java",
"chars": 13475,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/ScenarioRuntime.java",
"chars": 23004,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Step.java",
"chars": 7021,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/StepResult.java",
"chars": 8870,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/StepRuntime.java",
"chars": 12118,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/SyncExecutorService.java",
"chars": 2227,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Table.java",
"chars": 7828,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Tag.java",
"chars": 2998,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/TagResults.java",
"chars": 2917,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Tags.java",
"chars": 7967,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/TimelineResults.java",
"chars": 4002,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/Variable.java",
"chars": 9035,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/core/When.java",
"chars": 374,
"preview": "package com.intuit.karate.core;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\nimport "
},
{
"path": "karate-core/src/main/java/com/intuit/karate/driver/DevToolsDriver.java",
"chars": 43250,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/driver/DevToolsMessage.java",
"chars": 7209,
"preview": "/*\n * The MIT License\n *\n * Copyright 2022 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
},
{
"path": "karate-core/src/main/java/com/intuit/karate/driver/DevToolsMock.java",
"chars": 1494,
"preview": "/*\n * The MIT License\n *\n * Copyright 2023 Karate Labs Inc.\n *\n * Permission is hereby granted, free of charge, to any p"
}
]
// ... and 1064 more files (download for full content)
About this extraction
This page contains the full source code of the karatelabs/karate GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1264 files (3.0 MB), approximately 865.9k tokens, and a symbol index with 5924 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.