for (int i = 0; i < suite.testCount(); i++) {
TestSuite ts = (TestSuite) suite.testAt(i);
if (!ts.getName().equals("JS component tests")) {
for (int j = 0; j < ts.testCount(); j++) {
try {
WebDriverTestCase test = (WebDriverTestCase) ts.testAt(j);
Set<BrowserType> browserList = WebDriverUtil.getBrowserListForTestRun(test.getTargetBrowsers(),
test.getExcludedBrowsers());
Set<BrowserType> ignoredBrowsers = EnumSet.complementOf(EnumSet.copyOf(browserList));
incrementCounters(test, ignoredBrowsers);
} catch (ClassCastException e) {
// If we have a test class without any test methods we don't get an error until we try cast the
// empty TestSuite to a WebDriverTestCase. Ignore and keep going.