private void runTestNgTest( String version, boolean validateRunOrder )
throws Exception
{
final OutputValidator outputValidator = unpack( "testng-simple" ).resetInitialGoals( version ).executeTest();
outputValidator.verifyErrorFreeLog().assertTestSuiteResults( 3, 0, 0, 0 );
if ( validateRunOrder )
{
// assert correct run order of tests
List<ReportTestSuite> report =
HelperAssertions.extractReports( new File[] { outputValidator.getBaseDir() } );
assertEquals( 3, report.size() );
assertTrue( "TestNGSuiteTestC was executed first", getTestClass( report, 0 ).endsWith( "TestNGSuiteTestC" ) );
assertTrue( "TestNGSuiteTestB was executed second", getTestClass( report, 1 ).endsWith( "TestNGSuiteTestB" ) );