@gatling.io/core
Version:
Gatling JS is a JavaScript/TypeScript interface for the [Gatling load testing tool](https://gatling.io/).
84 lines (83 loc) • 3.79 kB
TypeScript
import { SessionTo, SessionTransform } from "./session";
import { ActionBuilder } from "./structure";
export interface DummyBuilder extends ActionBuilder {
/**
* Set the successful outcome of the dummy action. If undefined, the outcome is a success.
*
* @param newSuccess - if the outcome of the dummy action must be a success
* @return a new DummyBuilder with the success outcome defined
*/
withSuccess(newSuccess: boolean): DummyBuilder;
/**
* Set the successful outcome of the dummy action. If undefined, the outcome is a success.
*
* @param newSuccess - if the outcome of the dummy action must be a success, as a Gatling EL String
* @return a new DummyBuilder with the success outcome defined
*/
withSuccess(newSuccess: string): DummyBuilder;
/**
* Set the successful outcome of the dummy action. If undefined, the outcome is a success.
*
* @param newSuccess - if the outcome of the dummy action must be a success, as a function
* @return a new DummyBuilder with the success outcome defined
*/
withSuccess(newSuccess: SessionTo<boolean>): DummyBuilder;
/**
* Modify the Session like an exec(f) block would, as part of this dummy action
*
* @param f - a function to return an updated Session
* @return a new DummyBuilder with the Session function defined
*/
withSessionUpdate(f: SessionTransform): DummyBuilder;
}
export interface DummyFunction {
/**
* Bootstrap a builder for performing a dummy action that emulates a network remote call
*
* @param actionName - the name of the action, as a Gatling EL String
* @param responseTime - the response time of the action in milliseconds
* @return a DummyBuilder
*/
(actionName: string, responseTime: number): DummyBuilder;
/**
* Bootstrap a builder for performing a dummy action that emulates a network remote call
*
* @param actionName - the name of the action, as a Gatling EL String
* @param responseTime - the response time of the action in milliseconds, as a Gatling EL String
* @return a DummyBuilder
*/
(actionName: string, responseTime: string): DummyBuilder;
/**
* Bootstrap a builder for performing a dummy action that emulates a network remote call
*
* @param actionName - the name of the action, as a Gatling EL String
* @param responseTime - the response time of the action in milliseconds, as a function
* @return a DummyBuilder
*/
(actionName: string, responseTime: SessionTo<number>): DummyBuilder;
/**
* Bootstrap a builder for performing a dummy action that emulates a network remote call
*
* @param actionName - the name of the action, as a function
* @param responseTime - the response time of the action in milliseconds
* @return a DummyBuilder
*/
(actionName: SessionTo<string>, responseTime: number): DummyBuilder;
/**
* Bootstrap a builder for performing a dummy action that emulates a network remote call
*
* @param actionName - the name of the action, as a Gatling EL String
* @param responseTime - the response time of the action in milliseconds, as function
* @return a DummyBuilder
*/
(actionName: SessionTo<string>, responseTime: string): DummyBuilder;
/**
* Bootstrap a builder for performing a dummy action that emulates a network remote call
*
* @param actionName - the name of the action, as a function
* @param responseTime - the response time of the action in milliseconds, as a function
* @return a DummyBuilder
*/
(actionName: SessionTo<string>, responseTime: SessionTo<number>): DummyBuilder;
}
export declare const dummy: DummyFunction;