You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by nani2ratna <na...@gmail.com> on 2009/03/05 15:44:06 UTC
Unit Test with Struts2 + Spring + Maven
Hi Everybody,
I just created a struts 2 project from nexus.
It created a default project with 2 actions.
Every thing is working excellent.
But i got a doubt how this Unit test is working.
I am just giving mvn test, it running the 2 tests in the
srs/main/test/../HelloworldActionTest.java
and another test class.
But how, from where its getting called.
Please explain me how its calling those tests.
Thanks and Regards
Ratna Sekhar
--
View this message in context: http://www.nabble.com/Unit-Test-with-Struts2-%2B-Spring-%2B-Maven-tp22352989p22352989.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Unit Test with Struts2 + Spring + Maven
Posted by nani2ratna <na...@gmail.com>.
Hi this is my pom.xml.
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>TutorialFromTextbook</groupId>
<artifactId>TutorialFromTextbook</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>Struts 2 Starter</name>
<url>http://www.myComp.com</url>
<description>Struts 2 Starter</description>
<dependencies>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!-- Servlet & Jsp -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>${servlet.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>${jsp.version}</version>
<scope>provided</scope>
</dependency>
<!-- Struts 2 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>${struts.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-sitemesh-plugin</artifactId>
<version>${struts.version}</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>${struts.version}</version>
</dependency>
<!-- Jakarta Commons -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>
<!-- Dwr -->
<dependency>
<groupId>org.directwebremoting</groupId>
<artifactId>dwr</artifactId>
<version>${dwr.version}</version>
</dependency>
</dependencies>
<build>
<finalName>TutorialFromTextbook</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.5</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<!-- Testing dependency versions -->
<junit.version>4.4</junit.version>
<jsp.version>2.0</jsp.version>
<servlet.version>2.4</servlet.version>
<!-- Commons dependency version -->
<commons.fileupload.version>1.2.1</commons.fileupload.version>
<!-- Struts dependency versions -->
<struts.version>2.1.6</struts.version>
<!-- DWR Dependency version -->
<dwr.version>2.0.1</dwr.version>
</properties>
</project>
mgainty wrote:
>
>
> Thanks and Regards
> ratna
>
>
> this is a maven question (which you should post to maven users group)
> maven-users as will I request the pom.xml which contains the details of
> execution of Unit-test goals
> show us your pom.xml so we can be of further assistance
>
> Martin
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official
> business of Sender. This transmission is of a confidential nature and
> Sender does not endorse distribution to any party other than intended
> recipient. Sender does not necessarily endorse content contained within
> this transmission.
>
>
>
>
>> Date: Thu, 5 Mar 2009 06:44:06 -0800
>> From: nani2ratna@gmail.com
>> To: user@struts.apache.org
>> Subject: Unit Test with Struts2 + Spring + Maven
>>
>>
>> Hi Everybody,
>>
>> I just created a struts 2 project from nexus.
>> It created a default project with 2 actions.
>> Every thing is working excellent.
>> But i got a doubt how this Unit test is working.
>> I am just giving mvn test, it running the 2 tests in the
>> srs/main/test/../HelloworldActionTest.java
>> and another test class.
>> But how, from where its getting called.
>> Please explain me how its calling those tests.
>>
>> Thanks and Regards
>> Ratna Sekhar
>> --
>> View this message in context:
>> http://www.nabble.com/Unit-Test-with-Struts2-%2B-Spring-%2B-Maven-tp22352989p22352989.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
> _________________________________________________________________
> Windows Live™ Groups: Create an online spot for your favorite groups to
> meet.
> http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009
>
--
View this message in context: http://www.nabble.com/Unit-Test-with-Struts2-%2B-Spring-%2B-Maven-tp22352989p22355499.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Unit Test with Struts2 + Spring + Maven
Posted by Martin Gainty <mg...@hotmail.com>.
this is a maven question (which you should post to maven users group)
maven-users as will I request the pom.xml which contains the details of
execution of Unit-test goals
show us your pom.xml so we can be of further assistance
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> Date: Thu, 5 Mar 2009 06:44:06 -0800
> From: nani2ratna@gmail.com
> To: user@struts.apache.org
> Subject: Unit Test with Struts2 + Spring + Maven
>
>
> Hi Everybody,
>
> I just created a struts 2 project from nexus.
> It created a default project with 2 actions.
> Every thing is working excellent.
> But i got a doubt how this Unit test is working.
> I am just giving mvn test, it running the 2 tests in the
> srs/main/test/../HelloworldActionTest.java
> and another test class.
> But how, from where its getting called.
> Please explain me how its calling those tests.
>
> Thanks and Regards
> Ratna Sekhar
> --
> View this message in context: http://www.nabble.com/Unit-Test-with-Struts2-%2B-Spring-%2B-Maven-tp22352989p22352989.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
_________________________________________________________________
Windows Live™ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009
Re: Unit Test with Struts2 + Spring + Maven
Posted by dusty <du...@yahoo.com>.
mvn -Dtest=MyTestClassName
But don't let that think you can get Maven answers here! ;-)
Nils-Helge Garli wrote:
>
> As both Martin and Dave pointed out, this is a maven related question.
> Please check here: http://maven.apache.org/users/getting-help.html
>
> Nils-H
>
> On Fri, Mar 6, 2009 at 8:19 AM, nani2ratna <na...@gmail.com> wrote:
>>
>> Can i run a particular test case.
>> Instead of running every test case all the time i just want to run only
>> one
>> test case.
>>
>> Thanks and Regards
>> Ratna
>>
>>
>> newton.dave wrote:
>>>
>>> nani2ratna wrote:
>>>> I am just giving mvn test, it running the 2 tests in the
>>>> srs/main/test/../HelloworldActionTest.java
>>>> and another test class.
>>>> But how, from where its getting called.
>>>> Please explain me how its calling those tests.
>>>
>>> Maven's surefire plugin will run tests--as Martin said you should look
>>> at the Maven documentation to start figuring out Maven.
>>>
>>> Dave
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Unit-Test-with-Struts2-%2B-Spring-%2B-Maven-tp22352989p22367369.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Unit-Test-with-Struts2-%2B-Spring-%2B-Maven-tp22352989p22391142.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Unit Test with Struts2 + Spring + Maven
Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
As both Martin and Dave pointed out, this is a maven related question.
Please check here: http://maven.apache.org/users/getting-help.html
Nils-H
On Fri, Mar 6, 2009 at 8:19 AM, nani2ratna <na...@gmail.com> wrote:
>
> Can i run a particular test case.
> Instead of running every test case all the time i just want to run only one
> test case.
>
> Thanks and Regards
> Ratna
>
>
> newton.dave wrote:
>>
>> nani2ratna wrote:
>>> I am just giving mvn test, it running the 2 tests in the
>>> srs/main/test/../HelloworldActionTest.java
>>> and another test class.
>>> But how, from where its getting called.
>>> Please explain me how its calling those tests.
>>
>> Maven's surefire plugin will run tests--as Martin said you should look
>> at the Maven documentation to start figuring out Maven.
>>
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Unit-Test-with-Struts2-%2B-Spring-%2B-Maven-tp22352989p22367369.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Unit Test with Struts2 + Spring + Maven
Posted by nani2ratna <na...@gmail.com>.
Can i run a particular test case.
Instead of running every test case all the time i just want to run only one
test case.
Thanks and Regards
Ratna
newton.dave wrote:
>
> nani2ratna wrote:
>> I am just giving mvn test, it running the 2 tests in the
>> srs/main/test/../HelloworldActionTest.java
>> and another test class.
>> But how, from where its getting called.
>> Please explain me how its calling those tests.
>
> Maven's surefire plugin will run tests--as Martin said you should look
> at the Maven documentation to start figuring out Maven.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Unit-Test-with-Struts2-%2B-Spring-%2B-Maven-tp22352989p22367369.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Unit Test with Struts2 + Spring + Maven
Posted by Dave Newton <ne...@yahoo.com>.
nani2ratna wrote:
> I am just giving mvn test, it running the 2 tests in the
> srs/main/test/../HelloworldActionTest.java
> and another test class.
> But how, from where its getting called.
> Please explain me how its calling those tests.
Maven's surefire plugin will run tests--as Martin said you should look
at the Maven documentation to start figuring out Maven.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org