public class StepStorage extends InheritableThreadLocal<Deque<ru.yandex.qatools.allure.model.Step>>
create new step storage | root() -> null start step1 | step1() -> root() -> null finish step1 | root(step1()) -> null start step2 | step2() -> root(step1()) -> null finish step2 | root(step1() -> step2()) -> null ...In the end just get all children of root step. It's step three which you can see in report
Allure| Constructor and Description |
|---|
StepStorage() |
| Modifier and Type | Method and Description |
|---|---|
ru.yandex.qatools.allure.model.Step |
adopt()
Move last step to children of previous step.
|
protected Deque<ru.yandex.qatools.allure.model.Step> |
childValue(Deque<ru.yandex.qatools.allure.model.Step> parentValue)
In case parent thread spawn thread we need create a new queue
for child thread but use the only one root step.
|
ru.yandex.qatools.allure.model.Step |
createRootStep()
Construct new root step.
|
ru.yandex.qatools.allure.model.Step |
getLast()
Retrieves, but does not remove, the last element of this deque.
|
protected Deque<ru.yandex.qatools.allure.model.Step> |
initialValue()
Returns the current thread's "initial value".
|
ru.yandex.qatools.allure.model.Step |
pollLast()
Removes the last element of deque in the current thread's copy of this
thread-local variable.
|
void |
put(ru.yandex.qatools.allure.model.Step step)
Inserts the specified element into the queue represented by this deque
|
get, remove, set, withInitialpublic static final Object LOCK
protected Deque<ru.yandex.qatools.allure.model.Step> initialValue()
Deque with root step createRootStep()initialValue in class ThreadLocal<Deque<ru.yandex.qatools.allure.model.Step>>protected Deque<ru.yandex.qatools.allure.model.Step> childValue(Deque<ru.yandex.qatools.allure.model.Step> parentValue)
childValue in class InheritableThreadLocal<Deque<ru.yandex.qatools.allure.model.Step>>parentValue - value from parent threadpublic ru.yandex.qatools.allure.model.Step getLast()
public void put(ru.yandex.qatools.allure.model.Step step)
step - the element to addpublic ru.yandex.qatools.allure.model.Step pollLast()
createRootStep()public ru.yandex.qatools.allure.model.Step adopt()
before: step1(...) -> step2(child1 -> ... -> childN) -> step3(...) -> ... -> null after: step2(child1 -> ... -> childN -> step1(...)) -> step3(...) -> ... -> null
public ru.yandex.qatools.allure.model.Step createRootStep()
Copyright © 2017 Yandex. All rights reserved.