You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Grant Smith <gr...@marathon-man.com> on 2005/07/20 19:36:54 UTC
Status of testing framework
Bill,
The current testing setup is great for objects that are
container-independent. Any indication when we'll be able to test things
that need to live in a container, like FacesContextImpl ? I assume we'll
need cactus for that, although if you know of any tricks to test
container-dependent objects, that would be valuable information :)
Another question for cactus gurus: is cactus portlet friendly ?
Thanks,
Grant
Re: [proposal] use EasyMock for mocking
Posted by Mathias Broekelmann <mb...@PSI.DE>.
+1
I havenĀ“t use mockups before (shame on me ;)) but I would like to see it
in action.
Mathias
Bill Dudney schrieb:
> Hi All,
>
> I've got the first of the EasyMock (http://www.easymock.org) tests in
> place. I have not commited the changes because I wanted to get
> everyone's opinion before introducing a new dependency. There are 4 new
> jars required to use easymock, ams.jar, cglib.jar, easymock-
> classextensions.jar and easymock.jar. The cglib and ams dependency are
> used to mock abstract classes (the default easymock.jar is able to mock
> interfaces without cglib or ams).
>
> With the EasyMock framework I was able to get to 100% code coverage of
> the abstract StateManager class with 5 tests and less than 125 lines of
> actual test code. I'm a fan and have used it extensively on other
> projects. I believe the extra dependencies are worth it to get the
> testing done.
>
> As soon as there is consensus I'll commit the changes to build.xml and
> the actual test code (or by tomorrow afternoon or so assuming that a
> lack of comment is agreement) then move on to the cactus test stuff.
>
> Sean: I'll try a couple of different approaches to the build and post
> in the form of a proposal, so your feedback to that thread will be most
> useful :-)
>
> TTFN,
>
> -bd-
>
> On Jul 20, 2005, at 1:39 PM, Bill Dudney wrote:
>
>> Hi Grant,
>>
>> Thanks for your interest in the testing stuff.
>>
>> Sorry I've not committed the cactus stuff yet. I need to get my
>> thoughts together in an new thread that Sean can comment on because
>> there will be additional build stuff in place (cargo to start/stop
>> containers, packaging a new war file to distribute the cactus tests
>> in etc.) and I want the changes to fit with Sean's continued vision
>> of the build process.
>>
>> In the mean time we could use mock objects. Although the class you
>> refer to (ServletFacesContextImpl) is particularly hard to test
>> because the lack of default config setup that happens during out of
>> container testing.
>>
>> I have a test for the Factory that could be used as the starting
>> point of a factory setup so that the rest of the required stuff could
>> be mocked for the facescontext impl. I will get that checked in asap
>> (SVN appears to be down again).
>>
>> TTFN,
>>
>> -bd-
>>
>> On Jul 20, 2005, at 11:36 AM, Grant Smith wrote:
>>
>>
>>> Bill,
>>>
>>> The current testing setup is great for objects that are container-
>>> independent. Any indication when we'll be able to test things that
>>> need to live in a container, like FacesContextImpl ? I assume we'll
>>> need cactus for that, although if you know of any tricks to test
>>> container-dependent objects, that would be valuable information :)
>>>
>>> Another question for cactus gurus: is cactus portlet friendly ?
>>>
>>> Thanks,
>>> Grant
>>>
>>>
>>
>>
>
Re: [proposal] use EasyMock for mocking
Posted by Bruno Aranda <br...@gmail.com>.
Good!, I've just executed the tests. Look promissing! Thanks!
Bruno
2005/7/21, Bill Dudney <bd...@mac.com>:
> OK I've committed the changes.
>
> On the download dependencies, there is no real reason not to just
> download them (IMO) because it takes an additional 20 seconds the
> first time and then an additional 1 second thereafter (I made up the
> #'s but its not far off) so I'd just as soon not complicate matters
> by adding another target to download test dependencies.
>
> Next up is Cactus :-)
>
> TTFN,
>
> -bd-
>
> On Jul 21, 2005, at 9:17 AM, Grant Smith wrote:
>
> > +1 for EasyMock and it's dependencies. While we're at it, don't we
> > need junit.jar too ? Also, I would recommend only downloading the
> > dependencies if you run the 'test-all' (or 'test' for a subproject)
> > target, not if you run the usual 'dist-all' that most people will
> > be doing.
> >
> > Thanks for doing this Bill !!
> >
> > Bill Dudney wrote:
> >
> >
> >> Hi All,
> >>
> >> I've got the first of the EasyMock (http://www.easymock.org) tests
> >> in place. I have not commited the changes because I wanted to
> >> get everyone's opinion before introducing a new dependency. There
> >> are 4 new jars required to use easymock, ams.jar, cglib.jar,
> >> easymock- classextensions.jar and easymock.jar. The cglib and ams
> >> dependency are used to mock abstract classes (the default
> >> easymock.jar is able to mock interfaces without cglib or ams).
> >>
> >> With the EasyMock framework I was able to get to 100% code
> >> coverage of the abstract StateManager class with 5 tests and less
> >> than 125 lines of actual test code. I'm a fan and have used it
> >> extensively on other projects. I believe the extra dependencies
> >> are worth it to get the testing done.
> >>
> >> As soon as there is consensus I'll commit the changes to
> >> build.xml and the actual test code (or by tomorrow afternoon or
> >> so assuming that a lack of comment is agreement) then move on to
> >> the cactus test stuff.
> >>
> >> Sean: I'll try a couple of different approaches to the build and
> >> post in the form of a proposal, so your feedback to that thread
> >> will be most useful :-)
> >>
> >> TTFN,
> >>
> >> -bd-
> >>
> >
> >
> >
>
>
Re: [proposal] use EasyMock for mocking
Posted by Mike Kienenberger <mk...@gmail.com>.
If all users were like me (permanent broadband connection), I'd agree :)
Remember that some folks don't want the source to do development, they
just have a requirement that all things must be built from source.
Now, I'd think you'd also want to test it after the build, but again,
that's just me. I don't think there should be a requirement to force
someone to do it.
If there's already a target to download build dependencies, I can't
see how it's all that much harder to also have one that only downloads
testing dependencies.
On 7/21/05, Bill Dudney <bd...@mac.com> wrote:
> Hi Mike,
>
> I understand the point that it could take longer for slower connections.
>
> However, again IMO, if someone is doing development on myfaces they
> should be doing testing.
>
> And also IMO as a user of other projects I like to have a test target
> that I can use when building others software so I can have some level
> of assurance that the build worked. I actually prefer to have that be
> part of the dist type target but that consensus does not exist among
> the rest of the team so I'm not pushing it.
>
> If the rest of the team want's a separate download target for getting
> the testing stuff I'm fine with that too.
>
> My $0.02 worth.
>
> TTFN,
>
> -bd-
>
> On Jul 21, 2005, at 10:12 AM, Mike Kienenberger wrote:
>
> > It takes 20 seconds for you to download them.
> > That doesn't mean it takes 20 seconds for others.
> > If they're only used for testing, don't download them unless you're
> > doing testing.
> > Testing dependencies tend to grow in large projects.
> >
> > On 7/21/05, Bill Dudney <bd...@mac.com> wrote:
> >
> >> OK I've committed the changes.
> >>
> >> On the download dependencies, there is no real reason not to just
> >> download them (IMO) because it takes an additional 20 seconds the
> >> first time and then an additional 1 second thereafter (I made up the
> >> #'s but its not far off) so I'd just as soon not complicate matters
> >> by adding another target to download test dependencies.
> >>
> >> Next up is Cactus :-)
> >>
> >> TTFN,
> >>
> >> -bd-
> >>
> >> On Jul 21, 2005, at 9:17 AM, Grant Smith wrote:
> >>
> >>
> >>> +1 for EasyMock and it's dependencies. While we're at it, don't we
> >>> need junit.jar too ? Also, I would recommend only downloading the
> >>> dependencies if you run the 'test-all' (or 'test' for a subproject)
> >>> target, not if you run the usual 'dist-all' that most people will
> >>> be doing.
> >>>
> >>> Thanks for doing this Bill !!
> >>>
> >>> Bill Dudney wrote:
> >>>
> >>>
> >>>
> >>>> Hi All,
> >>>>
> >>>> I've got the first of the EasyMock (http://www.easymock.org) tests
> >>>> in place. I have not commited the changes because I wanted to
> >>>> get everyone's opinion before introducing a new dependency. There
> >>>> are 4 new jars required to use easymock, ams.jar, cglib.jar,
> >>>> easymock- classextensions.jar and easymock.jar. The cglib and ams
> >>>> dependency are used to mock abstract classes (the default
> >>>> easymock.jar is able to mock interfaces without cglib or ams).
> >>>>
> >>>> With the EasyMock framework I was able to get to 100% code
> >>>> coverage of the abstract StateManager class with 5 tests and less
> >>>> than 125 lines of actual test code. I'm a fan and have used it
> >>>> extensively on other projects. I believe the extra dependencies
> >>>> are worth it to get the testing done.
> >>>>
> >>>> As soon as there is consensus I'll commit the changes to
> >>>> build.xml and the actual test code (or by tomorrow afternoon or
> >>>> so assuming that a lack of comment is agreement) then move on to
> >>>> the cactus test stuff.
> >>>>
> >>>> Sean: I'll try a couple of different approaches to the build and
> >>>> post in the form of a proposal, so your feedback to that thread
> >>>> will be most useful :-)
> >>>>
> >>>> TTFN,
> >>>>
> >>>> -bd-
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >
>
>
Re: [proposal] use EasyMock for mocking
Posted by Grant Smith <gr...@marathon-man.com>.
Bill,
You make a valid counterpoint (if there is such a word..). Let's leave
it as you have it now, and we can tweak it later if need be. I'd hate
for you to be slowed down by us arguing about where in the buildfile
dependencies should be downloaded ;)
I'm about to try your tests now...
Bill Dudney wrote:
> Hi Mike,
>
> I understand the point that it could take longer for slower connections.
>
> However, again IMO, if someone is doing development on myfaces they
> should be doing testing.
>
> And also IMO as a user of other projects I like to have a test target
> that I can use when building others software so I can have some level
> of assurance that the build worked. I actually prefer to have that be
> part of the dist type target but that consensus does not exist among
> the rest of the team so I'm not pushing it.
>
> If the rest of the team want's a separate download target for getting
> the testing stuff I'm fine with that too.
>
> My $0.02 worth.
>
> TTFN,
>
> -bd-
>
> On Jul 21, 2005, at 10:12 AM, Mike Kienenberger wrote:
>
>> It takes 20 seconds for you to download them.
>> That doesn't mean it takes 20 seconds for others.
>> If they're only used for testing, don't download them unless you're
>> doing testing.
>> Testing dependencies tend to grow in large projects.
>>
>> On 7/21/05, Bill Dudney <bd...@mac.com> wrote:
>>
>>> OK I've committed the changes.
>>>
>>> On the download dependencies, there is no real reason not to just
>>> download them (IMO) because it takes an additional 20 seconds the
>>> first time and then an additional 1 second thereafter (I made up the
>>> #'s but its not far off) so I'd just as soon not complicate matters
>>> by adding another target to download test dependencies.
>>>
>>> Next up is Cactus :-)
>>>
>>> TTFN,
>>>
>>> -bd-
>>>
>>> On Jul 21, 2005, at 9:17 AM, Grant Smith wrote:
>>>
>>>
>>>> +1 for EasyMock and it's dependencies. While we're at it, don't we
>>>> need junit.jar too ? Also, I would recommend only downloading the
>>>> dependencies if you run the 'test-all' (or 'test' for a subproject)
>>>> target, not if you run the usual 'dist-all' that most people will
>>>> be doing.
>>>>
>>>> Thanks for doing this Bill !!
>>>>
>>>> Bill Dudney wrote:
>>>>
>>>>
>>>>
>>>>> Hi All,
>>>>>
>>>>> I've got the first of the EasyMock (http://www.easymock.org) tests
>>>>> in place. I have not commited the changes because I wanted to
>>>>> get everyone's opinion before introducing a new dependency. There
>>>>> are 4 new jars required to use easymock, ams.jar, cglib.jar,
>>>>> easymock- classextensions.jar and easymock.jar. The cglib and ams
>>>>> dependency are used to mock abstract classes (the default
>>>>> easymock.jar is able to mock interfaces without cglib or ams).
>>>>>
>>>>> With the EasyMock framework I was able to get to 100% code
>>>>> coverage of the abstract StateManager class with 5 tests and less
>>>>> than 125 lines of actual test code. I'm a fan and have used it
>>>>> extensively on other projects. I believe the extra dependencies
>>>>> are worth it to get the testing done.
>>>>>
>>>>> As soon as there is consensus I'll commit the changes to
>>>>> build.xml and the actual test code (or by tomorrow afternoon or
>>>>> so assuming that a lack of comment is agreement) then move on to
>>>>> the cactus test stuff.
>>>>>
>>>>> Sean: I'll try a couple of different approaches to the build and
>>>>> post in the form of a proposal, so your feedback to that thread
>>>>> will be most useful :-)
>>>>>
>>>>> TTFN,
>>>>>
>>>>> -bd-
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>
>
> .
>
Re: [proposal] use EasyMock for mocking
Posted by Bill Dudney <bd...@mac.com>.
Hi Mike,
I understand the point that it could take longer for slower connections.
However, again IMO, if someone is doing development on myfaces they
should be doing testing.
And also IMO as a user of other projects I like to have a test target
that I can use when building others software so I can have some level
of assurance that the build worked. I actually prefer to have that be
part of the dist type target but that consensus does not exist among
the rest of the team so I'm not pushing it.
If the rest of the team want's a separate download target for getting
the testing stuff I'm fine with that too.
My $0.02 worth.
TTFN,
-bd-
On Jul 21, 2005, at 10:12 AM, Mike Kienenberger wrote:
> It takes 20 seconds for you to download them.
> That doesn't mean it takes 20 seconds for others.
> If they're only used for testing, don't download them unless you're
> doing testing.
> Testing dependencies tend to grow in large projects.
>
> On 7/21/05, Bill Dudney <bd...@mac.com> wrote:
>
>> OK I've committed the changes.
>>
>> On the download dependencies, there is no real reason not to just
>> download them (IMO) because it takes an additional 20 seconds the
>> first time and then an additional 1 second thereafter (I made up the
>> #'s but its not far off) so I'd just as soon not complicate matters
>> by adding another target to download test dependencies.
>>
>> Next up is Cactus :-)
>>
>> TTFN,
>>
>> -bd-
>>
>> On Jul 21, 2005, at 9:17 AM, Grant Smith wrote:
>>
>>
>>> +1 for EasyMock and it's dependencies. While we're at it, don't we
>>> need junit.jar too ? Also, I would recommend only downloading the
>>> dependencies if you run the 'test-all' (or 'test' for a subproject)
>>> target, not if you run the usual 'dist-all' that most people will
>>> be doing.
>>>
>>> Thanks for doing this Bill !!
>>>
>>> Bill Dudney wrote:
>>>
>>>
>>>
>>>> Hi All,
>>>>
>>>> I've got the first of the EasyMock (http://www.easymock.org) tests
>>>> in place. I have not commited the changes because I wanted to
>>>> get everyone's opinion before introducing a new dependency. There
>>>> are 4 new jars required to use easymock, ams.jar, cglib.jar,
>>>> easymock- classextensions.jar and easymock.jar. The cglib and ams
>>>> dependency are used to mock abstract classes (the default
>>>> easymock.jar is able to mock interfaces without cglib or ams).
>>>>
>>>> With the EasyMock framework I was able to get to 100% code
>>>> coverage of the abstract StateManager class with 5 tests and less
>>>> than 125 lines of actual test code. I'm a fan and have used it
>>>> extensively on other projects. I believe the extra dependencies
>>>> are worth it to get the testing done.
>>>>
>>>> As soon as there is consensus I'll commit the changes to
>>>> build.xml and the actual test code (or by tomorrow afternoon or
>>>> so assuming that a lack of comment is agreement) then move on to
>>>> the cactus test stuff.
>>>>
>>>> Sean: I'll try a couple of different approaches to the build and
>>>> post in the form of a proposal, so your feedback to that thread
>>>> will be most useful :-)
>>>>
>>>> TTFN,
>>>>
>>>> -bd-
>>>>
>>>>
>>>
>>>
>>>
>>>
>>
>>
>
Re: [proposal] use EasyMock for mocking
Posted by Mike Kienenberger <mk...@gmail.com>.
It takes 20 seconds for you to download them.
That doesn't mean it takes 20 seconds for others.
If they're only used for testing, don't download them unless you're
doing testing.
Testing dependencies tend to grow in large projects.
On 7/21/05, Bill Dudney <bd...@mac.com> wrote:
> OK I've committed the changes.
>
> On the download dependencies, there is no real reason not to just
> download them (IMO) because it takes an additional 20 seconds the
> first time and then an additional 1 second thereafter (I made up the
> #'s but its not far off) so I'd just as soon not complicate matters
> by adding another target to download test dependencies.
>
> Next up is Cactus :-)
>
> TTFN,
>
> -bd-
>
> On Jul 21, 2005, at 9:17 AM, Grant Smith wrote:
>
> > +1 for EasyMock and it's dependencies. While we're at it, don't we
> > need junit.jar too ? Also, I would recommend only downloading the
> > dependencies if you run the 'test-all' (or 'test' for a subproject)
> > target, not if you run the usual 'dist-all' that most people will
> > be doing.
> >
> > Thanks for doing this Bill !!
> >
> > Bill Dudney wrote:
> >
> >
> >> Hi All,
> >>
> >> I've got the first of the EasyMock (http://www.easymock.org) tests
> >> in place. I have not commited the changes because I wanted to
> >> get everyone's opinion before introducing a new dependency. There
> >> are 4 new jars required to use easymock, ams.jar, cglib.jar,
> >> easymock- classextensions.jar and easymock.jar. The cglib and ams
> >> dependency are used to mock abstract classes (the default
> >> easymock.jar is able to mock interfaces without cglib or ams).
> >>
> >> With the EasyMock framework I was able to get to 100% code
> >> coverage of the abstract StateManager class with 5 tests and less
> >> than 125 lines of actual test code. I'm a fan and have used it
> >> extensively on other projects. I believe the extra dependencies
> >> are worth it to get the testing done.
> >>
> >> As soon as there is consensus I'll commit the changes to
> >> build.xml and the actual test code (or by tomorrow afternoon or
> >> so assuming that a lack of comment is agreement) then move on to
> >> the cactus test stuff.
> >>
> >> Sean: I'll try a couple of different approaches to the build and
> >> post in the form of a proposal, so your feedback to that thread
> >> will be most useful :-)
> >>
> >> TTFN,
> >>
> >> -bd-
> >>
> >
> >
> >
>
>
Re: [proposal] use EasyMock for mocking
Posted by Sean Schofield <se...@gmail.com>.
> On the download dependencies, there is no real reason not to just
> download them (IMO) because it takes an additional 20 seconds the
> first time and then an additional 1 second thereafter (I made up the
> #'s but its not far off) so I'd just as soon not complicate matters
> by adding another target to download test dependencies.
Agreed
Re: [proposal] use EasyMock for mocking
Posted by Bill Dudney <bd...@mac.com>.
OK I've committed the changes.
On the download dependencies, there is no real reason not to just
download them (IMO) because it takes an additional 20 seconds the
first time and then an additional 1 second thereafter (I made up the
#'s but its not far off) so I'd just as soon not complicate matters
by adding another target to download test dependencies.
Next up is Cactus :-)
TTFN,
-bd-
On Jul 21, 2005, at 9:17 AM, Grant Smith wrote:
> +1 for EasyMock and it's dependencies. While we're at it, don't we
> need junit.jar too ? Also, I would recommend only downloading the
> dependencies if you run the 'test-all' (or 'test' for a subproject)
> target, not if you run the usual 'dist-all' that most people will
> be doing.
>
> Thanks for doing this Bill !!
>
> Bill Dudney wrote:
>
>
>> Hi All,
>>
>> I've got the first of the EasyMock (http://www.easymock.org) tests
>> in place. I have not commited the changes because I wanted to
>> get everyone's opinion before introducing a new dependency. There
>> are 4 new jars required to use easymock, ams.jar, cglib.jar,
>> easymock- classextensions.jar and easymock.jar. The cglib and ams
>> dependency are used to mock abstract classes (the default
>> easymock.jar is able to mock interfaces without cglib or ams).
>>
>> With the EasyMock framework I was able to get to 100% code
>> coverage of the abstract StateManager class with 5 tests and less
>> than 125 lines of actual test code. I'm a fan and have used it
>> extensively on other projects. I believe the extra dependencies
>> are worth it to get the testing done.
>>
>> As soon as there is consensus I'll commit the changes to
>> build.xml and the actual test code (or by tomorrow afternoon or
>> so assuming that a lack of comment is agreement) then move on to
>> the cactus test stuff.
>>
>> Sean: I'll try a couple of different approaches to the build and
>> post in the form of a proposal, so your feedback to that thread
>> will be most useful :-)
>>
>> TTFN,
>>
>> -bd-
>>
>
>
>
Re: [proposal] use EasyMock for mocking
Posted by Grant Smith <gr...@marathon-man.com>.
+1 for EasyMock and it's dependencies. While we're at it, don't we need
junit.jar too ? Also, I would recommend only downloading the
dependencies if you run the 'test-all' (or 'test' for a subproject)
target, not if you run the usual 'dist-all' that most people will be doing.
Thanks for doing this Bill !!
Bill Dudney wrote:
> Hi All,
>
> I've got the first of the EasyMock (http://www.easymock.org) tests in
> place. I have not commited the changes because I wanted to get
> everyone's opinion before introducing a new dependency. There are 4
> new jars required to use easymock, ams.jar, cglib.jar, easymock-
> classextensions.jar and easymock.jar. The cglib and ams dependency
> are used to mock abstract classes (the default easymock.jar is able
> to mock interfaces without cglib or ams).
>
> With the EasyMock framework I was able to get to 100% code coverage
> of the abstract StateManager class with 5 tests and less than 125
> lines of actual test code. I'm a fan and have used it extensively on
> other projects. I believe the extra dependencies are worth it to get
> the testing done.
>
> As soon as there is consensus I'll commit the changes to build.xml
> and the actual test code (or by tomorrow afternoon or so assuming
> that a lack of comment is agreement) then move on to the cactus test
> stuff.
>
> Sean: I'll try a couple of different approaches to the build and post
> in the form of a proposal, so your feedback to that thread will be
> most useful :-)
>
> TTFN,
>
> -bd-
Re: [proposal] use EasyMock for mocking
Posted by Sean Schofield <se...@gmail.com>.
+1 Bill. A *huge* thank you for taking the lead on this. In general
I'm in favor of Mock Objects and more testing so however you want to
do that is fine with me!
sean
On 7/21/05, Manfred Geiler <ma...@gmail.com> wrote:
> 2005/7/21, Bill Dudney <bd...@mac.com>:
> > The dependency will only be at development time.
>
> Yes, of course. I was just kidding...
>
> :-)
>
> -Manfred
>
Re: [proposal] use EasyMock for mocking
Posted by Manfred Geiler <ma...@gmail.com>.
2005/7/21, Bill Dudney <bd...@mac.com>:
> The dependency will only be at development time.
Yes, of course. I was just kidding...
:-)
-Manfred
Re: [proposal] use EasyMock for mocking
Posted by Bill Dudney <bd...@mac.com>.
The dependency will only be at development time.
I've added them to the 'download-dependency' target in the build.xml
file so you won't even have to know they are there :-)
TTFN,
-bd-
On Jul 21, 2005, at 5:23 AM, Manfred Geiler wrote:
> +1
>
> dependencies for test compiling are ok, as long as there is no need to
> add them to our bin-releases! :-)))
>
> -Manfred
>
>
> 2005/7/21, Bill Dudney <bd...@mac.com>:
>
>> Hi All,
>>
>> I've got the first of the EasyMock (http://www.easymock.org) tests in
>> place. I have not commited the changes because I wanted to get
>> everyone's opinion before introducing a new dependency. There are 4
>> new jars required to use easymock, ams.jar, cglib.jar, easymock-
>> classextensions.jar and easymock.jar. The cglib and ams dependency
>> are used to mock abstract classes (the default easymock.jar is able
>> to mock interfaces without cglib or ams).
>>
>> With the EasyMock framework I was able to get to 100% code coverage
>> of the abstract StateManager class with 5 tests and less than 125
>> lines of actual test code. I'm a fan and have used it extensively on
>> other projects. I believe the extra dependencies are worth it to get
>> the testing done.
>>
>> As soon as there is consensus I'll commit the changes to build.xml
>> and the actual test code (or by tomorrow afternoon or so assuming
>> that a lack of comment is agreement) then move on to the cactus test
>> stuff.
>>
>> Sean: I'll try a couple of different approaches to the build and post
>> in the form of a proposal, so your feedback to that thread will be
>> most useful :-)
>>
>> TTFN,
>>
>> -bd-
>>
>> On Jul 20, 2005, at 1:39 PM, Bill Dudney wrote:
>>
>>
>>> Hi Grant,
>>>
>>> Thanks for your interest in the testing stuff.
>>>
>>> Sorry I've not committed the cactus stuff yet. I need to get my
>>> thoughts together in an new thread that Sean can comment on because
>>> there will be additional build stuff in place (cargo to start/stop
>>> containers, packaging a new war file to distribute the cactus tests
>>> in etc.) and I want the changes to fit with Sean's continued vision
>>> of the build process.
>>>
>>> In the mean time we could use mock objects. Although the class you
>>> refer to (ServletFacesContextImpl) is particularly hard to test
>>> because the lack of default config setup that happens during out of
>>> container testing.
>>>
>>> I have a test for the Factory that could be used as the starting
>>> point of a factory setup so that the rest of the required stuff
>>> could be mocked for the facescontext impl. I will get that checked
>>> in asap (SVN appears to be down again).
>>>
>>> TTFN,
>>>
>>> -bd-
>>>
>>> On Jul 20, 2005, at 11:36 AM, Grant Smith wrote:
>>>
>>>
>>>
>>>> Bill,
>>>>
>>>> The current testing setup is great for objects that are container-
>>>> independent. Any indication when we'll be able to test things that
>>>> need to live in a container, like FacesContextImpl ? I assume
>>>> we'll need cactus for that, although if you know of any tricks to
>>>> test container-dependent objects, that would be valuable
>>>> information :)
>>>>
>>>> Another question for cactus gurus: is cactus portlet friendly ?
>>>>
>>>> Thanks,
>>>> Grant
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>
Re: [proposal] use EasyMock for mocking
Posted by Manfred Geiler <ma...@gmail.com>.
+1
dependencies for test compiling are ok, as long as there is no need to
add them to our bin-releases! :-)))
-Manfred
2005/7/21, Bill Dudney <bd...@mac.com>:
> Hi All,
>
> I've got the first of the EasyMock (http://www.easymock.org) tests in
> place. I have not commited the changes because I wanted to get
> everyone's opinion before introducing a new dependency. There are 4
> new jars required to use easymock, ams.jar, cglib.jar, easymock-
> classextensions.jar and easymock.jar. The cglib and ams dependency
> are used to mock abstract classes (the default easymock.jar is able
> to mock interfaces without cglib or ams).
>
> With the EasyMock framework I was able to get to 100% code coverage
> of the abstract StateManager class with 5 tests and less than 125
> lines of actual test code. I'm a fan and have used it extensively on
> other projects. I believe the extra dependencies are worth it to get
> the testing done.
>
> As soon as there is consensus I'll commit the changes to build.xml
> and the actual test code (or by tomorrow afternoon or so assuming
> that a lack of comment is agreement) then move on to the cactus test
> stuff.
>
> Sean: I'll try a couple of different approaches to the build and post
> in the form of a proposal, so your feedback to that thread will be
> most useful :-)
>
> TTFN,
>
> -bd-
>
> On Jul 20, 2005, at 1:39 PM, Bill Dudney wrote:
>
> > Hi Grant,
> >
> > Thanks for your interest in the testing stuff.
> >
> > Sorry I've not committed the cactus stuff yet. I need to get my
> > thoughts together in an new thread that Sean can comment on because
> > there will be additional build stuff in place (cargo to start/stop
> > containers, packaging a new war file to distribute the cactus tests
> > in etc.) and I want the changes to fit with Sean's continued vision
> > of the build process.
> >
> > In the mean time we could use mock objects. Although the class you
> > refer to (ServletFacesContextImpl) is particularly hard to test
> > because the lack of default config setup that happens during out of
> > container testing.
> >
> > I have a test for the Factory that could be used as the starting
> > point of a factory setup so that the rest of the required stuff
> > could be mocked for the facescontext impl. I will get that checked
> > in asap (SVN appears to be down again).
> >
> > TTFN,
> >
> > -bd-
> >
> > On Jul 20, 2005, at 11:36 AM, Grant Smith wrote:
> >
> >
> >> Bill,
> >>
> >> The current testing setup is great for objects that are container-
> >> independent. Any indication when we'll be able to test things that
> >> need to live in a container, like FacesContextImpl ? I assume
> >> we'll need cactus for that, although if you know of any tricks to
> >> test container-dependent objects, that would be valuable
> >> information :)
> >>
> >> Another question for cactus gurus: is cactus portlet friendly ?
> >>
> >> Thanks,
> >> Grant
> >>
> >>
> >
> >
>
>
Re: [proposal] use EasyMock for mocking
Posted by Bruno Aranda <br...@gmail.com>.
+1
For me it is better to introduce a new dependency if we can create
better tests (and faster) than using nasty workarounds...
Bruno
P.S. Now in the correct place :-)
2005/7/21, Bill Dudney <bd...@mac.com>:
> Hi All,
>
> I've got the first of the EasyMock (http://www.easymock.org) tests in
> place. I have not commited the changes because I wanted to get
> everyone's opinion before introducing a new dependency. There are 4
> new jars required to use easymock, ams.jar, cglib.jar, easymock-
> classextensions.jar and easymock.jar. The cglib and ams dependency
> are used to mock abstract classes (the default easymock.jar is able
> to mock interfaces without cglib or ams).
>
> With the EasyMock framework I was able to get to 100% code coverage
> of the abstract StateManager class with 5 tests and less than 125
> lines of actual test code. I'm a fan and have used it extensively on
> other projects. I believe the extra dependencies are worth it to get
> the testing done.
>
> As soon as there is consensus I'll commit the changes to build.xml
> and the actual test code (or by tomorrow afternoon or so assuming
> that a lack of comment is agreement) then move on to the cactus test
> stuff.
>
> Sean: I'll try a couple of different approaches to the build and post
> in the form of a proposal, so your feedback to that thread will be
> most useful :-)
>
> TTFN,
>
> -bd-
>
> On Jul 20, 2005, at 1:39 PM, Bill Dudney wrote:
>
> > Hi Grant,
> >
> > Thanks for your interest in the testing stuff.
> >
> > Sorry I've not committed the cactus stuff yet. I need to get my
> > thoughts together in an new thread that Sean can comment on because
> > there will be additional build stuff in place (cargo to start/stop
> > containers, packaging a new war file to distribute the cactus tests
> > in etc.) and I want the changes to fit with Sean's continued vision
> > of the build process.
> >
> > In the mean time we could use mock objects. Although the class you
> > refer to (ServletFacesContextImpl) is particularly hard to test
> > because the lack of default config setup that happens during out of
> > container testing.
> >
> > I have a test for the Factory that could be used as the starting
> > point of a factory setup so that the rest of the required stuff
> > could be mocked for the facescontext impl. I will get that checked
> > in asap (SVN appears to be down again).
> >
> > TTFN,
> >
> > -bd-
> >
> > On Jul 20, 2005, at 11:36 AM, Grant Smith wrote:
> >
> >
> >> Bill,
> >>
> >> The current testing setup is great for objects that are container-
> >> independent. Any indication when we'll be able to test things that
> >> need to live in a container, like FacesContextImpl ? I assume
> >> we'll need cactus for that, although if you know of any tricks to
> >> test container-dependent objects, that would be valuable
> >> information :)
> >>
> >> Another question for cactus gurus: is cactus portlet friendly ?
> >>
> >> Thanks,
> >> Grant
> >>
> >>
> >
> >
>
>
[proposal] use EasyMock for mocking
Posted by Bill Dudney <bd...@mac.com>.
Hi All,
I've got the first of the EasyMock (http://www.easymock.org) tests in
place. I have not commited the changes because I wanted to get
everyone's opinion before introducing a new dependency. There are 4
new jars required to use easymock, ams.jar, cglib.jar, easymock-
classextensions.jar and easymock.jar. The cglib and ams dependency
are used to mock abstract classes (the default easymock.jar is able
to mock interfaces without cglib or ams).
With the EasyMock framework I was able to get to 100% code coverage
of the abstract StateManager class with 5 tests and less than 125
lines of actual test code. I'm a fan and have used it extensively on
other projects. I believe the extra dependencies are worth it to get
the testing done.
As soon as there is consensus I'll commit the changes to build.xml
and the actual test code (or by tomorrow afternoon or so assuming
that a lack of comment is agreement) then move on to the cactus test
stuff.
Sean: I'll try a couple of different approaches to the build and post
in the form of a proposal, so your feedback to that thread will be
most useful :-)
TTFN,
-bd-
On Jul 20, 2005, at 1:39 PM, Bill Dudney wrote:
> Hi Grant,
>
> Thanks for your interest in the testing stuff.
>
> Sorry I've not committed the cactus stuff yet. I need to get my
> thoughts together in an new thread that Sean can comment on because
> there will be additional build stuff in place (cargo to start/stop
> containers, packaging a new war file to distribute the cactus tests
> in etc.) and I want the changes to fit with Sean's continued vision
> of the build process.
>
> In the mean time we could use mock objects. Although the class you
> refer to (ServletFacesContextImpl) is particularly hard to test
> because the lack of default config setup that happens during out of
> container testing.
>
> I have a test for the Factory that could be used as the starting
> point of a factory setup so that the rest of the required stuff
> could be mocked for the facescontext impl. I will get that checked
> in asap (SVN appears to be down again).
>
> TTFN,
>
> -bd-
>
> On Jul 20, 2005, at 11:36 AM, Grant Smith wrote:
>
>
>> Bill,
>>
>> The current testing setup is great for objects that are container-
>> independent. Any indication when we'll be able to test things that
>> need to live in a container, like FacesContextImpl ? I assume
>> we'll need cactus for that, although if you know of any tricks to
>> test container-dependent objects, that would be valuable
>> information :)
>>
>> Another question for cactus gurus: is cactus portlet friendly ?
>>
>> Thanks,
>> Grant
>>
>>
>
>
Re: Status of testing framework
Posted by Bill Dudney <bd...@mac.com>.
Hi Grant,
Thanks for your interest in the testing stuff.
Sorry I've not committed the cactus stuff yet. I need to get my
thoughts together in an new thread that Sean can comment on because
there will be additional build stuff in place (cargo to start/stop
containers, packaging a new war file to distribute the cactus tests
in etc.) and I want the changes to fit with Sean's continued vision
of the build process.
In the mean time we could use mock objects. Although the class you
refer to (ServletFacesContextImpl) is particularly hard to test
because the lack of default config setup that happens during out of
container testing.
I have a test for the Factory that could be used as the starting
point of a factory setup so that the rest of the required stuff could
be mocked for the facescontext impl. I will get that checked in asap
(SVN appears to be down again).
TTFN,
-bd-
On Jul 20, 2005, at 11:36 AM, Grant Smith wrote:
> Bill,
>
> The current testing setup is great for objects that are container-
> independent. Any indication when we'll be able to test things that
> need to live in a container, like FacesContextImpl ? I assume we'll
> need cactus for that, although if you know of any tricks to test
> container-dependent objects, that would be valuable information :)
>
> Another question for cactus gurus: is cactus portlet friendly ?
>
> Thanks,
> Grant
>