Search in sources :

Example 31 with TestItemResults

use of com.epam.ta.reportportal.entity.item.TestItemResults in project service-api by reportportal.

the class PredicatesTest method checkCanBeIndexed.

@Test
void checkCanBeIndexed() {
    TestItem testItem = new TestItem();
    testItem.setType(TestItemTypeEnum.STEP);
    final TestItemResults itemResults = new TestItemResults();
    final IssueEntity issueEntity = new IssueEntity();
    issueEntity.setIgnoreAnalyzer(false);
    final IssueType issueType = new IssueType();
    issueType.setIssueGroup(new IssueGroup(TestItemIssueGroup.PRODUCT_BUG));
    issueEntity.setIssueType(issueType);
    itemResults.setIssue(issueEntity);
    testItem.setItemResults(itemResults);
    assertTrue(ITEM_CAN_BE_INDEXED.test(testItem), "Item should be available for indexing");
}
Also used : TestItemIssueGroup(com.epam.ta.reportportal.entity.enums.TestItemIssueGroup) IssueGroup(com.epam.ta.reportportal.entity.item.issue.IssueGroup) IssueType(com.epam.ta.reportportal.entity.item.issue.IssueType) IssueEntity(com.epam.ta.reportportal.entity.item.issue.IssueEntity) TestItemResults(com.epam.ta.reportportal.entity.item.TestItemResults) TestItem(com.epam.ta.reportportal.entity.item.TestItem) Test(org.junit.jupiter.api.Test)

Example 32 with TestItemResults

use of com.epam.ta.reportportal.entity.item.TestItemResults in project service-api by reportportal.

the class AnalyzerUtilsTest method createTest.

private TestItem createTest() {
    TestItem testItem = new TestItem();
    testItem.setItemId(1L);
    testItem.setStartTime(LocalDateTime.now(ZoneOffset.UTC));
    testItem.setUniqueId("uniqueId");
    testItem.setItemResults(new TestItemResults());
    return testItem;
}
Also used : TestItemResults(com.epam.ta.reportportal.entity.item.TestItemResults) TestItem(com.epam.ta.reportportal.entity.item.TestItem) IndexTestItem(com.epam.ta.reportportal.ws.model.analyzer.IndexTestItem) AnalyzerUtils.fromTestItem(com.epam.ta.reportportal.core.analyzer.auto.impl.AnalyzerUtils.fromTestItem)

Example 33 with TestItemResults

use of com.epam.ta.reportportal.entity.item.TestItemResults in project service-api by reportportal.

the class LogIndexerServiceTest method createTestItem.

private TestItem createTestItem(Long id, TestItemIssueGroup issueGroup) {
    TestItem ti = new TestItem();
    ti.setItemId(id);
    ti.setLaunchId(id);
    ti.setItemResults(new TestItemResults());
    IssueType issueType = new IssueType();
    issueType.setLocator(issueGroup.getLocator());
    IssueEntity issueEntity = new IssueEntity();
    issueEntity.setIssueType(issueType);
    issueEntity.setIgnoreAnalyzer(false);
    ti.getItemResults().setIssue(issueEntity);
    return ti;
}
Also used : IssueType(com.epam.ta.reportportal.entity.item.issue.IssueType) IssueEntity(com.epam.ta.reportportal.entity.item.issue.IssueEntity) TestItemResults(com.epam.ta.reportportal.entity.item.TestItemResults) TestItem(com.epam.ta.reportportal.entity.item.TestItem)

Example 34 with TestItemResults

use of com.epam.ta.reportportal.entity.item.TestItemResults in project service-api by reportportal.

the class SuggestItemServiceTest method getRelevantItem.

private TestItem getRelevantItem() {
    TestItem relevantItem = new TestItem();
    relevantItem.setItemId(2L);
    TestItemResults relevantItemRes = new TestItemResults();
    relevantItemRes.setEndTime(LocalDateTime.now());
    relevantItem.setItemResults(relevantItemRes);
    return relevantItem;
}
Also used : TestItemResults(com.epam.ta.reportportal.entity.item.TestItemResults) TestItem(com.epam.ta.reportportal.entity.item.TestItem)

Aggregations

TestItemResults (com.epam.ta.reportportal.entity.item.TestItemResults)34 TestItem (com.epam.ta.reportportal.entity.item.TestItem)29 Test (org.junit.jupiter.api.Test)18 ReportPortalUser (com.epam.ta.reportportal.commons.ReportPortalUser)14 Launch (com.epam.ta.reportportal.entity.launch.Launch)13 ReportPortalException (com.epam.ta.reportportal.exception.ReportPortalException)10 IssueEntity (com.epam.ta.reportportal.entity.item.issue.IssueEntity)8 ReportPortalUserUtil.getRpUser (com.epam.ta.reportportal.ReportPortalUserUtil.getRpUser)7 IssueType (com.epam.ta.reportportal.entity.item.issue.IssueType)7 User (com.epam.ta.reportportal.entity.user.User)7 StatusEnum (com.epam.ta.reportportal.entity.enums.StatusEnum)6 ItemAttribute (com.epam.ta.reportportal.entity.ItemAttribute)5 IssueGroup (com.epam.ta.reportportal.entity.item.issue.IssueGroup)5 Statistics (com.epam.ta.reportportal.entity.statistics.Statistics)5 FinishTestItemRQ (com.epam.ta.reportportal.ws.model.FinishTestItemRQ)5 OperationCompletionRS (com.epam.ta.reportportal.ws.model.OperationCompletionRS)5 TestItemIssueGroup (com.epam.ta.reportportal.entity.enums.TestItemIssueGroup)4 Parameter (com.epam.ta.reportportal.entity.item.Parameter)4 MessageBus (com.epam.ta.reportportal.core.events.MessageBus)3 StatusChangingStrategy (com.epam.ta.reportportal.core.item.impl.status.StatusChangingStrategy)3