Execute gauge maven project with tags
Ashraf407 opened this issue · 2 comments
Hi Team,
// IntelIij
// Gauge-maven I am using
I am executing my specs files with tags based on the profile creation please find this command .
"mvn test -P profileName."
So with out profile creation I have excuted all the specs while using this command based on some plugin changes.
"Mvn test"
My question is Is there any possibility to execute the spec with tags by using this command.
"Mvn test"
I have to do some change in pom could u please help me. I need to execute my spec files with specified tags by calling only this command.
Mvn test.
Thanks,
Ashraf
@Ashraf407 The mvn test
runs all the specification by default. It can be overridden in your pom.xml
you can these lines to your pom.xml
<build>
<plugins>
<plugin>
<groupId>com.thoughtworks.gauge.maven</groupId>
<artifactId>gauge-maven-plugin</artifactId>
<version>1.4.0</version>
<executions>
<execution>
<phase>test</phase>
<configuration>
<specsDir>specs</specsDir>
<tags>ADD YOUR TAGS HEAR</tags>
</configuration>
<goals>
<goal>execute</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Reger to https://github.com/getgauge-contrib/gauge-maven-plugin#as-a-part-of-maven-test-phase
As an alternative you can also use mvn gauge:execute
command.
Example : mvn gauge:execute -DspecsDir=specs -Dtags="sometags"
Thanks team.