You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Sundberg <ts...@kth.se> on 2010/12/21 23:23:39 UTC

Automatically integration test an ejb with Maven

Hi!

Somebody might have use of a blog post I just posted:
http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/

/Thomas

-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Automatically integration test an ejb with Maven

Posted by Thomas Sundberg <ts...@kth.se>.
On Wed, Dec 22, 2010 at 11:05, Anders Hammar <an...@hammar.net> wrote:
> Happy to see that you've found the Cargo plugin! The url zip installation is
> awesome I think. The only thing that would top that would be a GAV zip
> installation, I just need to find some time to get that implemented...

A Maven GAV to specify the container for download would be great.

/Thomas


> Adding to this example, which I find great, I could mention that it is
> possible to add tailor-made configuration files to the container. Here's an
> example of that:
> http://cargo.codehaus.org/Configuration+files+option
>
> /Anders
>
> On Wed, Dec 22, 2010 at 10:34, Thomas Sundberg <ts...@kth.se> wrote:
>
>>
>>
>> On Wed, Dec 22, 2010 at 09:35, Lucas Persson <lu...@oracle.com>wrote:
>>
>>>  Interesting
>>>
>>> But why do you not use the Cactus maven plugin? With cactus you can
>>> execute the tests in the server.
>>>
>>>
>> Lucas
>>
>> I am not using cactus for a number of reasons
>>
>> * I hadn't heard of Cactus. Browsing http://jakarta.apache.org/cactus/tells me that it is either a very mature product that doesn't need any more
>> development or a dead product. The last message on the mailing list was from
>> 10 nov and discussing Tomcat 4...
>>
>> * I am not interested in running my unit tests inside the container, I am
>> interested in testing using well known tools like JUnit in the smallest
>> possible context.
>>
>> * I am interested in deploying the same artifact that I might deploy in
>> production and integration test it in a running container that is started
>> automatically
>>
>> * I wanted to show how the Cargo plugin together with the failsafe plugin
>> can be used to do this
>>
>> /Thomas
>>
>>
>>
>>  /Lucas
>>>
>>> On 12/21/2010 11:23 PM, Thomas Sundberg wrote:
>>>
>>> Hi!
>>>
>>> Somebody might have use of a blog post I just posted:http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/
>>>
>>> /Thomas
>>>
>>>
>>>
>>> --
>>> [image: Oracle] <http://www.oracle.com>
>>> Lucas Persson | Principal Member of Technical Staff
>>> Phone: +4684773644 <tel:+4684773644> | | | Mobile: +46730946656<tel:+46730946656>
>>> Oracle Communications Platform
>>> ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm
>>>
>>> Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
>>> [image: Green Oracle] <http://www.oracle.com/commitment> Oracle is
>>> committed to developing practices and products that help protect the
>>> environment
>>>
>>
>>
>>
>> --
>> Thomas Sundberg
>> M. Sc. in Computer Science
>>
>> Mobile: +46 70 767 33 15
>> Blog: http://thomassundberg.wordpress.com/
>> Twitter: @thomassundberg
>>
>> Better software through faster feedback
>>
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Automatically integration test an ejb with Maven

Posted by Anders Hammar <an...@hammar.net>.
Happy to see that you've found the Cargo plugin! The url zip installation is
awesome I think. The only thing that would top that would be a GAV zip
installation, I just need to find some time to get that implemented...

Adding to this example, which I find great, I could mention that it is
possible to add tailor-made configuration files to the container. Here's an
example of that:
http://cargo.codehaus.org/Configuration+files+option

/Anders

On Wed, Dec 22, 2010 at 10:34, Thomas Sundberg <ts...@kth.se> wrote:

>
>
> On Wed, Dec 22, 2010 at 09:35, Lucas Persson <lu...@oracle.com>wrote:
>
>>  Interesting
>>
>> But why do you not use the Cactus maven plugin? With cactus you can
>> execute the tests in the server.
>>
>>
> Lucas
>
> I am not using cactus for a number of reasons
>
> * I hadn't heard of Cactus. Browsing http://jakarta.apache.org/cactus/tells me that it is either a very mature product that doesn't need any more
> development or a dead product. The last message on the mailing list was from
> 10 nov and discussing Tomcat 4...
>
> * I am not interested in running my unit tests inside the container, I am
> interested in testing using well known tools like JUnit in the smallest
> possible context.
>
> * I am interested in deploying the same artifact that I might deploy in
> production and integration test it in a running container that is started
> automatically
>
> * I wanted to show how the Cargo plugin together with the failsafe plugin
> can be used to do this
>
> /Thomas
>
>
>
>  /Lucas
>>
>> On 12/21/2010 11:23 PM, Thomas Sundberg wrote:
>>
>> Hi!
>>
>> Somebody might have use of a blog post I just posted:http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/
>>
>> /Thomas
>>
>>
>>
>> --
>> [image: Oracle] <http://www.oracle.com>
>> Lucas Persson | Principal Member of Technical Staff
>> Phone: +4684773644 <tel:+4684773644> | | | Mobile: +46730946656<tel:+46730946656>
>> Oracle Communications Platform
>> ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm
>>
>> Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
>> [image: Green Oracle] <http://www.oracle.com/commitment> Oracle is
>> committed to developing practices and products that help protect the
>> environment
>>
>
>
>
> --
> Thomas Sundberg
> M. Sc. in Computer Science
>
> Mobile: +46 70 767 33 15
> Blog: http://thomassundberg.wordpress.com/
> Twitter: @thomassundberg
>
> Better software through faster feedback
>

