4848import org .testng .internal .objects .pojo .BasicAttributes ;
4949import org .testng .internal .objects .pojo .CreationAttributes ;
5050import org .testng .internal .thread .graph .SuiteWorkerFactory ;
51- import org .testng .junit .JUnitTestFinder ;
5251import org .testng .log4testng .Logger ;
5352import org .testng .reporters .EmailableReporter2 ;
5453import org .testng .reporters .FailedReporter ;
@@ -129,12 +128,8 @@ public class TestNG {
129128 protected List <XmlSuite > m_suites = Lists .newArrayList ();
130129 private List <XmlSuite > m_cmdlineSuites ;
131130 private String m_outputDir = DEFAULT_OUTPUTDIR ;
132-
133131 private String [] m_includedGroups ;
134132 private String [] m_excludedGroups ;
135-
136- private Boolean m_isJUnit = XmlSuite .DEFAULT_JUNIT ;
137- private Boolean m_isMixed = XmlSuite .DEFAULT_MIXED ;
138133 protected boolean m_useDefaultListeners = true ;
139134 private boolean m_failIfAllTestsSkipped = false ;
140135 private final List <String > m_listenersToSkipFromBeingWiredIn = new ArrayList <>();
@@ -545,11 +540,6 @@ private List<XmlSuite> createCommandLineSuitesForClasses(Class[] classes) {
545540 if (test != null ) {
546541 suiteName = defaultIfStringEmpty (test .getSuiteName (), suiteName );
547542 testName = defaultIfStringEmpty (test .getTestName (), testName );
548- } else {
549- if (m_isMixed && JUnitTestFinder .isJUnitTest (c )) {
550- isJUnit = true ;
551- testName = c .getName ();
552- }
553543 }
554544 XmlSuite xmlSuite = suites .get (suiteName );
555545 if (xmlSuite == null ) {
@@ -572,7 +562,6 @@ private List<XmlSuite> createCommandLineSuitesForClasses(Class[] classes) {
572562 if (xmlTest == null ) {
573563 xmlTest = new XmlTest (xmlSuite );
574564 xmlTest .setName (testName );
575- xmlTest .setJUnit (isJUnit );
576565 }
577566
578567 xmlTest .getXmlClasses ().add (xmlClasses [i ]);
@@ -1329,10 +1318,6 @@ private void populateSuiteGraph(
13291318 * @param xmlSuite Xml Suite (and its children) for which {@code SuiteRunner}s are created
13301319 */
13311320 private void createSuiteRunners (SuiteRunnerMap suiteRunnerMap /* OUT */ , XmlSuite xmlSuite ) {
1332- if (null != m_isJUnit && !m_isJUnit .equals (XmlSuite .DEFAULT_JUNIT )) {
1333- xmlSuite .setJUnit (m_isJUnit );
1334- }
1335-
13361321 // If the skip flag was invoked on the command line, it
13371322 // takes precedence
13381323 if (null != m_skipFailedInvocationCounts ) {
@@ -1526,8 +1511,6 @@ protected void configure(CommandLineArgs cla) {
15261511 setExcludedGroups (cla .excludedGroups );
15271512 setTestJar (cla .testJar );
15281513 setXmlPathInJar (cla .xmlPathInJar );
1529- setJUnit (cla .junit );
1530- setMixed (cla .mixed );
15311514 setSkipFailedInvocationCounts (cla .skipFailedInvocationCounts );
15321515 toggleFailureIfAllTestsWereSkipped (cla .failIfAllTestsSkipped );
15331516 setListenersToSkipFromBeingWiredInViaServiceLoaders (cla .spiListenersToSkip .split ("," ));
@@ -1695,7 +1678,6 @@ public void configure(Map cmdLineArgs) {
16951678 result .excludedGroups = (String ) cmdLineArgs .get (CommandLineArgs .EXCLUDED_GROUPS );
16961679 result .testJar = (String ) cmdLineArgs .get (CommandLineArgs .TEST_JAR );
16971680 result .xmlPathInJar = (String ) cmdLineArgs .get (CommandLineArgs .XML_PATH_IN_JAR );
1698- result .junit = (Boolean ) cmdLineArgs .get (CommandLineArgs .JUNIT );
16991681 result .mixed = (Boolean ) cmdLineArgs .get (CommandLineArgs .MIXED );
17001682 Object tmpValue = cmdLineArgs .get (CommandLineArgs .INCLUDE_ALL_DATA_DRIVEN_TESTS_WHEN_SKIPPING );
17011683 if (tmpValue != null ) {
@@ -1825,23 +1807,6 @@ private IReporter newReporterInstance(ReporterConfig config) {
18251807 return reporter ;
18261808 }
18271809
1828- /**
1829- * Specify if this run should be made in JUnit mode
1830- *
1831- * @param isJUnit - Specify if this run should be made in JUnit mode
1832- */
1833- public void setJUnit (Boolean isJUnit ) {
1834- m_isJUnit = isJUnit ;
1835- }
1836-
1837- /** @param isMixed Specify if this run should be made in mixed mode */
1838- public void setMixed (Boolean isMixed ) {
1839- if (isMixed == null ) {
1840- return ;
1841- }
1842- m_isMixed = isMixed ;
1843- }
1844-
18451810 /**
18461811 * Double check that the command line parameters are valid.
18471812 *
@@ -1870,13 +1835,6 @@ protected static void validateCommandLineParameters(CommandLineArgs args) {
18701835 && (testNgXml == null || testNgXml .isEmpty ())) {
18711836 throw new ParameterException ("Groups option should be used with testclass option" );
18721837 }
1873-
1874- Boolean junit = args .junit ;
1875- Boolean mixed = args .mixed ;
1876- if (junit && mixed ) {
1877- throw new ParameterException (
1878- CommandLineArgs .MIXED + " can't be combined with " + CommandLineArgs .JUNIT );
1879- }
18801838 }
18811839
18821840 /** @return true if at least one test failed. */
0 commit comments