Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 249798 Details for
Bug 409831
[JUnit] Importer for Ant's <junit> and <junitreport> test results should group by classname
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Fix v1
eclipse.jdt.ui.patch (text/plain), 2.81 KB, created by
Markus Keller
on 2015-01-08 12:55:18 EST
(
hide
)
Description:
Fix v1
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2015-01-08 12:55:18 EST
Size:
2.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.junit.core >diff --git src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java >index f97c8d3..64154b6 100644 >--- src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java >+++ src/org/eclipse/jdt/internal/junit/model/TestRunHandler.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2007, 2013 IBM Corporation and others. >+ * Copyright (c) 2007, 2015 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -47,6 +47,7 @@ > private TestSuiteElement fTestSuite; > private TestCaseElement fTestCase; > private Stack/*<Boolean>*/ fNotRun= new Stack(); >+ private int fAntJUnitLevel; > > private StringBuffer fFailureBuffer; > private boolean fInExpected; >@@ -121,6 +122,7 @@ > // support standalone suites and Ant's 'junitreport' task: > fTestRunSession= new TestRunSession(name, null); > fTestSuite= fTestRunSession.getTestRoot(); >+ fAntJUnitLevel= 1; > } > > String pack= attributes.getValue(IXMLTags.ATTR_PACKAGE); >@@ -135,6 +137,19 @@ > } else if (qName.equals(IXMLTags.NODE_TESTCASE)) { > String name= attributes.getValue(IXMLTags.ATTR_NAME); > String classname= attributes.getValue(IXMLTags.ATTR_CLASSNAME); >+ if (!fTestSuite.getClassName().equals(classname)) { >+ if (fAntJUnitLevel == 1) { >+ // recover suites that have been flattened by Ant's 'junitreport' task >+ fAntJUnitLevel++; >+ fTestSuite= (TestSuiteElement) fTestRunSession.createTestElement(fTestSuite, getNextId(), classname, true, 0); >+ fNotRun.push(Boolean.FALSE); >+ } else if (fAntJUnitLevel == 2) { >+ handleTestElementEnd(fTestSuite); >+ fTestSuite= fTestSuite.getParent(); >+ fTestSuite= (TestSuiteElement) fTestRunSession.createTestElement(fTestSuite, getNextId(), classname, true, 0); >+ fNotRun.push(Boolean.FALSE); >+ } >+ } > fTestCase= (TestCaseElement) fTestRunSession.createTestElement(fTestSuite, getNextId(), name + '(' + classname + ')', false, 0); > fNotRun.push(Boolean.valueOf(attributes.getValue(IXMLTags.ATTR_INCOMPLETE))); > fTestCase.setIgnored(Boolean.valueOf(attributes.getValue(IXMLTags.ATTR_IGNORED)).booleanValue()); >@@ -208,6 +223,11 @@ > } else if (qName.equals(IXMLTags.NODE_TESTSUITE)) { > handleTestElementEnd(fTestSuite); > fTestSuite= fTestSuite.getParent(); >+ if (fAntJUnitLevel == 2) { >+ fAntJUnitLevel--; >+ handleTestElementEnd(fTestSuite); >+ fTestSuite= fTestSuite.getParent(); >+ } > //TODO: end suite: compare counters? > > } else if (qName.equals(IXMLTags.NODE_PROPERTIES) || qName.equals(IXMLTags.NODE_PROPERTY)) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 409831
: 249798