Skip to content

Default reporting flow

Dmitriy Gumeniuk edited this page Nov 29, 2019 · 3 revisions

Default reporting flow

Java client uses RxJava2 to provide async processing of requests/responses sent/received to/from the Report Portal API instance during tests execution. Lifecycle of created promises is managed by Launch implementation (LaunchImpl - default Report Portal implementation).
There are 3 methods to create a TestItem in the Report Portal instance:

    Root item - abstract public Maybe<String> startTestItem(final StartTestItemRQ rq)
    Child item - abstract public Maybe<String> startTestItem(final Maybe<String> parentId, final StartTestItemRQ rq)
    Retry item - abstract public Maybe<String> startTestItem(final Maybe<String> parentId, final Maybe<String> retryOf, final StartTestItemRQ rq)

All these methods return Maybe<String> with newly created TestItem#id.

Method to finish TestItem:

    abstract public Maybe<OperationCompletionRS> finishTestItem(Maybe<String> itemId, final FinishTestItemRQ rq)

This method accepts Maybe<String> containing TestItem#id to send request to the Report Portal instance.

During tests execution configured Report Portal agent invokes methods for TestItem creation on the Suite, Test, Test method, etc. start event and holds received Maybe<String> with TestItem#id in the context (depends on test framework). On finish event stored Maybe<String> is retrieved from the context and method to finish TestItem is invoked.