Adam Murdoch-3 wrote: > >> Would this allow me to freely reorder test classes without losing any >> Gradle-provided testing features like running tests in parallel? >> > Yes. > I don't see how this could be achieved with the current TestClassProcessor. Maybe you can explain.
Adam Murdoch-3 wrote: > >> How about just letting me provide an ordered list of classes to the test >> task? Or a comparator? >> > This is a possibility. How would the list of classes work? Would you > take over the test detection? > List of classes: yes (Spock already has test detection, so it would be easy for me to do) Comparator: no (that's why I suggested it) Adam Murdoch-3 wrote: > > I wanted something general purpose, which could do whatever filtering > and reordering (or duplication or failure thresholds or whatever) it > wants. And then, later, we would add convenience methods which take, > say, a comparator. > In terms of the public extension point, I had thought the other way around: First provide a hook which is simple to design, simple to use, and easy to commit yourself to (my hope was that I could get this one "immediately"). At a later point add a more sophisticated hook. But I'm open to other approaches. I've written a Spock extension called OptimizeRunOrderExtension. It collects metrics such as the number of times a test has succeeded in a row and the test's duration. Collecting the metrics works in any environment and thus I don't need help from Gradle's side for this. The metrics are then used for reordering classes and their methods: elements that have failed more recently or have run faster come first. However, the JUnit @RunWith SPI only lets me reorder the methods within a class - it doesn't give me control over the order in which classes are run. So for class reordering I need a hook provided by the IDE or build system. Now that I think of it, optimizing test run order (with the aim of providing faster feedback to the user) might also make an attractive feature for Gradle's test framework. Cheers, Peter -- View this message in context: http://old.nabble.com/Running-test-classes-in-a-custom-order-tp28792765p28846724.html Sent from the gradle-user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
