Package com.intuit.karate.core
Class MockServer
java.lang.Object
com.intuit.karate.core.MockServer
Deprecated, for removal: This API element is subject to removal in a future version.
V1 compatibility shim for
MockServer.
This class provides backward compatibility for code written against Karate v1.
Migrate to MockServer for new code.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated, for removal: This API element is subject to removal in a future version.UseMockServer.Builderinstead. -
Method Summary
Modifier and TypeMethodDescriptionstatic MockServer.BuilderDeprecated, for removal: This API element is subject to removal in a future version.UseMockServer.feature(String)instead.static MockServer.BuilderfeatureString(String featureContent) Deprecated, for removal: This API element is subject to removal in a future version.UseMockServer.featureString(String)instead.intgetPort()Deprecated, for removal: This API element is subject to removal in a future version.getUrl()Deprecated, for removal: This API element is subject to removal in a future version.getVariable(String name) Deprecated, for removal: This API element is subject to removal in a future version.booleanisSsl()Deprecated, for removal: This API element is subject to removal in a future version.voidstop()Deprecated, for removal: This API element is subject to removal in a future version.UseMockServer.stopAndWait()instead.voidDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Get the underlying v2 MockServer for gradual migration.voidwaitSync()Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
feature
Deprecated, for removal: This API element is subject to removal in a future version.UseMockServer.feature(String)instead.Create a builder for a mock server from a feature file path. -
featureString
@Deprecated(since="2.0", forRemoval=true) public static MockServer.Builder featureString(String featureContent) Deprecated, for removal: This API element is subject to removal in a future version.UseMockServer.featureString(String)instead.Create a builder for a mock server from a feature string. -
getPort
Deprecated, for removal: This API element is subject to removal in a future version.Get the port the server is listening on. -
isSsl
Deprecated, for removal: This API element is subject to removal in a future version.Check if the server is using SSL/TLS. -
getUrl
Deprecated, for removal: This API element is subject to removal in a future version.Get the base URL for the server. -
stop
Deprecated, for removal: This API element is subject to removal in a future version.UseMockServer.stopAndWait()instead.Stop the mock server and wait for shutdown to complete (blocking).V1 name was stop(); v2 uses stopAndWait().
-
stopAndWait
Deprecated, for removal: This API element is subject to removal in a future version.Stop the mock server and wait for shutdown to complete (blocking). -
stopAsync
Deprecated, for removal: This API element is subject to removal in a future version.Stop the mock server asynchronously (non-blocking). -
waitSync
Deprecated, for removal: This API element is subject to removal in a future version.Wait for the server to be stopped (blocking). -
getVariable
Deprecated, for removal: This API element is subject to removal in a future version.Get a variable from the mock handler's global context. -
toV2MockServer
Deprecated, for removal: This API element is subject to removal in a future version.Get the underlying v2 MockServer for gradual migration.
-
MockServerinstead. This class will be removed in a future release.