Annotation Type JPostman.Runner
-
@Target(METHOD) @Retention(RUNTIME) public static @interface JPostman.Runner
Marks a method that runs one or more collection requests.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]assertsAssertion section names.StringdataData section name.String[]dependsOnDependency method names.booleanenabledString[]excludeRequest names to exclude.StringexecutorExecutor id.String[]filterFields to keep in the context.String[]folderCollection folder path from the collection root to the target folder.StringidOptional annotation id used by dependsOn = "#id".String[]includeRequest names to include.booleanlifecycleEnables request/response runner lifecycle callbacks.StringlogLocal automatic JPostman failure output mode.StringnamespaceRunner namespace.StringruleRules section name.booleanskipbooleansoftEnables soft assertion mode.String[]tagsTags used to select this runner.intverifyExpected HTTP status code.
-
-
-
Element Detail
-
id
String id
Optional annotation id used by dependsOn = "#id".- Returns:
- annotation id
- Default:
- ""
-
-
-
tags
String[] tags
Tags used to select this runner.- Returns:
- tags
- Default:
- {}
-
-
-
namespace
String namespace
Runner namespace.- Returns:
- namespace
- Default:
- ""
-
-
-
folder
String[] folder
Collection folder path from the collection root to the target folder.Each value represents one folder level. An empty value selects requests from the collection root.
folder = "Products" folder = { "level1", "level2", "level3" }- Returns:
- folder path levels from parent to child
- Default:
- {""}
-
-
-
include
String[] include
Request names to include.- Returns:
- included request names
- Default:
- {}
-
-
-
exclude
String[] exclude
Request names to exclude.- Returns:
- excluded request names
- Default:
- {}
-
-
-
rule
String rule
Rules section name.- Returns:
- rule name
- Default:
- ""
-
-
-
filter
String[] filter
Fields to keep in the context.- Returns:
- filter fields
- Default:
- {}
-
-
-
dependsOn
String[] dependsOn
Dependency method names.For runner launcher methods, a single runner dependency such as
dependsOn = "#testRunner"can reuse the referenced runner body with this annotation's tags when this runner does not define its own folder, include/exclude, executor, rule, filter, data, asserts, verify, soft, or lifecycle settings.- Returns:
- dependency method names
- Default:
- {}
-
-
-
executor
String executor
Executor id.- Returns:
- executor id
- Default:
- ""
-
-
-
log
String log
Local automatic JPostman failure output mode. Values are single-choice; use one value only.none- print only the minimum failure message and the first useful user-code stack frame.debug- print the configured debug output and use minimum failure output when debug isnone.error- print the failure message and include the trace.
- Returns:
- local automatic failure output mode
- Default:
- "debug"
-
-
-
lifecycle
boolean lifecycle
Enables request/response runner lifecycle callbacks.The default
falseinvokes blank-request@JPostman.Requestdependencies once for each selected collection request after that request is prepared, then invokes the runner method body after the response. Set this totrueto keep dependencies as one-time runner setup and enable the before-request/response lifecycle used byjpostman.runner().start(...),jpostman.runner().request(...), orjpostman.runner().response(...).- Returns:
trueto enable before-request and response lifecycle callbacks
- Default:
- false
-
-
-
data
String data
Data section name.- Returns:
- data section
- Default:
- ""
-
-
-
asserts
String[] asserts
Assertion section names.- Returns:
- assertion sections
- Default:
- {}
-
-