TestNG interdependent tests across many files

30 views
Skip to first unread message

Edmondo Porcu

unread,
May 25, 2012, 6:02:10 AM5/25/12
to testng...@googlegroups.com
Dear all,

I have a big software project which I build with maven, and the
surefire plugins runs all the test. However some tests dependend on
others, and I would like to make this clear using the dependsOnGroup.

My questions is the following:

- If I make a test method depends on a group which is defined inside
another file, will I be able to run the test method in isolation
inside my IDE, for example? Or will I need to run it always inside a
suite containing the group I am depending on?


Best
Edmondo

Cédric Beust ♔

unread,
May 25, 2012, 11:14:35 AM5/25/12
to testng...@googlegroups.com
TestNG and Eclipse should automatically run the methods you depend on first. Try it and let me know if you're seeing something different.

-- 
Cédric




Edmondo

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
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.


Edmondo Porcu

unread,
May 25, 2012, 12:08:54 PM5/25/12
to testng...@googlegroups.com
When running inside Idea this is what I get:

25 mai 2012 17:48:58 com.gottex.gottware.common.utils.logging.GottwareLogger log
INFO: Creating notify containers to update values of illiquid swaps
org.testng.TestNGException:
Method "GottwareFraALaCartePricingTest.testALaCarteRepricing()[pri:0,
instance:com.gottex.gottware.server.test.integration.pricing.GottwareFraALaCartePricingTest@5a676437]"
depends on nonexistent group "Repricings"
at org.testng.DependencyMap.getMethodsThatBelongTo(DependencyMap.java:29)
at org.testng.TestRunner.createDynamicGraph(TestRunner.java:1071)
at org.testng.TestRunner.privateRun(TestRunner.java:724)
at org.testng.TestRunner.run(TestRunner.java:613)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)

:(

2012/5/25 Cédric Beust ♔ <ced...@beust.com>:

Cédric Beust ♔

unread,
May 25, 2012, 12:40:50 PM5/25/12
to testng...@googlegroups.com
Yes, notice I said "TestNG and Eclipse". Implicitly running dependencies requires specific support and I don't believe IDEA has it.

-- 
Cédric

Reply all
Reply to author
Forward
0 new messages