Search in sources :

Example 1 with ReportPortal

use of com.epam.reportportal.service.ReportPortal in project agent-java-testNG by reportportal.

the class ParametersBypassTest method initMocks.

@BeforeEach
public void initMocks() {
    TestUtils.mockLaunch(client, "launchUuid", suitedUuid, testClassUuid, testMethodUuidList);
    final ReportPortal reportPortal = ReportPortal.create(client, standardParameters());
    TestReportPortalListener.initReportPortal(reportPortal);
}
Also used : ReportPortal(com.epam.reportportal.service.ReportPortal) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with ReportPortal

use of com.epam.reportportal.service.ReportPortal in project agent-java-testNG by reportportal.

the class TestNameAndDescriptionTest method initMocks.

@BeforeEach
public void initMocks() {
    mockLaunch(client, namedUuid("launchUuid"), suitedUuid, testClassUuid, stepUuid);
    ReportPortal reportPortal = ReportPortal.create(client, standardParameters());
    TestNgListener.initReportPortal(reportPortal);
}
Also used : ReportPortal(com.epam.reportportal.service.ReportPortal) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with ReportPortal

use of com.epam.reportportal.service.ReportPortal in project agent-java-testNG by reportportal.

the class TestWithFailedRetryAndDependentMethods method initMocks.

@BeforeEach
public void initMocks() {
    mockLaunch(client, namedUuid("launchUuid"), suitedUuid, testClassUuid, testUuidList);
    ReportPortal reportPortal = ReportPortal.create(client, standardParameters());
    TestListener.initReportPortal(reportPortal);
}
Also used : ReportPortal(com.epam.reportportal.service.ReportPortal) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 4 with ReportPortal

use of com.epam.reportportal.service.ReportPortal in project agent-java-testNG by reportportal.

the class LaunchFinishShutdownHookRemoveTest method main.

public static void main(String... args) throws InterruptedException {
    int port = Integer.parseInt(args[0]);
    System.out.println("Executing using port: " + port);
    ExecutorService myExecutor = Executors.newSingleThreadExecutor(r -> {
        Thread t = new Thread(r);
        t.setDaemon(true);
        return t;
    });
    ListenerParameters parameters = TestUtils.standardParameters();
    parameters.setBaseUrl("http://localhost:" + port);
    ReportPortal client = ReportPortal.builder().withParameters(parameters).withExecutorService(myExecutor).build();
    MyTestNgService service = new MyTestNgService(client);
    service.startLaunch();
    System.out.println("Launch started, sleeping...");
    Thread.sleep(TimeUnit.SECONDS.toMillis(5));
    System.out.println("Finishing launch.");
    service.finishLaunch();
    System.out.println("Exiting...");
}
Also used : ExecutorService(java.util.concurrent.ExecutorService) ListenerParameters(com.epam.reportportal.listeners.ListenerParameters) ReportPortal(com.epam.reportportal.service.ReportPortal)

Example 5 with ReportPortal

use of com.epam.reportportal.service.ReportPortal in project agent-java-testNG by reportportal.

the class LaunchFinishShutdownHookTest method main.

public static void main(String... args) throws InterruptedException {
    int port = Integer.parseInt(args[0]);
    System.out.println("Executing using port: " + port);
    ExecutorService myExecutor = Executors.newSingleThreadExecutor(r -> {
        Thread t = new Thread(r);
        t.setDaemon(true);
        return t;
    });
    ListenerParameters parameters = TestUtils.standardParameters();
    parameters.setBaseUrl("http://localhost:" + port);
    ReportPortal client = ReportPortal.builder().withParameters(parameters).withExecutorService(myExecutor).build();
    MyTestNgService service = new MyTestNgService(client);
    service.startLaunch();
    System.out.println("Launch started, sleeping...");
    Thread.sleep(TimeUnit.SECONDS.toMillis(3));
    System.out.println("Exiting...");
}
Also used : ExecutorService(java.util.concurrent.ExecutorService) ListenerParameters(com.epam.reportportal.listeners.ListenerParameters) ReportPortal(com.epam.reportportal.service.ReportPortal)

Aggregations

ReportPortal (com.epam.reportportal.service.ReportPortal)24 BeforeEach (org.junit.jupiter.api.BeforeEach)17 ListenerParameters (com.epam.reportportal.listeners.ListenerParameters)7 StartLaunchRQ (com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ)4 SaveLogRQ (com.epam.ta.reportportal.ws.model.log.SaveLogRQ)4 Launch (com.epam.reportportal.service.Launch)3 ParameterKey (com.epam.reportportal.annotations.ParameterKey)2 TestCaseId (com.epam.reportportal.annotations.TestCaseId)2 Attributes (com.epam.reportportal.annotations.attribute.Attributes)2 ItemType (com.epam.reportportal.junit5.ItemType)2 SystemAttributesFetcher.collectSystemAttributes (com.epam.reportportal.junit5.SystemAttributesFetcher.collectSystemAttributes)2 ItemTreeUtils.createItemTreeKey (com.epam.reportportal.junit5.utils.ItemTreeUtils.createItemTreeKey)2 ItemStatus (com.epam.reportportal.listeners.ItemStatus)2 TestCaseIdEntry (com.epam.reportportal.service.item.TestCaseIdEntry)2 TestItemTree (com.epam.reportportal.service.tree.TestItemTree)2 TestItemTree.createTestItemLeaf (com.epam.reportportal.service.tree.TestItemTree.createTestItemLeaf)2 AttributeParser (com.epam.reportportal.utils.AttributeParser)2 ParameterUtils (com.epam.reportportal.utils.ParameterUtils)2 TestCaseIdUtils (com.epam.reportportal.utils.TestCaseIdUtils)2 com.epam.ta.reportportal.ws.model (com.epam.ta.reportportal.ws.model)2