TestNG 6.3.1

64 views
Skip to first unread message

Cédric Beust ♔

unread,
Nov 25, 2011, 2:41:45 PM11/25/11
to testng...@googlegroups.com
Hi everyone,

I just released TestNG 6.3.1, which is a minor release mostly targeted at those of you who reported bugs that I fixed since 6.3. It is now available on Maven central. I also updated the Eclipse plug-in, which contains a slightly improved tree view for tests that use factories.

Here is the change log:

6.3.1
10/22/2011
  • Added: New system property: dataproviderthreadcount (Bill Ross)
  • Fixed: Configuration methods were reported incorrectly in listeners.
  • Fixed: Was creating too many listeners (Jacek Pulut)
  • Fixed: IAnnotationTransformer2 beforeTest/afterTest booleans were not being set
  • Fixed: GITHUB-92: @BeforeTest method in a super class will be called multiple time when alwayRun = true (Bubuntux)
  • Fixed: GITHUB-111: @AfterClass on base classes run once too many (lrivera)
  • Fixed: GITHUB-107: Displaying 0 tests run if a listener modifies the parameters of the suite
-- 
Cédric


Jorg Heymans

unread,
Mar 5, 2012, 5:11:55 AM3/5/12
to testng...@googlegroups.com
Hi,

I was trying to track down a regression in our test suite and pinned it down to an upgrade to this version. Basically when we run our test suite with 6.3 i get a total of 86 tests run, when i then only change the version to 6.3.1 i get 151 tests run and some test exceptions.

Our setup in suite.xml is like this

<suite name="mysuite" verbose="5">
  <suite-files>
    <suite-file path="0-core.xml" />
    <suite-file path="1core-configuration.xml" />
  </suite-files>
</suite>

0-core.xml :

<suite name="mycore" verbose="5">
  <test name="core">
    <packages>
      <package name="my.core.*" />
      <package name="my.web.*" />
      <package name="my.util.*" />
    </packages>
  </test>
  <test name="context">
    <packages>
      <package name="my.context.*" />
    </packages>
  </test>
  <test name="monitoring">
    <packages>
      <package name="my.monitoring.*" />
    </packages>
  </test>
</suite>

1core-configuration.xml

<suite name="mycore-configuration" verbose="5">
  <test name="configuration">
    <packages>
      <package name="my.configuration.*" />
    </packages>
  </test>
</suite>

We run tests through maven3, with version 2.12 of the surefire plugin:

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12</version>
        <configuration>
          <systemProperties>
            <property>
              <!-- used by Suite.java for initialization -->
              <name>outputDirectory</name>
              <value>${project.build.directory}/test-classes/configuration</value>
            </property>
          </systemProperties>
          <suiteXmlFiles>
            <suiteXmlFile>src/test/resources/suite.xml</suiteXmlFile>
          </suiteXmlFiles>
        </configuration>
      </plugin>

Suite.java has this
public class Suite {

    @Parameters( { "outputDirectory" })
    @BeforeSuite(alwaysRun = true)
    public void createRunningModeFile(String outputDirectory) throws Exception {
        // copy file to not interfere with other tests
        FileUtils.copyFile(ResourceUtils.getFile("classpath:configuration/RUNNING_MODE_PROPERTY_COPY"), new File(
                outputDirectory + "/RUNNING_MODE_PROPERTY"));
    }

    @AfterSuite(alwaysRun = true)
    @Parameters( { "outputDirectory" })
    public void removeRunningModeFile(String outputDirectory) {
        // remove file again
        File f = new File(outputDirectory + "/RUNNING_MODE_PROPERTY");
        if (f.exists()) {
            FileUtils.deleteQuietly(f);
            f.deleteOnExit();
        }
    }
}

Any ideas on what change exactly is causing this ? 

Thanks
Jorg

Cédric Beust ♔

unread,
Mar 5, 2012, 2:38:02 PM3/5/12
to testng...@googlegroups.com
Hi Jorg,

By any chance, would you be able to narrow it down to a smaller set of tests? 
-- 
Cédric




--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/T9M95IJmuXIJ.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

Jorg Heymans

unread,
Mar 6, 2012, 3:25:00 AM3/6/12
to testng...@googlegroups.com
Thanks Cedric.

Here's what i'm seeing, every test run is done from the command line using 'mvn clean test'

Using 6.2 and verbose="5" on all <test> elements
       Tests run: 86, Failures: 0, Errors: 0, Skipped: 0
Using 6.2 without the verbose attribute
       Tests run: 86, Failures: 0, Errors: 0, Skipped: 0

Using 6.3.1 and verbose="5" on all <test> elements:
       Tests run: 139, Failures: 1, Errors: 0, Skipped: 0
Using 6.3.1 without the verbose attribute:
       Tests run: 151, Failures: 3, Errors: 0, Skipped: 16

Using 6.4, and verbose="5" on all <test> elements
       Tests run: 139, Failures: 1, Errors: 0, Skipped: 0
Using 6.4 without the verbose attribute:
       Tests run: 145, Failures: 2, Errors: 0, Skipped: 11

This is quite confusing to say the least.

Jorg
Hi Jorg,

To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
Hi Jorg,

To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
Hi Jorg,

To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages