On Thu, Jul 27, 2023 at 3:33 PM Laird Nelson <ljnel...@gmail.com> wrote:

> Now I'm running Surefire 3.1.2 and noting that this all no longer seems
> necessary: running mvn test -Dx=y without any special XML to "turn it into"
> a System property works fine (my test can assert
> System.getProperty("x").equals("y")).
>

One other little nugget here: this seems to work by default, but what does
not work is simply defining a property in my pom.xml:

<properties>
    <x>y</x>
</properties>

In this case, without using <systemPropertyVariables> in my Surefire
configuration, x is not propagated as a System property through to my unit
tests. If I specify it as -Dx=y on the command line, it is.

Maybe this is old pre-existing behavior? Maybe something changed? I would
love to know what the supported behavior is or should be.

Best,
Laird

>

Reply via email to