public class TraceContext extends Object
org.apache.log4j.Logger.getLogger(TraceContext.class).setLevel(org.apache.log4j.Level.DEBUG);
Constructor and Description |
---|
TraceContext() |
Modifier and Type | Method and Description |
---|---|
Tracer |
checkpoint()
Returns a tracer containing the current state of trace list.
|
com.atlassian.pageobjects.elements.query.TimedCondition |
condition(Tracer tracer,
String key)
Waits for the occurrence of a trace with the given key after the given tracer.
|
com.atlassian.pageobjects.elements.query.TimedCondition |
condition(Tracer tracer,
String key,
org.hamcrest.Matcher<?> argumentMatcher)
Waits for the occurrence of a trace with the given key and optionally arguments after the given tracer.
|
com.atlassian.pageobjects.elements.query.TimedCondition |
condition(Tracer tracer,
String key,
Pattern argumentPattern)
Waits for the occurrence of a trace with the given key and optionally arguments after the given tracer.
|
com.atlassian.pageobjects.elements.query.TimedCondition |
conditionFromPageLoad(String key)
Return a
TimedCondition that waits for the occurrence of a trace at some point after the page load. |
static void |
consumeCheckpoint(java.util.function.Consumer<Tracer> consumer) |
<T> T |
doWithCheckpoint(java.util.function.Supplier<T> supplier)
Used together with
CheckpointTracer annotation to inject page objects
with Tracer instance obtained just before supplier invocation. |
boolean |
exists(Tracer tracer,
String key) |
boolean |
exists(Tracer tracer,
String key,
org.hamcrest.Matcher<?> argumentMatcher)
Check whether trace record of given key exists, also test argument if argumentPattern is provided
|
boolean |
exists(Tracer tracer,
String key,
Pattern argumentPattern)
Check whether trace record of given key exists, also test argument if argumentPattern is provided
|
List<String> |
getAllTraceIds() |
List<Map<String,Object>> |
getArguments(Tracer tracer,
String key) |
void |
waitFor(Tracer tracer,
String key)
Waits for the occurrence of a trace with the given key after the given tracer.
|
void |
waitFor(Tracer tracer,
String key,
org.hamcrest.Matcher<?> argumentMatcher)
Waits for the occurrence of a trace with the given key and optionally test argument against given argumentMatcher
|
void |
waitFor(Tracer tracer,
String key,
Pattern argumentPattern)
Waits for the occurrence of a trace with the given key and optionally test argument against given argumentPattern
|
public Tracer checkpoint()
public <T> T doWithCheckpoint(java.util.function.Supplier<T> supplier)
CheckpointTracer
annotation to inject page objects
with Tracer
instance obtained just before supplier
invocation.T
- supplier
- Action to performsupplier
CheckpointTracerPostProcessor
public static void consumeCheckpoint(java.util.function.Consumer<Tracer> consumer)
public void waitFor(Tracer tracer, String key)
tracer
- checkpoint. Only traces after this checkpoint will be inspected.key
- tracer key to watch forpublic void waitFor(Tracer tracer, String key, @Nullable Pattern argumentPattern)
tracer
- checkpoint. Only traces after this checkpoint will be inspected.key
- tracer key to watch forargumentPattern
- test argument of JIRA.trace call(after key argument)public void waitFor(Tracer tracer, String key, @Nullable org.hamcrest.Matcher<?> argumentMatcher)
tracer
- checkpoint. Only traces after this checkpoint will be inspected.key
- tracer key to watch forargumentMatcher
- test argument of JIRA.trace call(after key argument).public boolean exists(Tracer tracer, String key, @Nullable Pattern argumentPattern)
tracer
- checkpoint. Only traces after this checkpoint will be inspected.key
- tracer key to watch forargumentPattern
- test argument of JIRA.trace call(after key argument)public boolean exists(Tracer tracer, String key, @Nullable org.hamcrest.Matcher<?> argumentMatcher)
tracer
- checkpoint. Only traces after this checkpoint will be inspected.key
- tracer key to watch forargumentMatcher
- test argument of JIRA.trace call(after key argument).public com.atlassian.pageobjects.elements.query.TimedCondition conditionFromPageLoad(String key)
TimedCondition
that waits for the occurrence of a trace at some point after the page load.key
- the key to check for.TimedCondition
that waits for the occurrence of a trace at some point after the page load.public com.atlassian.pageobjects.elements.query.TimedCondition condition(Tracer tracer, String key)
tracer
- checkpoint. Only traces after this checkpoint will be inspected.key
- tracer key to watch forpublic com.atlassian.pageobjects.elements.query.TimedCondition condition(Tracer tracer, String key, Pattern argumentPattern)
tracer
- checkpoint. Only traces after this checkpoint will be inspected.key
- tracer key to watch forargumentPattern
- check consecutive arguments of JIRA.trace call(after key argument)public com.atlassian.pageobjects.elements.query.TimedCondition condition(Tracer tracer, String key, @Nullable org.hamcrest.Matcher<?> argumentMatcher)
tracer
- checkpoint. Only traces after this checkpoint will be inspected.key
- tracer key to watch forargumentMatcher
- check consecutive arguments of JIRA.trace call(after key argument)Copyright © 2002-2023 Atlassian. All Rights Reserved.