public class ReportPortal
extends java.lang.Object
Retrofit as REST WS Client| Modifier and Type | Class and Description |
|---|---|
static class |
ReportPortal.Builder |
| Modifier and Type | Method and Description |
|---|---|
static ReportPortal.Builder |
builder()
Creates new builder for
ReportPortal |
static ReportPortal |
create(ReportPortalClient client,
ListenerParameters params)
Creates new ReportPortal based on already built dependencies
|
static ReportPortal |
create(ReportPortalClient client,
ListenerParameters params,
java.util.concurrent.ExecutorService executor)
Creates new ReportPortal based on already built dependencies
|
static boolean |
emitLaunchLog(java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)
Emits log message on Launch level if there is any active context attached to the current thread
|
static boolean |
emitLaunchLog(ReportPortalMessage message,
java.lang.String level,
java.util.Date time)
Emit log message to the current Launch.
|
static boolean |
emitLaunchLog(java.lang.String message,
java.lang.String level,
java.util.Date time)
Emits log message on Launch level if there is any active context attached to the current thread
|
static boolean |
emitLaunchLog(java.lang.String message,
java.lang.String level,
java.util.Date time,
java.io.File file)
Emits log message on Launch level if there is any active context attached to the current thread
|
static boolean |
emitLog(java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)
Emits log message if there is any active context attached to the current thread
|
static boolean |
emitLog(io.reactivex.Maybe<java.lang.String> itemUuid,
java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)
Emits log message if there is any active context attached to the current thread
|
static boolean |
emitLog(ReportPortalMessage message,
java.lang.String level,
java.util.Date time)
Emit log message to the current test item.
|
static boolean |
emitLog(java.lang.String message,
java.lang.String level,
java.util.Date time)
Emits log message if there is any active context attached to the current thread
|
static boolean |
emitLog(java.lang.String message,
java.lang.String level,
java.util.Date time,
java.io.File file)
Emits log message if there is any active context attached to the current thread
|
ReportPortalClient |
getClient() |
ListenerParameters |
getParameters() |
Launch |
newLaunch(com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ rq)
Starts launch in ReportPortal
|
static void |
sendStackTraceToRP(java.lang.Throwable cause)
Formats and reports a
Throwable to ReportPortal |
static com.epam.ta.reportportal.ws.model.log.SaveLogRQ |
toSaveLogRQ(java.lang.String launchUuid,
java.lang.String itemUuid,
java.lang.String level,
java.util.Date time,
ReportPortalMessage message)
Converts
ReportPortalMessage to SaveLogRQ. |
Launch |
withLaunch(io.reactivex.Maybe<java.lang.String> launchUuid)
Factory method for
ReportPortal that uses already started launch |
@Nonnull public Launch newLaunch(@Nonnull com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ rq)
rq - Request Data@Nonnull public Launch withLaunch(@Nonnull io.reactivex.Maybe<java.lang.String> launchUuid)
ReportPortal that uses already started launchlaunchUuid - Launch to be used@Nonnull public ListenerParameters getParameters()
@Nullable public ReportPortalClient getClient()
@Nonnull public static ReportPortal.Builder builder()
ReportPortalReportPortal@Nonnull public static ReportPortal create(ReportPortalClient client, ListenerParameters params)
client - ReportPortal Clientparams - ListenerParametersReportPortal@Nonnull public static ReportPortal create(@Nonnull ReportPortalClient client, @Nonnull ListenerParameters params, @Nonnull java.util.concurrent.ExecutorService executor)
client - ReportPortal Clientparams - ListenerParametersexecutor - An executor service which will be used for internal request / response queueReportPortalpublic static boolean emitLog(java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)
logSupplier - Log supplier. Converts current Item ID to the SaveLogRQ objectpublic static boolean emitLaunchLog(java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)
logSupplier - Log supplier. Converts current Item ID to the SaveLogRQ objectpublic static boolean emitLog(io.reactivex.Maybe<java.lang.String> itemUuid,
java.util.function.Function<java.lang.String,com.epam.ta.reportportal.ws.model.log.SaveLogRQ> logSupplier)
itemUuid - Test Item ID promiselogSupplier - Log supplier. Converts current Item ID to the SaveLogRQ objectpublic static boolean emitLog(java.lang.String message,
java.lang.String level,
java.util.Date time)
message - Log messagelevel - Log leveltime - Log timepublic static boolean emitLaunchLog(java.lang.String message,
java.lang.String level,
java.util.Date time)
message - Log messagelevel - Log leveltime - Log time@Nonnull
public static com.epam.ta.reportportal.ws.model.log.SaveLogRQ toSaveLogRQ(@Nullable
java.lang.String launchUuid,
@Nullable
java.lang.String itemUuid,
@Nonnull
java.lang.String level,
@Nonnull
java.util.Date time,
@Nonnull
ReportPortalMessage message)
ReportPortalMessage to SaveLogRQ.launchUuid - a UUID of the launchitemUuid - a UUID of the test itemlevel - message leveltime - timestamp of the messagemessage - an object to convertpublic static boolean emitLog(java.lang.String message,
java.lang.String level,
java.util.Date time,
java.io.File file)
message - Log messagelevel - Log leveltime - Log timefile - a file to attach to the log messagepublic static boolean emitLaunchLog(java.lang.String message,
java.lang.String level,
java.util.Date time,
java.io.File file)
message - Log messagelevel - Log leveltime - Log timefile - a file to attach to the log messagepublic static boolean emitLog(ReportPortalMessage message, java.lang.String level, java.util.Date time)
message - an instance of the messagelevel - message leveltime - timestamp of the messagepublic static boolean emitLaunchLog(ReportPortalMessage message, java.lang.String level, java.util.Date time)
message - an instance of the messagelevel - message leveltime - timestamp of the messagepublic static void sendStackTraceToRP(java.lang.Throwable cause)
Throwable to ReportPortalcause - a Throwable