in mustella/src/main/java/marmotinni/MarmotinniRunner.java [59:101]
public boolean runTest(WebDriver webDriver, String scriptName)
{
if (tagMap == null)
setupMap();
tests = new ArrayList<TestCase>();
System.out.println("running script " + scriptName);
SAXParserFactory spf = SAXParserFactory.newInstance();
try {
//get a new instance of parser
SAXParser sp = spf.newSAXParser();
//parse the file and also register this class for call backs
sp.parse(scriptName, this);
}catch(SAXException se) {
se.printStackTrace();
}catch(ParserConfigurationException pce) {
pce.printStackTrace();
}catch (IOException ie) {
ie.printStackTrace();
}
boolean success = true;
System.out.println("test case count: " + tests.size());
for (TestCase testCase : tests)
{
this.testCase = testCase;
testCase.runTest(webDriver);
TestResult testResult = testCase.getTestResult();
testResult.scriptName = scriptName;
if (!testResult.hasStatus())
testResult.result = TestResult.PASS;
else
{
System.out.println("test failure");
success = false;
}
System.out.println(testResult.toString());
}
return success;
}