Re: Automatically integration test an ejb with Maven

Posted by Lucas Persson <lu...@oracle.com>.
Aha I see

Jepp, the development on Cactus does not seems to be very active.

Here is a links for how to use it in maven2/3: 
http://jakarta.apache.org/cactus/integration/maven2/index.html.
And they also suggests to use cargo to start the JEE server.
(And Cactus is really just another JUnit runner, you just uses a 
different JUnit TestSuite class, but I am not sure if even that is required)


Cheers
Lucas

On 12/22/2010 10:34 AM, Thomas Sundberg wrote:
>
>
> On Wed, Dec 22, 2010 at 09:35, Lucas Persson <lucas.persson@oracle.com 
> <ma...@oracle.com>> wrote:
>
>     Interesting
>
>     But why do you not use the Cactus maven plugin? With cactus you
>     can execute the tests in the server.
>
>
> Lucas
>
> I am not using cactus for a number of reasons
>
> * I hadn't heard of Cactus. Browsing http://jakarta.apache.org/cactus/ 
> tells me that it is either a very mature product that doesn't need any 
> more development or a dead product. The last message on the mailing 
> list was from 10 nov and discussing Tomcat 4...
>
> * I am not interested in running my unit tests inside the container, I 
> am interested in testing using well known tools like JUnit in the 
> smallest possible context.
>
> * I am interested in deploying the same artifact that I might deploy 
> in production and integration test it in a running container that is 
> started automatically
>
> * I wanted to show how the Cargo plugin together with the failsafe 
> plugin can be used to do this
>
> /Thomas
>
>
>
>     /Lucas
>
>     On 12/21/2010 11:23 PM, Thomas Sundberg wrote:
>>     Hi!
>>
>>     Somebody might have use of a blog post I just posted:
>>     http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/
>>
>>     /Thomas
>>
>
>     -- 
>     Oracle <http://www.oracle.com>
>     Lucas Persson | Principal Member of Technical Staff
>     Phone: +4684773644 <tel:+4684773644> | | | Mobile: +46730946656
>     <tel:+46730946656>
>     Oracle Communications Platform
>     ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm
>
>     Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no
>     <http://reg.no>. 556254-6746
>     Green Oracle <http://www.oracle.com/commitment> Oracle is
>     committed to developing practices and products that help protect
>     the environment
>
>
>
>
> -- 
> Thomas Sundberg
> M. Sc. in Computer Science
>
> Mobile: +46 70 767 33 15
> Blog: http://thomassundberg.wordpress.com/
> Twitter: @thomassundberg
>
> Better software through faster feedback

-- 
Oracle <http://www.oracle.com>
Lucas Persson | Principal Member of Technical Staff
Phone: +4684773644 <tel:+4684773644> | | | Mobile: +46730946656 
<tel:+46730946656>
Oracle Communications Platform
ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm

Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to 
developing practices and products that help protect the environment

Re: Automatically integration test an ejb with Maven

Posted by Thomas Sundberg <ts...@kth.se>.
On Wed, Dec 22, 2010 at 09:35, Lucas Persson <lu...@oracle.com>wrote:

>  Interesting
>
> But why do you not use the Cactus maven plugin? With cactus you can execute
> the tests in the server.
>
>
Lucas

I am not using cactus for a number of reasons

* I hadn't heard of Cactus. Browsing http://jakarta.apache.org/cactus/ tells
me that it is either a very mature product that doesn't need any more
development or a dead product. The last message on the mailing list was from
10 nov and discussing Tomcat 4...

* I am not interested in running my unit tests inside the container, I am
interested in testing using well known tools like JUnit in the smallest
possible context.

* I am interested in deploying the same artifact that I might deploy in
production and integration test it in a running container that is started
automatically

* I wanted to show how the Cargo plugin together with the failsafe plugin
can be used to do this

/Thomas



 /Lucas
>
> On 12/21/2010 11:23 PM, Thomas Sundberg wrote:
>
> Hi!
>
> Somebody might have use of a blog post I just posted:http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/
>
> /Thomas
>
>
>
> --
> [image: Oracle] <http://www.oracle.com>
> Lucas Persson | Principal Member of Technical Staff
> Phone: +4684773644 <tel:+4684773644> | | | Mobile: +46730946656<tel:+46730946656>
> Oracle Communications Platform
> ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm
>
> Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
> [image: Green Oracle] <http://www.oracle.com/commitment> Oracle is
> committed to developing practices and products that help protect the
> environment
>



-- 
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

Re: Automatically integration test an ejb with Maven

Posted by Lucas Persson <lu...@oracle.com>.
Interesting

But why do you not use the Cactus maven plugin? With cactus you can 
execute the tests in the server.

/Lucas

On 12/21/2010 11:23 PM, Thomas Sundberg wrote:
> Hi!
>
> Somebody might have use of a blog post I just posted:
> http://thomassundberg.wordpress.com/2010/12/21/automatically-integration-test-an-ejb-with-maven/
>
> /Thomas
>

-- 
Oracle <http://www.oracle.com>
Lucas Persson | Principal Member of Technical Staff
Phone: +4684773644 <tel:+4684773644> | | | Mobile: +46730946656 
<tel:+46730946656>
Oracle Communications Platform
ORACLE Sweden | Folkungagatan 122 | 116 30 Stockholm

Oracle Svenska AB, Kronborgsgränd 17, S-164 28 KISTA, reg.no. 556254-6746
Green Oracle <http://www.oracle.com/commitment> Oracle is committed to 
developing practices and products that help protect the environment