Re: Maven 2 TestNG skipping some tests
On Tue, Sep 29, 2009 at 1:14 AM, Toby Hobson toby.hob...@googlemail.comwrote: I'm finding the TestNG plugin to be a bit flaky. For example I have a few tests defined in a couple of classes and I wanted to add a new test class so I created a new class: package com.pingmenow.services; import org.testng.annotations.Test; public class DummyTest { @Test public void dummyTest() { assert 1 == 2; } } Is the JVM being run without assertions being enabled? Typically, unless you provide the JVM the -ea command-line option, assertions are not used. I've always used the org.testng.Assert class in testNG classes instead of java assert keywords. This way it doesn't matter how the JVM is started. Can you try that to confirm that the test is executing? Hope this helps, Ed
Re: Maven and TestNG
Hello, try with this dependencies dependency groupIdorg.testng/groupId artifactIdtestng/artifactId version5.1/version scopetest/scope classifierjdk15/classifier /dependency /dependencies build plugins plugin artifactIdmaven-surefire-plugin/artifactId configuration suiteXmlFiles suiteXmlFilesrc/test/resources/testing.xml/suiteXmlFile /suiteXmlFiles /configuration /plugin /plugins /build hth marco
Re: Maven and TestNG
Thanks, that runs my tests. It a pity that I have to add all my packages to my testng.xml file. Do you know a way to say: recursively from this one? This is what I got now: suite name=All tests verbose=1 test name=All tests packages package name=net.sourceforge.vigilog/ package name=net.sourceforge.vigilog.parse/ package name=net.sourceforge.vigilog.models/ /packages classes class name= net.sourceforge.vigilog.parse.Log4jXMLFileLogFileParserTest methods exclude name=testBigFileParsing/ /methods /class /classes /test regards, Wim 2006/11/22, Marco Mistroni [EMAIL PROTECTED]: Hello, try with this dependencies dependency groupIdorg.testng/groupId artifactIdtestng/artifactId version5.1/version scopetest/scope classifierjdk15/classifier /dependency /dependencies build plugins plugin artifactIdmaven-surefire-plugin/artifactId configuration suiteXmlFiles suiteXmlFilesrc/test/resources/testing.xml/suiteXmlFile /suiteXmlFiles /configuration /plugin /plugins /build hth marco
Re: Maven and TestNG
Hello Wim, sorry havent' had a look at TestNG in a bit (i m doing it on my leasure time..which is almost null). I m sure there are parameters in TestNG with which you can configure dynamically the tests that run (for example, by making all tests part of the same group and specifying which test to run.. i m sure you can use wildcard with packages..). Pls have a look at TestNG documentation (or TestNG mailing list), you will find more help there hth marco On 11/22/06, Wim Deblauwe [EMAIL PROTECTED] wrote: Thanks, that runs my tests. It a pity that I have to add all my packages to my testng.xml file. Do you know a way to say: recursively from this one? This is what I got now: suite name=All tests verbose=1 test name=All tests packages package name=net.sourceforge.vigilog/ package name=net.sourceforge.vigilog.parse/ package name=net.sourceforge.vigilog.models/ /packages classes class name= net.sourceforge.vigilog.parse.Log4jXMLFileLogFileParserTest methods exclude name=testBigFileParsing/ /methods /class /classes /test regards, Wim 2006/11/22, Marco Mistroni [EMAIL PROTECTED]: Hello, try with this dependencies dependency groupIdorg.testng/groupId artifactIdtestng/artifactId version5.1/version scopetest/scope classifierjdk15/classifier /dependency /dependencies build plugins plugin artifactIdmaven-surefire-plugin/artifactId configuration suiteXmlFiles suiteXmlFilesrc/test/resources/testing.xml/suiteXmlFile /suiteXmlFiles /configuration /plugin /plugins /build hth marco