You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by malsi <is...@epfl.ch> on 2007/11/29 09:47:47 UTC

Junit and jackrabbit



Hi,

I am implementing classes that access and store nodes in a repository. I
would like to test my code using JUnit ()
-- 
View this message in context: http://www.nabble.com/Junit-and-jackrabbit-tf4895731.html#a14021269
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Junit and jackrabbit

Posted by Fabián Mandelbaum <fm...@gmail.com>.
Well, you can always use basic timers (System.currentTimeMillis() and
System.nanotime()) to roughly test performance, at least
speed-of-execution-wise. If you want to also test memory usage, etc.
indeed you need more advanced frameworks... and there's always jconsole
to check on resources usage too.

Good luck!

Jørgen Sivesind escribió:
> Having looked at JackRabbit for 2 days, but knowing both JUnit and other test
> tools fairly well, I would say that unless somebody have made a JackRabbit
> specific test tool, JUnit is probably your best choice for testing
> behaviour, but not for performance.  JUnit is designed to be a tool to test
> behaviour.
>
> For performance, you might want to check out JMeter.
>
> Sincerely,
> Jørgen Sivesind
>
>
>
> malsi wrote:
>   
>> I would like to test my code using JUnit in order to see if my code is
>> doing well in terms of performance and behavior (see if nodes are realy
>> deleted or not, really read or not, if the right node is read, etc..)
>> My questions are the following:
>>
>> Is JUnit the best way to test my code?
>> Is there any documentation anywhere for using JUnit for testing an
>> implementation that uses Jackrabbit ?
>>
>>
>> Fabián Mandelbaum wrote:
>>     
>>> Hello, I'm using nothing more than JUnit4, and JackRabbit to do unit
>>> tests. In the "setup" methods (before, after, beforeClass, afterClass) I
>>> do the repo
>>> setup/cleanup/write_status_to_visually_check_if_everything_is fine
>>> thing, and then just make test methods for each of my classes' public
>>> methods.
>>>
>>> nicklist@planet.nl escribió:
>>>       
>>>> I guess you could take the JCR API and maybe the JackRabbit API in
>>>> combination with JMock to unit test your code.
>>>>
>>>> Hth,
>>>>
>>>> Nick Stolwijk
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: malsi [mailto:islam.el-sayed@epfl.ch]
>>>> Sent: Thu 11/29/2007 9:47 AM
>>>> To: users@jackrabbit.apache.org
>>>> Subject: Junit and jackrabbit
>>>>  
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I am implementing classes that access and store nodes in a repository. I
>>>> would like to test my code using JUnit ()
>>>>   
>>>>         
>>>
>>>       
>>     
>
>   


Re: Junit and jackrabbit

Posted by Jørgen Sivesind <js...@enonic.com>.
Having looked at JackRabbit for 2 days, but knowing both JUnit and other test
tools fairly well, I would say that unless somebody have made a JackRabbit
specific test tool, JUnit is probably your best choice for testing
behaviour, but not for performance.  JUnit is designed to be a tool to test
behaviour.

For performance, you might want to check out JMeter.

Sincerely,
Jørgen Sivesind



malsi wrote:
> 
> I would like to test my code using JUnit in order to see if my code is
> doing well in terms of performance and behavior (see if nodes are realy
> deleted or not, really read or not, if the right node is read, etc..)
> My questions are the following:
> 
> Is JUnit the best way to test my code?
> Is there any documentation anywhere for using JUnit for testing an
> implementation that uses Jackrabbit ?
> 
> 
> Fabián Mandelbaum wrote:
>> 
>> Hello, I'm using nothing more than JUnit4, and JackRabbit to do unit
>> tests. In the "setup" methods (before, after, beforeClass, afterClass) I
>> do the repo
>> setup/cleanup/write_status_to_visually_check_if_everything_is fine
>> thing, and then just make test methods for each of my classes' public
>> methods.
>> 
>> nicklist@planet.nl escribió:
>>> I guess you could take the JCR API and maybe the JackRabbit API in
>>> combination with JMock to unit test your code.
>>>
>>> Hth,
>>>
>>> Nick Stolwijk
>>>
>>>
>>> -----Original Message-----
>>> From: malsi [mailto:islam.el-sayed@epfl.ch]
>>> Sent: Thu 11/29/2007 9:47 AM
>>> To: users@jackrabbit.apache.org
>>> Subject: Junit and jackrabbit
>>>  
>>>
>>>
>>>
>>> Hi,
>>>
>>> I am implementing classes that access and store nodes in a repository. I
>>> would like to test my code using JUnit ()
>>>   
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/RE%3A-Junit-and-jackrabbit-tf4895862.html#a14027429
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Junit and jackrabbit

Posted by Daniele Dellafiore <il...@gmail.com>.
I am actually developing an application that use jackrabbit and the
app is completley developed in TDD, writing test with JUnit (4).
There are no problem. More than this, I think I lost myself in
jackrabbit details if I did not use unit testing during developing.
Not only I can understand effecively the behavior of some methods or
classes but, more important, I consolidate it in a self-explanatory
and running test.

