Class KarateUriPattern

java.lang.Object
io.karatelabs.gatling.KarateUriPattern

public final class KarateUriPattern extends Object
Represents a URI pattern with optional method-specific pause configurations. URI patterns can include path parameters like "/users/{id}".

Example usage:

 KarateUriPattern pattern = KarateUriPattern.uri("/cats/{id}")
     .pauseFor(method("get", 10), method("post", 20))
     .build();
 
  • Method Details

    • getPattern

      public String getPattern()
      Get the URI pattern string.
    • getPauseFor

      public int getPauseFor(String method)
      Get the pause duration for a specific HTTP method.
      Parameters:
      method - the HTTP method (GET, POST, etc.)
      Returns:
      the pause duration in milliseconds, or 0 if not specified
    • getMethodPauses

      public Map<String,Integer> getMethodPauses()
      Get all method pause configurations.
    • uri

      public static KarateUriPattern.Builder uri(String pattern)
      Create a builder for a URI pattern.
      Parameters:
      pattern - the URI pattern (e.g., "/users/{id}")
      Returns:
      a new builder