Ant - JUnit batchtests с разными sysproperties - PullRequest
0 голосов
/ 21 октября 2018

В настоящее время я работаю над проектом, использующим Ant в качестве системы сборки, и мне нужно добавить задачу JUnit с различными пакетными тестами в ней.
Каждый пакетный тест требует отдельного значения для свойства sysproperty.Я вижу, что тег batchtest не поддерживает вложенные свойства sysproperties.

Вот пример того, что мне нужно:

<junit dir="$myDir" printsummary="yes" haltonerror="yes" haltonfailure="yes" fork="yes" forkmode="perBatch" tempdir="tmpDir" maxmemory="4096m">
    <sysproperty key="CommonProperty1" value="value1" />
    <sysproperty key="CommonProperty2" value="value2" />

    <classpath>
        <path path="myClasspath" />
    </classpath>
    <formatter type="brief" usefile="false" />
    <formatter type="xml" />

    <batchtest todir="toDir">
        <sysproperty key="CustomProperty" value="Test1" />
        <fileset dir="myTestDir">
            <include name="Test1.java" />
        </fileset>
    </batchtest>
    <batchtest todir="toDir">
        <sysproperty key="CustomProperty" value="Test2" />
        <fileset dir="myTestDir">
            <include name="Test2.java" />
        </fileset>
    </batchtest>
</junit>

И размещение тега sysproperty внутри batchtest не работает ..

ДелаетКто-нибудь знает, как лучше всего справиться с этой ситуацией?
Спасибо

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...