On Nov 29, 2007 2:12 PM, malsi <is...@epfl.ch> wrote:
>
> I would like to test my code using JUnit in order to see if my code is doing
> well in terms of performance and behavior (see if nodes are realy deleted or
> not, really read or not, if the right node is read, etc..)
> My questions are the following:
>
> Is JUnit the best way to test my code?
> Is there any documentation anywhere for using JUnit for testing an
> implementation that uses Jackrabbit ?
>
>
>
> Fabián Mandelbaum wrote:
> >
> > Hello, I'm using nothing more than JUnit4, and JackRabbit to do unit
> > tests. In the "setup" methods (before, after, beforeClass, afterClass) I
> > do the repo
> > setup/cleanup/write_status_to_visually_check_if_everything_is fine
> > thing, and then just make test methods for each of my classes' public
> > methods.
> >
> > nicklist@planet.nl escribió:
> >> I guess you could take the JCR API and maybe the JackRabbit API in
> >> combination with JMock to unit test your code.
> >>
> >> Hth,
> >>
> >> Nick Stolwijk
> >>
> >>
> >> -----Original Message-----
> >> From: malsi [mailto:islam.el-sayed@epfl.ch]
> >> Sent: Thu 11/29/2007 9:47 AM
> >> To: users@jackrabbit.apache.org
> >> Subject: Junit and jackrabbit
> >>
> >>
> >>
> >>
> >> Hi,
> >>
> >> I am implementing classes that access and store nodes in a repository. I
> >> would like to test my code using JUnit ()
> >>
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/RE%3A-Junit-and-jackrabbit-tf4895862.html#a14025503
>
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>



-- 
Daniele Dellafiore
http://ildella.wordpress.com/

Re: Junit and jackrabbit

Posted by malsi <is...@epfl.ch>.
I would like to test my code using JUnit in order to see if my code is doing
well in terms of performance and behavior (see if nodes are realy deleted or
not, really read or not, if the right node is read, etc..)
My questions are the following:

Is JUnit the best way to test my code?
Is there any documentation anywhere for using JUnit for testing an
implementation that uses Jackrabbit ?


Fabián Mandelbaum wrote:
> 
> Hello, I'm using nothing more than JUnit4, and JackRabbit to do unit
> tests. In the "setup" methods (before, after, beforeClass, afterClass) I
> do the repo
> setup/cleanup/write_status_to_visually_check_if_everything_is fine
> thing, and then just make test methods for each of my classes' public
> methods.
> 
> nicklist@planet.nl escribió:
>> I guess you could take the JCR API and maybe the JackRabbit API in
>> combination with JMock to unit test your code.
>>
>> Hth,
>>
>> Nick Stolwijk
>>
>>
>> -----Original Message-----
>> From: malsi [mailto:islam.el-sayed@epfl.ch]
>> Sent: Thu 11/29/2007 9:47 AM
>> To: users@jackrabbit.apache.org
>> Subject: Junit and jackrabbit
>>  
>>
>>
>>
>> Hi,
>>
>> I am implementing classes that access and store nodes in a repository. I
>> would like to test my code using JUnit ()
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/RE%3A-Junit-and-jackrabbit-tf4895862.html#a14025503
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Junit and jackrabbit

Posted by Fabián Mandelbaum <fm...@gmail.com>.
Hello, I'm using nothing more than JUnit4, and JackRabbit to do unit
tests. In the "setup" methods (before, after, beforeClass, afterClass) I
do the repo
setup/cleanup/write_status_to_visually_check_if_everything_is fine
thing, and then just make test methods for each of my classes' public
methods.

nicklist@planet.nl escribió:
> I guess you could take the JCR API and maybe the JackRabbit API in combination with JMock to unit test your code.
>
> Hth,
>
> Nick Stolwijk
>
>
> -----Original Message-----
> From: malsi [mailto:islam.el-sayed@epfl.ch]
> Sent: Thu 11/29/2007 9:47 AM
> To: users@jackrabbit.apache.org
> Subject: Junit and jackrabbit
>  
>
>
>
> Hi,
>
> I am implementing classes that access and store nodes in a repository. I
> would like to test my code using JUnit ()
>   


RE: Junit and jackrabbit

Posted by ni...@planet.nl.
I guess you could take the JCR API and maybe the JackRabbit API in combination with JMock to unit test your code.

Hth,

Nick Stolwijk


-----Original Message-----
From: malsi [mailto:islam.el-sayed@epfl.ch]
Sent: Thu 11/29/2007 9:47 AM
To: users@jackrabbit.apache.org
Subject: Junit and jackrabbit
 



Hi,

I am implementing classes that access and store nodes in a repository. I
would like to test my code using JUnit ()
-- 
View this message in context: http://www.nabble.com/Junit-and-jackrabbit-tf4895731.html#a14021269
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.