ops4j / org.ops4j.pax.exam2

Pax Exam is a testing framework for OSGi
https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/
Apache License 2.0
84 stars 100 forks source link

Support @BeforeClass and @AfterClass in pax-exam-invoker-junit [PAXEXAM-288] #417

Open ops4j-issues opened 13 years ago

ops4j-issues commented 13 years ago

Andreas Pieber created PAXEXAM-288

@BeforeClass and @AfterClass is currently not supported by pax-exam-invoker-junit


Affects: 2.2.0 Fixed in: unscheduled Votes: 0, Watches: 0

ops4j-issues commented 13 years ago

Harald Wellmann commented

Don't think we should further delay 2.3.0 by working on this. Class-level methods do not work with the current design of one probe service per test method. To support class-level methods, the probe service would have to correspond to a class, and then it would be up to the invoker to invoke JUnit and have it run the class with all test mehthods and all method and class level befores and afters.

This is easy enough for the invoker, but it has an impact on all drivers (the Player and the experimental TestNG driver), so I think we need some more analysis before starting to work on this feature.

ops4j-issues commented 13 years ago

Andreas Pieber commented

I'm completely with you on this harald. Though we might warn about this problem somewhere on the side. If someone tries them they fail with a very strange test failure which can cost you hours to discover...