UNPKG

@gatling.io/http

Version:

Gatling JS is a JavaScript/TypeScript interface for the [Gatling load testing tool](https://gatling.io/).

40 lines (39 loc) 1.08 kB
import { ActionBuilder, Duration } from "@gatling.io/core"; import { HttpRequestActionBuilder } from "./request"; /** The prefix to bootstrap polling specific DSL */ export declare const poll: () => Polling; /** * DSL for building HTTP polling configurations * * Immutable, so all methods return a new occurrence and leave the original unmodified. */ export interface Polling { /** * Define a custom poller name so multiple pollers for the same virtual users don't conflict * * @param pollerName - the name * @returns the next DSL step */ pollerName(pollerName: string): Polling; /** * Define the polling period * * @param period - the period * @returns the next DSL step */ every(period: Duration): PollingEvery; /** * Stop polling * * @returns an ActionBuilder */ stop(): ActionBuilder; } export interface PollingEvery { /** * Define the polling request * * @returns an ActionBuilder */ exec(requestBuilder: HttpRequestActionBuilder): ActionBuilder; }