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.StringdebugLocal JPostman debug override.String[]dependsOnDependency method names.booleanenabledString[]excludeRequest names to exclude.StringexecutorSelects a namedJPostman.Executorby method name or"#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.StringnamespaceRunner namespace.String[]rulesRules section names.booleanskipString[]tagsTags used to select this runner.intverifyExpected HTTP status code for every request executed by this runner.
-
-
-
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:
- {}
-
-
-
rules
String[] rules
Rules section names.- Returns:
- rule names
- 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, rules, filter, data, asserts, verify, or lifecycle settings.- Returns:
- dependency method names
- Default:
- {}
-
-
-
verify
int verify
Expected HTTP status code for every request executed by this runner. Response and call dependencies inherit this value only while the runner is active. Standalone response and call test methods remain separate executions.- Returns:
- expected HTTP status code,
-1to use the context default,0to pass without status verification, or1to mark the completed test skipped
- Default:
- -1
-
-
-
executor
String executor
Selects a namedJPostman.Executorby method name or"#id". Leave empty to use the single executor or the executor without an id.- Returns:
- executor selector, or empty string for automatic/default selection
- Default:
- ""
-
-
-
debug
String debug
Local JPostman debug override.Use
debugto inherit the context debug setting. Usenoneto suppress output,errorfor the full failure trace,requestfor prepared-request diagnostics,responsefor received-response diagnostics,infofor runtime annotation information, orallfor all local diagnostics. Request, response, info, and all are printed after annotation execution for both passing and failing executions. The localerrormode is different: it is printed only for failures and is deferred until after the JPostman report execution details.- Returns:
- local debug setting
- Default:
- "debug"
-
-
-
lifecycle
boolean lifecycle
Enables request/response runner lifecycle callbacks.The default
falseinvokes the runner method body once after all selected collection requests reach runner completion, including aggregate HTTP/verification failures. Blank-request@JPostman.Requestdependencies still apply per selected request. Set this totrueto keep dependencies as one-time runner setup and invoke the runner body after each attempted HTTP request (including completed failed responses), with the before-request phase additionally enabled for fluent runner rules 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:
- {}
-
-