use of com.epam.ta.reportportal.ws.model.StartTestItemRQ in project service-api by reportportal.
the class TestItemBuilderTest method providedTestCaseIdTest.
@Test
void providedTestCaseIdTest() {
StartTestItemRQ request = new StartTestItemRQ();
request.setName("item");
request.setType("step");
String testCaseId = "my-test-case-id";
request.setTestCaseId(testCaseId);
TestItem testItem = new TestItemBuilder().addStartItemRequest(request).get();
assertEquals(testCaseId, testItem.getTestCaseId());
assertEquals(testCaseId.hashCode(), testItem.getTestCaseHash());
}
use of com.epam.ta.reportportal.ws.model.StartTestItemRQ in project service-api by reportportal.
the class XunitImportHandler method buildStartTestRq.
private StartTestItemRQ buildStartTestRq(String name) {
StartTestItemRQ rq = new StartTestItemRQ();
rq.setLaunchUuid(launchUuid);
rq.setStartTime(EntityUtils.TO_DATE.apply(startItemTime));
rq.setType(TestItemTypeEnum.TEST.name());
rq.setName(Strings.isNullOrEmpty(name) ? "no_name" : name);
return rq;
}
use of com.epam.ta.reportportal.ws.model.StartTestItemRQ in project service-api by reportportal.
the class XunitImportHandler method startStepItem.
private void startStepItem(String name, String duration) {
StartTestItemRQ rq = new StartTestItemRQ();
rq.setLaunchUuid(launchUuid);
rq.setStartTime(EntityUtils.TO_DATE.apply(startItemTime));
rq.setType(TestItemTypeEnum.STEP.name());
rq.setName(name);
String id = startTestItemHandler.startChildItem(user, projectDetails, rq, itemUuids.peek()).getId();
currentDuration = toMillis(duration);
currentItemUuid = id;
itemUuids.push(id);
}
use of com.epam.ta.reportportal.ws.model.StartTestItemRQ in project service-api by reportportal.
the class DemoDataTestItemService method startRootItem.
@Transactional
public String startRootItem(DemoItemMetadata metadata, RootMetaData rootMetaData) {
StartTestItemRQ rq = new StartTestItemRQ();
rq.setName(metadata.getName());
rq.setCodeRef(PACKAGE + metadata.getName());
rq.setLaunchUuid(rootMetaData.getLaunchUuid());
rq.setStartTime(new Date());
rq.setType(metadata.getType().name());
if (metadata.getType().sameLevel(SUITE)) {
rq.setAttributes(ContentUtils.getAttributesInRange(ATTRIBUTES_COUNT));
rq.setDescription(ContentUtils.getSuiteDescription());
}
return startTestItemHandler.startRootItem(rootMetaData.getUser(), rootMetaData.getProjectDetails(), rq).getId();
}
use of com.epam.ta.reportportal.ws.model.StartTestItemRQ in project agent-java-testNG by reportportal.
the class BuildStepTest method testStartConfigurationNullType.
@Test
public void testStartConfigurationNullType() {
when(testResult.getMethod()).thenReturn(testNGMethod);
StartTestItemRQ rq = testNGService.buildStartConfigurationRq(testResult, null);
assertThat("Incorrect method type", rq.getType(), nullValue());
}
Aggregations