maven


Running single integration test through terminal [duplicate]


This question already has an answer here:
How to run individual test in the integration-test target in maven
6 answers
I have some integration tests in my project under src/test-integration/java.
I have no problem in running integration tests.
But how do i run a single integration test through Terminal?
When i use mvn integration-test -Darg1=data1 it runs all the integration tests.
I tried using mvn integration-test -Dagr1=data1 -Dtest=IntegrationTestClass1 but it did not work
Any solutions?
I am using maven-surefire-plugin-2.9 and maven-failsafe-plugin-2.6
Read this artice: Running a Single Test
Proper way to execute single integration test is to use property it.test
mvn -Dagr1=data1 -Dit.test=IntegrationTestClass1 verify
If this is not working then publish your pom.xml, because src/test-integration/java is not standard location for integrations test.
Standard location for all tests by conventions is src/test/java. All integration test by default should have suffix IT. This is default failsafe configuration for integration tests.
Below is my pom.xml, i can not chare my full pom because of some restrictions but this is the gist of it
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.9</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.8.1</version>
</dependency>
</dependencies>
<configuration>
<skipTests>false</skipTests>
<failIfNoTests>false</failIfNoTests>
<includes>
<include>**/*.class</include>
</includes>
<excludedGroups>com.IntegrationTest</excludedGroups>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.6</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.8.1</version>
</dependency>
</dependencies>
<configuration>
<reuseForks>true</reuseForks>
<groups>com.IntegrationTest</groups>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<skipITs>false</skipITs>
<skipTests>false</skipTests>
<includes>
<include>**/*.class</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>

Related Links

Install fail for Maven 3.0.4
maven password encryption (settings-security.xml) not working using external binary through m2e
Service unavailable error while building using Maven
Deploy a maven site into Alfresco through FTP
Three-level pom (company - project - module) - problems with module project(s)
Effect of “overriding” exclusions in maven dependency
Maven - why maven won't download the dependency pom in addition to the jar file
Run Makefile + Ant Buildfile inside Maven pom.xml
play framework in heroku with maven
Trying to compile mahout but getting error - Cannot execute mojo: resources. Build is not using pom.xml
Configure maven-shade-plugin to include src/main/webapp
Set maven to use archiva repositories WITHOUT using activeByDefault?
Verbatim Text in Doxia APT Table
schema or reference for maven-metadata.xml in maven 3 (specifically for <latest/>, <release/>)?
maven - How to build uberjars with dependencies
encrypt maven passwords within eclipse using m2e

Categories

HOME
maven
gerrit
mediawiki
ngrx
kde
lodash
dot
bookshelf.js
jira
retrofit
synchronization
cloudkit
python-unittest
modelica
task
circuit
caml
worldwind
foselasticabundle
ef-migrations
connection-string
emulator
predix
paging
tapestry
bootstrap-tour
p-value
sqlcipher
opennlp
minitab
buck
gsmcomm
sql-server-2012-express
twilio-api
winrt-xaml-toolkit
mapbox-gl
nssegmentedcontrol
restlet
dism
quadratic-programming
vao
apache-fop
pango
errordocument
theming
worksheet
return-value
pillow
linode
sqldf
lync-client-sdk
firmata
color-picker
nxt
instant
grails-tomcat-plugin
intrusion-detection
trash
storekit
angstrom-linux
whois
rvest
dlna
hsv
ios8-today-widget
reactive-banana
collapse
kcachegrind
android-listview
mono-embedding
graph-api-explorer
c++03
gui-test-framework
onactivityresult
openexr
article
starcluster
yorick
system.net.webexception
mysql-error-1062
hyprlinkr
mcts
page-layout
mylyn
ember-app-kit
free-variable
runas
hgsubversion
bigcouch
gwt-ext
doh
coredump
coercion
table-footer
actionview
html-input
audio-capture
pascal-fc
text-coloring
aquaticprime

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App