diff --git a/src/test/java/com/epam/reportportal/karate/id/ScenarioTestCaseIdTest.java b/src/test/java/com/epam/reportportal/karate/id/ScenarioTestCaseIdTest.java index e83a431..cc2cbdb 100644 --- a/src/test/java/com/epam/reportportal/karate/id/ScenarioTestCaseIdTest.java +++ b/src/test/java/com/epam/reportportal/karate/id/ScenarioTestCaseIdTest.java @@ -49,7 +49,7 @@ public void test_test_case_id(boolean report) { } else { results = TestUtils.runAsHook(rp, TEST_FEATURE); } - assertThat(results.getFailCount(), equalTo(0));; + assertThat(results.getFailCount(), equalTo(0)); ArgumentCaptor captor = ArgumentCaptor.forClass(StartTestItemRQ.class); verify(client, times(1)).startTestItem(captor.capture()); diff --git a/src/test/java/com/epam/reportportal/karate/launch/LaunchRequiredFieldsTest.java b/src/test/java/com/epam/reportportal/karate/launch/LaunchRequiredFieldsTest.java index 7d4cd6a..d98bd33 100644 --- a/src/test/java/com/epam/reportportal/karate/launch/LaunchRequiredFieldsTest.java +++ b/src/test/java/com/epam/reportportal/karate/launch/LaunchRequiredFieldsTest.java @@ -21,8 +21,11 @@ import com.epam.reportportal.service.ReportPortalClient; import com.epam.reportportal.util.test.CommonUtils; import com.epam.ta.reportportal.ws.model.launch.StartLaunchRQ; +import com.intuit.karate.Results; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.ValueSource; import org.mockito.ArgumentCaptor; import java.util.List; @@ -37,6 +40,7 @@ import static org.mockito.Mockito.verify; public class LaunchRequiredFieldsTest { + private static final String TEST_FEATURE = "classpath:feature/simple.feature"; private final String featureId = CommonUtils.namedId("feature_"); private final String scenarioId = CommonUtils.namedId("scenario_"); private final List stepIds = Stream.generate(() -> CommonUtils.namedId("step_")) @@ -51,9 +55,15 @@ public void setupMock() { mockBatchLogging(client); } - @Test - public void verify_start_launch_request_contains_required_fields() { - var results = TestUtils.runAsReport(rp, "classpath:feature/simple.feature"); + @ParameterizedTest + @ValueSource(booleans = {true, false}) + public void verify_start_launch_request_contains_required_fields(boolean report) { + Results results; + if (report) { + results = TestUtils.runAsReport(rp, TEST_FEATURE); + } else { + results = TestUtils.runAsHook(rp, TEST_FEATURE); + } assertThat(results.getFailCount(), equalTo(0)); ArgumentCaptor startCaptor = ArgumentCaptor.forClass(StartLaunchRQ.class);