I think that to achieve that you'd have to extend both Suite and Parameterized runner classes in order for the former to capture parameter data and pass it to child runners, and for latter to receive the parameter data not from the annotated method, but from the Suite runner.
– viaclecticMay 5 '12 at 16:14

4 Answers
4

i had a similar problem. it was fixed by creating an abstract class that contained the @Parameters and @RunWith(Parameterized.class). this class was extended by all the tests in the test suite. one of the things i found out is that @Parameters will be call before @BeforeClass and @Before, whether these annotations are inside your test suite or your test. hopefully this helps.

I want to run them from different test suites, each with a different value for MyParameter.

Your requirement is different to the normal behaviour of Parameterized: If you define a hierarchy of tests and assign the same set of parameters (Object[][]) to them, the JUnit framework will run tests with all parameters for the first test case, before it goes over to the next test case and runs it with all parameters.

So if you want to execute all tests for a single parameter first before going over to the next parameter, you need another runner. Have a look at this library that provides you with the ParameterizedSuite Runner.