Hi

I use more and more arquillian and applicationcomposer (from tomee project)
to rwite my tests. Issue is you can't use both in the same JVM is test
ordering is random (ie 1 arquillian, 1 appcomposer, 1 appcomposer, 1
arquillian, ...).

Of course I could use a custom sorter but I think surefire could also
support to define by execution a set of runner, ie run in bulk all tests
using the same runner. It would avoid the need to define a custom category.

Config could look like:

<configuration>
   <executions> <!-- TreeMap -->
       <arquillian>org.jboss.arquillian.junit.Arquillian,
cucumber.runtime.arquillian.ArquillianCucumber,
cucumber.runtime.arquillian.CukeSpace   </arquillian>
      <others />
   </executions>
</configuration>

Meaning first execution will be arquillian (and I listed all runners I want
to take into account) and second one will be all tests not matching
previous executions.

In a more hardcoded way (ie only for arquillian and other) I wrote this
surefire child mojo:
https://gist.github.com/rmannibucau/cd6afae1d8a100067981

It uses asm to detect the runner.

Code could for sure be enhanced and simplified hacking in surefire itself
but it is functional.

wdyt?

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

Reply via email to