Добрый день, подскажите где и как прописать в POM.xml подпроекта параметры для запуска тестов с аннотацией @Category? Сейчас при запуске automation тестов запускаются Green, Yellow и Red тесты не зависимо от того какие я пометила в POM.xml как true. Параметры запуска важно прописать именно в pom.хml отдельного модуля, а не главного pom так как automation test являются модулем в проекте и в главном pom есть свои Green, Yellow и Red тесты. При запуске тестов я запускаю не весь проект, а только модуль с automation test.
Сейчас у меня это реализовано так:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skipTests>false</skipTests>
<includes>
<include>**/*Test*.java</include>
</includes>
<excludedGroups>com.sunpower.automation.test.SmokeTest</excludedGroups>
<systemPropertyVariables>
<profile.type>${profile.type}</profile.type>
<webdriver.chrome.driver>${webdriverchromepath}</webdriver.chrome.driver>
<starting.page>${starting.page}</starting.page>
<values.file>${values.file}</values.file>
<driver.type>${driver.type}</driver.type>
<load.timeout.sec>${load.timeout.sec}</load.timeout.sec>
<remote.selenium.url>${remote.selenium.url}</remote.selenium.url>
<login>${login}</login>
<password>${password}</password>
<screenshots.path>${screenshots.path}</screenshots.path>
<browser.closed.on.success>${browser.closed.on.success}</browser.closed.on.success>
</systemPropertyVariables>
</configuration>
</execution>
<execution>
<id>run-green-tests</id>
<phase>test</phase>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<groups>com.sunpower.automation.category.GreenCategory.class</groups>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
<execution>
<id>run-red-tests</id>
<phase>test</phase>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<groups>com.sunpower.automation.category.RedCategory.class</groups>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
<execution>
<id>run-yellow-tests</id>
<phase>test</phase>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<groups>com.sunpower.automation.category.YellowCategory.class</groups>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>