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

How to get snapshot from Sonatype
Cannot use dependency jboss-javaee-6.0 in my Maven project
Reusing ant-snippets in multi-module maven build
How to check the latest version of the reporting plugin?
Static compile .groovy by default using maven
How to maven release multiple profiles project when redeploys are disabled
maven error when running in cygwin?
batch updating manifest.mf for existing jars using maven
How to setup a local mirror of eclipse artifacts for mvn tycho plugin?
Intelli J IDEA takes forever to update indices
Configuring CXF codegen plugin
Maven Not downloading some JARs when adding repository for another dependencies
Can maven sortpom plugin affect a project's build result?
[error]Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy
maven nested properties ${${}}
How do I add javadocs for restlet using Maven?

Categories

HOME
compiler-construction
wso2-am
testng
debugging
amazon-ec2
urbancode
stock
fft
syntax
cplex
bookshelf.js
cmd
jsrender
electronics
retrofit
basic
maude-system
wheelnav.js
apache-cayenne
spring-tool-suite
commonmark
dtrace
hex-editors
visual-studio-cordova
database-replication
karma-jasmine
google-pagespeed
textfield
jprofiler
visjs
autoconf
css-animations
google-search-api
tibco-mdm
format-specifiers
buildbot
fish
user-interaction
saas
wtx
atlassian-crucible
webkitspeechrecognition
sql-server-2012-express
frame
ecto
google-cloud-endpoints-v2
jspresso
typed.js
commit
avcapturesession
amazon-kinesis-kpl
jmonkeyengine
restlet
xcode-extension
theano.scan
squib
preconditions
quadratic-programming
apple-news
auto-update
google-datalayer
zip4j
errordocument
gabor-filter
recursive-datastructures
magma
android-cursor
redundancy
orthogonal
eventkit
jquery-filter
probability-density
py2app
sigabrt
photobucket
browser-link
jfugue
ruby-2.2
sysinternals
umbraco6
system.reflection
operator-precedence
xc16
wordpress-theme-customize
eol
elliptic-curve
java.nio.file
monomac
quantlib-swig
cdc
soundtouch
flash-builder4.5
file-locking
batterylevel
android-hardware
robotics-studio
simba
mhtml
bitsharp
isnullorempty
gil
mt
uiviewanimation-curve
reddot
spring-portlet-mvc
code-cleanup
routedevent
castle-monorail
audio-capture
kdbg
uimenucontroller
boost-smart-ptr
temporal-database
data-acquisition
paul-graham

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App