Search in sources :

Example 6 with TestCaseExporter

use of com.endava.cats.report.TestCaseExporter in project cats by Endava.

the class FunctionalFuzzerTest method setup.

@BeforeEach
void setup() {
    catsDSLParser = new CatsDSLParser();
    catsUtil = new CatsUtil(catsDSLParser);
    serviceCaller = Mockito.mock(ServiceCaller.class);
    filesArguments = new FilesArguments(catsUtil);
    customFuzzerUtil = new CustomFuzzerUtil(serviceCaller, catsUtil, testCaseListener, catsDSLParser);
    functionalFuzzer = new FunctionalFuzzer(filesArguments, customFuzzerUtil);
    filesArguments.getCustomFuzzerDetails().clear();
    ReflectionTestUtils.setField(testCaseListener, "testCaseExporter", Mockito.mock(TestCaseExporter.class));
}
Also used : FilesArguments(com.endava.cats.args.FilesArguments) CatsUtil(com.endava.cats.util.CatsUtil) CustomFuzzerUtil(com.endava.cats.fuzzer.CustomFuzzerUtil) ServiceCaller(com.endava.cats.io.ServiceCaller) TestCaseExporter(com.endava.cats.report.TestCaseExporter) CatsDSLParser(com.endava.cats.dsl.CatsDSLParser) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 7 with TestCaseExporter

use of com.endava.cats.report.TestCaseExporter in project cats by Endava.

the class RecommendedHttpCodesContractInfoFuzzerTest method setup.

@BeforeEach
void setup() {
    Instance<TestCaseExporter> exporters = Mockito.mock(Instance.class);
    TestCaseExporter exporter = Mockito.mock(TestCaseExporterHtmlJs.class);
    Mockito.when(exporters.stream()).thenReturn(Stream.of(exporter));
    testCaseListener = Mockito.spy(new TestCaseListener(Mockito.mock(CatsGlobalContext.class), Mockito.mock(ExecutionStatisticsListener.class), exporters, Mockito.mock(IgnoreArguments.class), Mockito.mock(ReportingArguments.class)));
    recommendedHttpCodesContractInfoFuzzer = new RecommendedHttpCodesContractInfoFuzzer(testCaseListener);
}
Also used : IgnoreArguments(com.endava.cats.args.IgnoreArguments) ExecutionStatisticsListener(com.endava.cats.report.ExecutionStatisticsListener) ReportingArguments(com.endava.cats.args.ReportingArguments) CatsGlobalContext(com.endava.cats.model.CatsGlobalContext) TestCaseExporter(com.endava.cats.report.TestCaseExporter) TestCaseListener(com.endava.cats.report.TestCaseListener) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 8 with TestCaseExporter

use of com.endava.cats.report.TestCaseExporter in project cats by Endava.

the class SecuritySchemesContractInfoFuzzerTest method setup.

@BeforeEach
void setup() {
    Instance<TestCaseExporter> exporters = Mockito.mock(Instance.class);
    TestCaseExporter exporter = Mockito.mock(TestCaseExporterHtmlJs.class);
    Mockito.when(exporters.stream()).thenReturn(Stream.of(exporter));
    testCaseListener = Mockito.spy(new TestCaseListener(Mockito.mock(CatsGlobalContext.class), Mockito.mock(ExecutionStatisticsListener.class), exporters, Mockito.mock(IgnoreArguments.class), Mockito.mock(ReportingArguments.class)));
    securitySchemesContractInfoFuzzer = new SecuritySchemesContractInfoFuzzer(testCaseListener);
}
Also used : IgnoreArguments(com.endava.cats.args.IgnoreArguments) ExecutionStatisticsListener(com.endava.cats.report.ExecutionStatisticsListener) ReportingArguments(com.endava.cats.args.ReportingArguments) CatsGlobalContext(com.endava.cats.model.CatsGlobalContext) TestCaseExporter(com.endava.cats.report.TestCaseExporter) TestCaseListener(com.endava.cats.report.TestCaseListener) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 9 with TestCaseExporter

use of com.endava.cats.report.TestCaseExporter in project cats by Endava.

the class TopLevelElementsContractInfoFuzzerTest method setup.

@BeforeEach
void setup() {
    Instance<TestCaseExporter> exporters = Mockito.mock(Instance.class);
    TestCaseExporter exporter = Mockito.mock(TestCaseExporterHtmlJs.class);
    Mockito.when(exporters.stream()).thenReturn(Stream.of(exporter));
    testCaseListener = Mockito.spy(new TestCaseListener(Mockito.mock(CatsGlobalContext.class), Mockito.mock(ExecutionStatisticsListener.class), exporters, Mockito.mock(IgnoreArguments.class), Mockito.mock(ReportingArguments.class)));
    topLevelElementsContractInfoFuzzer = new TopLevelElementsContractInfoFuzzer(testCaseListener);
}
Also used : IgnoreArguments(com.endava.cats.args.IgnoreArguments) ExecutionStatisticsListener(com.endava.cats.report.ExecutionStatisticsListener) ReportingArguments(com.endava.cats.args.ReportingArguments) CatsGlobalContext(com.endava.cats.model.CatsGlobalContext) TestCaseExporter(com.endava.cats.report.TestCaseExporter) TestCaseListener(com.endava.cats.report.TestCaseListener) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 10 with TestCaseExporter

use of com.endava.cats.report.TestCaseExporter in project cats by Endava.

the class VersionsContractInfoFuzzerTest method setup.

@BeforeEach
void setup() {
    Instance<TestCaseExporter> exporters = Mockito.mock(Instance.class);
    TestCaseExporter exporter = Mockito.mock(TestCaseExporterHtmlJs.class);
    Mockito.when(exporters.stream()).thenReturn(Stream.of(exporter));
    testCaseListener = Mockito.spy(new TestCaseListener(Mockito.mock(CatsGlobalContext.class), Mockito.mock(ExecutionStatisticsListener.class), exporters, Mockito.mock(IgnoreArguments.class), Mockito.mock(ReportingArguments.class)));
    versionsContractInfoFuzzer = new VersionsContractInfoFuzzer(testCaseListener);
}
Also used : IgnoreArguments(com.endava.cats.args.IgnoreArguments) ExecutionStatisticsListener(com.endava.cats.report.ExecutionStatisticsListener) ReportingArguments(com.endava.cats.args.ReportingArguments) CatsGlobalContext(com.endava.cats.model.CatsGlobalContext) TestCaseExporter(com.endava.cats.report.TestCaseExporter) TestCaseListener(com.endava.cats.report.TestCaseListener) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

TestCaseExporter (com.endava.cats.report.TestCaseExporter)11 BeforeEach (org.junit.jupiter.api.BeforeEach)11 IgnoreArguments (com.endava.cats.args.IgnoreArguments)8 ReportingArguments (com.endava.cats.args.ReportingArguments)8 CatsGlobalContext (com.endava.cats.model.CatsGlobalContext)8 ExecutionStatisticsListener (com.endava.cats.report.ExecutionStatisticsListener)8 TestCaseListener (com.endava.cats.report.TestCaseListener)8 FilesArguments (com.endava.cats.args.FilesArguments)3 ServiceCaller (com.endava.cats.io.ServiceCaller)3 CatsUtil (com.endava.cats.util.CatsUtil)3 CatsDSLParser (com.endava.cats.dsl.CatsDSLParser)2 CustomFuzzerUtil (com.endava.cats.fuzzer.CustomFuzzerUtil)2