attrs.setProperty(XMLConstants.ATTR_ERRORS, "0"); attrs.setProperty(XMLConstants.ATTR_FAILURES, Integer.toString(m_numFailed)); attrs.setProperty(XMLConstants.ATTR_IGNORED, Integer.toString(context.getExcludedMethods().size())); try { attrs.setProperty(XMLConstants.ATTR_HOSTNAME, InetAddress.getLocalHost().getHostName());
private synchronized void createElementFromIgnoredTests(XMLStringBuffer doc, ITestContext context) { Collection<ITestNGMethod> methods = context.getExcludedMethods(); for (ITestNGMethod method : methods) { Properties properties = getPropertiesFor(method, 0); doc.push(XMLConstants.TESTCASE,properties); doc.addEmptyElement(XMLConstants.ATTR_IGNORED); doc.pop(); } }
private synchronized void createElementFromIgnoredTests( XMLStringBuffer doc, ITestContext context) { Collection<ITestNGMethod> methods = context.getExcludedMethods(); for (ITestNGMethod method : methods) { Properties properties = getPropertiesFor(method, 0); doc.push(XMLConstants.TESTCASE, properties); doc.addEmptyElement(XMLConstants.ATTR_IGNORED); doc.pop(); } }
attrs.setProperty(XMLConstants.ATTR_FAILURES, Integer.toString(m_numFailed)); attrs.setProperty( XMLConstants.ATTR_IGNORED, Integer.toString(context.getExcludedMethods().size())); try { attrs.setProperty(XMLConstants.ATTR_HOSTNAME, InetAddress.getLocalHost().getHostName());
failed += testContext.getFailedTests().size(); skipped += testContext.getSkippedTests().size(); ignored += testContext.getExcludedMethods().size();
ignored += testContext.getExcludedMethods().size();
private void addPendingMethods(ITestContext iTestContext) { for (ITestNGMethod method : iTestContext.getExcludedMethods()) { if (method.isTest() && !method.getEnabled() && isInActiveGroup(method, iTestContext)) { Description description = new Description().withValue(method.getDescription()); String suiteUid = getSuiteUid(iTestContext); TestCaseStartedEvent event = new TestCaseStartedEvent(suiteUid, method.getMethodName()); if (description.getValue() != null) { event.setDescription(description); } Annotation[] annotations = method.getConstructorOrMethod().getMethod().getAnnotations(); AnnotationManager am = new AnnotationManager(annotations); am.setDefaults(method.getInstance().getClass().getAnnotations()); am.update(event); getLifecycle().fire(event); getLifecycle().fire(new TestCasePendingEvent()); fireFinishTest(); } } }