use of de.ipk_gatersleben.bit.bi.bridge.brapicomp.testing.reports.TestCollectionReport in project IPK-BrAPI-Validator by plantbreeding.
the class CallTestSuiteRunner method runTests.
/**
* Run the tests
*
* @return Test report
*/
public TestSuiteReport runTests() {
TestSuiteReport testSuiteReport = new TestSuiteReport(id, url);
TestCollectionRunner testCollectionRunner = new TestCollectionRunner(testCollection, url);
TestCollectionReport tcr = testCollectionRunner.runTestsFromCall();
testSuiteReport.addTestCollectionReport(tcr);
return testSuiteReport;
}
use of de.ipk_gatersleben.bit.bi.bridge.brapicomp.testing.reports.TestCollectionReport in project IPK-BrAPI-Validator by plantbreeding.
the class TestCollectionRunner method runTests.
/**
* Runs the tests specified in the TestCollection config
*
* @return Test report.
*/
public TestCollectionReport runTests() {
String name = testCollection.getInfo().getName();
TestCollectionReport tcr = new TestCollectionReport(name, url);
String baseUrl = url.replaceAll("/$", "");
VariableStorage storage = new VariableStorage(baseUrl);
List<Folder> folderList = testCollection.getItem();
folderList.forEach(folder -> {
TestFolderRunner tfr = new TestFolderRunner(baseUrl, folder, storage);
TestFolderReport tfReport = tfr.runTests();
tcr.addFolder(tfReport);
});
tcr.setVariables(storage);
return tcr;
}
use of de.ipk_gatersleben.bit.bi.bridge.brapicomp.testing.reports.TestCollectionReport in project IPK-BrAPI-Validator by plantbreeding.
the class CustomTestSuiteRunner method runTests.
/**
* Run the tests
*
* @return Test report
*/
public TestSuiteReport runTests() {
TestSuiteReport testSuiteReport = new TestSuiteReport(id, url);
TestCollectionRunner testCollectionRunner = new TestCollectionRunner(testCollection, url);
TestCollectionReport tcr = testCollectionRunner.runTests();
testSuiteReport.addTestCollectionReport(tcr);
return testSuiteReport;
}
use of de.ipk_gatersleben.bit.bi.bridge.brapicomp.testing.reports.TestCollectionReport in project IPK-BrAPI-Validator by plantbreeding.
the class TestCollectionRunner method runTestsFromCall.
public TestCollectionReport runTestsFromCall() {
String name = testCollection.getInfo().getName();
TestCollectionReport tcr = new TestCollectionReport(name, url);
String baseUrl = url.replaceAll("/$", "");
VariableStorage storage = new VariableStorage(baseUrl);
List<Folder> folderList = testCollection.getItem();
List<String> doneTests = new ArrayList<String>();
for (int i = 0; i < folderList.size(); i++) {
TestFolderRunner tfr = new TestFolderRunner(baseUrl, folderList.get(i), storage);
TestFolderReport tfReport;
if (i == 0) {
tfReport = tfr.runTests(doneTests);
} else {
tfReport = tfr.runTestsFromCall(doneTests);
}
tcr.addFolder(tfReport);
}
;
tcr.setVariables(storage);
return tcr;
}
Aggregations