Description
I'm currently working with a legacy test suite which has a very costly setup and teardown. It's old code which uses an extension of TestSetup to start and stop the server. It overrides setUp() to start the server and then loop through each class in the suite and inject references to server objects into them.
I'm trying to work out how to do this using the new @suite and @Suite.Class annotations. I've searched the web and read a lot of stuff on @rule and MethodRules. I cannot see how to do it. There doesn't appear to be any way that stuff setup in a @BeforeClass in a @suite annotated class can be passed/injected into the tests being run.
Another thought was to create an extension of Suite and override one or more methods. But I could see how to get information from the @BeforeClass method of the class annotated with @suite into each suite class after it is instantiated.