Spring and TestnG

27 views
Skip to first unread message

Edmondo Porcu

unread,
May 25, 2012, 12:13:13 PM5/25/12
to testng...@googlegroups.com
Dear all,

I have multiple tests which extends
AbstractTransactionalTestNGSpringContextTests and make use of


@TransactionConfiguration(transactionManager =
"startupDataTransactionManager", defaultRollback = true)
@ContextConfiguration(locations =
Array("classpath*:META-INF/spring/pu-nostartup.xml",
"classpath*:META-INF/spring/standalone/overrides.xml"))


When I run each test independent, they succeed, when I run them all
together in a suite they don't because the context is dirtied.


I tried to add @DirtiesContext at the top of each class, but this is ignored.

Can you please give me any suggestion?

Best Regards
Edmondo

Edmondo Porcu

unread,
May 29, 2012, 5:13:54 AM5/29/12
to testng...@googlegroups.com
This problems come back to the fact that @Afterclass annotation is not
processed correctly when coding in Scala.

Is there any viable workaround?

Best

2012/5/25 Edmondo Porcu <edmond...@gmail.com>:

Cédric Beust ♔

unread,
May 29, 2012, 12:59:56 PM5/29/12
to testng...@googlegroups.com
I'm not aware of this, I know several people who use TestNG and Scala without any problems. Can you show a small example?

-- 
Cédric




--
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,
Jun 4, 2012, 3:04:35 AM6/4/12
to testng...@googlegroups.com
Dear Cedric,
I tried to simplify and I cannot reproduce. That leads me to think
there's some problem in my code I can't see that prevents the
execution of @AfterClass correctly.

I am not the only one who met this problem, where would you suggest
looking into?

2012/5/29 Cédric Beust ♔ <ced...@beust.com>:
Reply all
Reply to author
Forward
0 new messages