public function main(&$testsRun, $file = null) { $status = -1; //Print HTML tags for the result page if ($_POST['output'] == "html") { header('Content-type: text/html; charset=UTF-8'); HtmlPrinter::PrintHtmlHeader("Test Results"); HtmlPrinter::PrintFormHeader("Run.php"); } //Open the file here if the file resource is null. //This is in the case a test is executed from HTML form. if (null == $file) { $file = fopen("UnitTests.log", "w"); } //If initialization is successful then run the test and clean up if (self::Initialize()) { $status = self::RunTest($testsRun, $file); self::CleanUp(); } //Close HTML tags for the output if ($_POST['output'] == "html") { HtmlPrinter::PrintHtmlFooter(); } return $status; }
public function main() { HtmlPrinter::PrintHtmlHeader("HttpEnt Tests"); HtmlPrinter::PrintFormHeader("Run.php"); //Add your tests here //HtmlPrinter::PrintTestCases("YourTestName", "Path to database file where your data is stored", "Http") HtmlPrinter::PrintTestCases("FeatureService", "../../TestData/FeatureService/FeatureServiceTest.dump", "HttpEnt"); HtmlPrinter::PrintSelectTestMode(); HtmlPrinter::PrintSelectOutput(); HtmlPrinter::PrintFormFooter("HttpEnt", "RunTests"); HtmlPrinter::PrintHtmlFooter(); }
public function main() { HtmlPrinter::PrintHtmlHeader("Http Tests"); HtmlPrinter::PrintFormHeader("Run.php"); //Add your tests here //HtmlPrinter::PrintTestCases("YourTestName", "Path to database file where your data is stored", "Api") HtmlPrinter::PrintTestCases("ResourceService", "../../TestData/ResourceService/ResourceServiceTest.dump", "Http"); HtmlPrinter::PrintTestCases("DrawingService", "../../TestData/DrawingService/DrawingServiceTest.dump", "Http"); HtmlPrinter::PrintTestCases("FeatureService", "../../TestData/FeatureService/FeatureServiceTest.dump", "Http"); HtmlPrinter::PrintTestCases("MappingService", "../../TestData/MappingService/MappingServiceTest.dump", "Http"); HtmlPrinter::PrintTestCases("SiteServiceTests", "../../TestData/SiteService/SiteServiceTest.dump", "Http"); HtmlPrinter::PrintTestCases("WfsTests", "../../TestData/Wfs/WfsTest.dump", "Http"); HtmlPrinter::PrintTestCases("WmsTests", "../../TestData/Wms/WmsTest.dump", "Http"); HtmlPrinter::PrintSelectTestMode(); HtmlPrinter::PrintSelectOutput(); HtmlPrinter::PrintFormFooter("Http", "RunTests"); HtmlPrinter::PrintHtmlFooter(); }