You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Mark Struberg <st...@yahoo.de> on 2011/07/01 10:31:25 UTC

Re: junit viewer success story

+1

We also have project specific blogs on

http://blogs.apache.org/

I will ask on general if this is also available for incubator projects.

LieGrue,
strub

--- On Thu, 6/30/11, Mohammad Nour El-Din <no...@gmail.com> wrote:

> From: Mohammad Nour El-Din <no...@gmail.com>
> Subject: Re: junit viewer success story
> To: isis-dev@incubator.apache.org
> Date: Thursday, June 30, 2011, 8:09 PM
> Perfect why not to write a blog or an
> article about it and we publish
> it on our site ?
> 
> On Thu, Jun 30, 2011 at 9:31 PM, Kevin Meyer - KMZ <ke...@kmz.co.za>
> wrote:
> > Hi All, (Dan!)
> >
> > I just wanted to write a short note to say that I have
> been using the Isis
> > junit viewer to write application tests for an
> application that I have been
> > contracted to write.. and I think it works quite
> well!
> >
> > Once I realised I had to (and remembered to) wrap the
> appropriate
> > domain classes (and services), the junit viewer has
> helped me confirm
> > such application domain issues as user rights (only
> certain users can
> > see certain properties, access certain methods, etc),
> and general
> > application usage (if I can't write a straight-forward
> "test" to achieve the
> > required functionality - it's too complicated).
> >
> > Combined with ecl-emma, I have reasonable confidence
> that both the
> > application and the domain classes are reasonably
> exercised!
> >
> > At some point, though, it seems that I need to look
> into ensuring that
> > life-cycle methods are also included - it seems that
> "validate" is not
> > being called before persistance - but this is not a
> blocker if you're
> > aware of it.
> >
> > Anyway - it works, and I'm finding it very useful.
> >
> > A simple test looks like:
> >
> >    public void memberCanNotChangeOwnInitials()
> throws Exception {
> >        doLogin("voter@saip");
> >
> >        try {
> >          
>  wrappedLoggedInMember.setInitials("X");
> >            fail("Should have been disabled");
> >        } catch (DisabledException e) {
> >            // this is good!
> >        }
> >    }
> >
> > Perhaps someone else'll comment on style, but I think
> these tests are
> > quite clear.
> >
> > Regards,
> > Kevin
> >
> > PS: I have also written an authenticator to use a SQL
> database. I will
> > update the authentication, etc, documentation with
> HOWTOs shortly.
> >
> >
> >
> 
> 
> 
> -- 
> Thanks
> - Mohammad Nour
>   Author of (WebSphere Application Server Community
> Edition 2.0 User Guide)
>   http://www.redbooks.ibm.com/abstracts/sg247585.html
> - LinkedIn: http://www.linkedin.com/in/mnour
> - Blog: http://tadabborat.blogspot.com
> ----
> "Life is like riding a bicycle. To keep your balance you
> must keep moving"
> - Albert Einstein
> 
> "Writing clean code is what you must do in order to call
> yourself a
> professional. There is no reasonable excuse for doing
> anything less
> than your best."
> - Clean Code: A Handbook of Agile Software Craftsmanship
> 
> "Stay hungry, stay foolish."
> - Steve Jobs
> 

Re: junit viewer success story

Posted by Mohammad Nour El-Din <no...@gmail.com>.
I am looking forward it :D

On Sun, Jul 3, 2011 at 6:33 PM, Dan Haywood <dk...@gmail.com> wrote:
> Mark, Mohammad,
>
> good idea... I'll request an account and start posting there once I get our
> release out (currently building a new RC for voting on).
>
> Cheers
> Dan
>
>
> On 01/07/2011 09:31, Mark Struberg wrote:
>>
>> +1
>>
>> We also have project specific blogs on
>>
>> http://blogs.apache.org/
>>
>> I will ask on general if this is also available for incubator projects.
>>
>> LieGrue,
>> strub
>>
>> --- On Thu, 6/30/11, Mohammad Nour El-Din<no...@gmail.com>  wrote:
>>
>>> From: Mohammad Nour El-Din<no...@gmail.com>
>>> Subject: Re: junit viewer success story
>>> To: isis-dev@incubator.apache.org
>>> Date: Thursday, June 30, 2011, 8:09 PM
>>> Perfect why not to write a blog or an
>>> article about it and we publish
>>> it on our site ?
>>>
>>> On Thu, Jun 30, 2011 at 9:31 PM, Kevin Meyer - KMZ<ke...@kmz.co.za>
>>> wrote:
>>>>
>>>> Hi All, (Dan!)
>>>>
>>>> I just wanted to write a short note to say that I have
>>>
>>> been using the Isis
>>>>
>>>> junit viewer to write application tests for an
>>>
>>> application that I have been
>>>>
>>>> contracted to write.. and I think it works quite
>>>
>>> well!
>>>>
>>>> Once I realised I had to (and remembered to) wrap the
>>>
>>> appropriate
>>>>
>>>> domain classes (and services), the junit viewer has
>>>
>>> helped me confirm
>>>>
>>>> such application domain issues as user rights (only
>>>
>>> certain users can
>>>>
>>>> see certain properties, access certain methods, etc),
>>>
>>> and general
>>>>
>>>> application usage (if I can't write a straight-forward
>>>
>>> "test" to achieve the
>>>>
>>>> required functionality - it's too complicated).
>>>>
>>>> Combined with ecl-emma, I have reasonable confidence
>>>
>>> that both the
>>>>
>>>> application and the domain classes are reasonably
>>>
>>> exercised!
>>>>
>>>> At some point, though, it seems that I need to look
>>>
>>> into ensuring that
>>>>
>>>> life-cycle methods are also included - it seems that
>>>
>>> "validate" is not
>>>>
>>>> being called before persistance - but this is not a
>>>
>>> blocker if you're
>>>>
>>>> aware of it.
>>>>
>>>> Anyway - it works, and I'm finding it very useful.
>>>>
>>>> A simple test looks like:
>>>>
>>>>    public void memberCanNotChangeOwnInitials()
>>>
>>> throws Exception {
>>>>
>>>>        doLogin("voter@saip");
>>>>
>>>>        try {
>>>>
>>>  wrappedLoggedInMember.setInitials("X");
>>>>
>>>>            fail("Should have been disabled");
>>>>        } catch (DisabledException e) {
>>>>            // this is good!
>>>>        }
>>>>    }
>>>>
>>>> Perhaps someone else'll comment on style, but I think
>>>
>>> these tests are
>>>>
>>>> quite clear.
>>>>
>>>> Regards,
>>>> Kevin
>>>>
>>>> PS: I have also written an authenticator to use a SQL
>>>
>>> database. I will
>>>>
>>>> update the authentication, etc, documentation with
>>>
>>> HOWTOs shortly.
>>>>
>>>>
>>>
>>>
>>> --
>>> Thanks
>>> - Mohammad Nour
>>>   Author of (WebSphere Application Server Community
>>> Edition 2.0 User Guide)
>>>   http://www.redbooks.ibm.com/abstracts/sg247585.html
>>> - LinkedIn: http://www.linkedin.com/in/mnour
>>> - Blog: http://tadabborat.blogspot.com
>>> ----
>>> "Life is like riding a bicycle. To keep your balance you
>>> must keep moving"
>>> - Albert Einstein
>>>
>>> "Writing clean code is what you must do in order to call
>>> yourself a
>>> professional. There is no reasonable excuse for doing
>>> anything less
>>> than your best."
>>> - Clean Code: A Handbook of Agile Software Craftsmanship
>>>
>>> "Stay hungry, stay foolish."
>>> - Steve Jobs
>>>
>



-- 
Thanks
- Mohammad Nour
  Author of (WebSphere Application Server Community Edition 2.0 User Guide)
  http://www.redbooks.ibm.com/abstracts/sg247585.html
- LinkedIn: http://www.linkedin.com/in/mnour
- Blog: http://tadabborat.blogspot.com
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

"Writing clean code is what you must do in order to call yourself a
professional. There is no reasonable excuse for doing anything less
than your best."
- Clean Code: A Handbook of Agile Software Craftsmanship

"Stay hungry, stay foolish."
- Steve Jobs

Re: junit viewer success story

Posted by Dan Haywood <dk...@gmail.com>.
Mark, Mohammad,

good idea... I'll request an account and start posting there once I get 
our release out (currently building a new RC for voting on).

Cheers
Dan


On 01/07/2011 09:31, Mark Struberg wrote:
> +1
>
> We also have project specific blogs on
>
> http://blogs.apache.org/
>
> I will ask on general if this is also available for incubator projects.
>
> LieGrue,
> strub
>
> --- On Thu, 6/30/11, Mohammad Nour El-Din<no...@gmail.com>  wrote:
>
>> From: Mohammad Nour El-Din<no...@gmail.com>
>> Subject: Re: junit viewer success story
>> To: isis-dev@incubator.apache.org
>> Date: Thursday, June 30, 2011, 8:09 PM
>> Perfect why not to write a blog or an
>> article about it and we publish
>> it on our site ?
>>
>> On Thu, Jun 30, 2011 at 9:31 PM, Kevin Meyer - KMZ<ke...@kmz.co.za>
>> wrote:
>>> Hi All, (Dan!)
>>>
>>> I just wanted to write a short note to say that I have
>> been using the Isis
>>> junit viewer to write application tests for an
>> application that I have been
>>> contracted to write.. and I think it works quite
>> well!
>>> Once I realised I had to (and remembered to) wrap the
>> appropriate
>>> domain classes (and services), the junit viewer has
>> helped me confirm
>>> such application domain issues as user rights (only
>> certain users can
>>> see certain properties, access certain methods, etc),
>> and general
>>> application usage (if I can't write a straight-forward
>> "test" to achieve the
>>> required functionality - it's too complicated).
>>>
>>> Combined with ecl-emma, I have reasonable confidence
>> that both the
>>> application and the domain classes are reasonably
>> exercised!
>>> At some point, though, it seems that I need to look
>> into ensuring that
>>> life-cycle methods are also included - it seems that
>> "validate" is not
>>> being called before persistance - but this is not a
>> blocker if you're
>>> aware of it.
>>>
>>> Anyway - it works, and I'm finding it very useful.
>>>
>>> A simple test looks like:
>>>
>>>     public void memberCanNotChangeOwnInitials()
>> throws Exception {
>>>         doLogin("voter@saip");
>>>
>>>         try {
>>>
>>   wrappedLoggedInMember.setInitials("X");
>>>             fail("Should have been disabled");
>>>         } catch (DisabledException e) {
>>>             // this is good!
>>>         }
>>>     }
>>>
>>> Perhaps someone else'll comment on style, but I think
>> these tests are
>>> quite clear.
>>>
>>> Regards,
>>> Kevin
>>>
>>> PS: I have also written an authenticator to use a SQL
>> database. I will
>>> update the authentication, etc, documentation with
>> HOWTOs shortly.
>>>
>>>
>>
>>
>> -- 
>> Thanks
>> - Mohammad Nour
>>    Author of (WebSphere Application Server Community
>> Edition 2.0 User Guide)
>>    http://www.redbooks.ibm.com/abstracts/sg247585.html
>> - LinkedIn: http://www.linkedin.com/in/mnour
>> - Blog: http://tadabborat.blogspot.com
>> ----
>> "Life is like riding a bicycle. To keep your balance you
>> must keep moving"
>> - Albert Einstein
>>
>> "Writing clean code is what you must do in order to call
>> yourself a
>> professional. There is no reasonable excuse for doing
>> anything less
>> than your best."
>> - Clean Code: A Handbook of Agile Software Craftsmanship
>>
>> "Stay hungry, stay foolish."
>> - Steve Jobs
>>

Re: junit viewer success story

Posted by Kevin Meyer - KMZ <ke...@kmz.co.za>.
Thanks for the responses.

I'm sorting out my thinking by updating the junit viewer documentation.

Once I'm happy with that, I'll see what the next appropriate medium 
might be.

Regards,
Kevin


On 1 Jul 2011 at 9:31, Mark Struberg wrote:

> +1
> 
> We also have project specific blogs on
> 
> http://blogs.apache.org/
> 
> I will ask on general if this is also available for incubator projects.
> 
> LieGrue,
> strub
> 
> --- On Thu, 6/30/11, Mohammad Nour El-Din wrote:
> 
> > Subject: Re: junit viewer success story
> > To: isis-dev@incubator.apache.org
> > Date: Thursday, June 30, 2011, 8:09 PM
> >
> > Perfect why not to write a blog or an
> > article about it and we publish
> > it on our site ?