Search the web
Sign In
New User? Sign Up
fitnesse
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Introducing Generic Fixture for FitNesse   Topic List   < Prev Topic  |  Next Topic >
Reply | Forward  | 
Re: Introducing Generic Fixture for FitNesse

Anubhava, your accomplishment is commendable and certainly not the focus of my comments.  Please accept my apology if it was perceived as such.

Unless you're using FitNesse as a unit test environment or stepping outside of good coding practices, the existing FitLibrary should suffice.  In other words, is the test to insure the code is built right, or is the right code is built?

To address your concerns with FitLibrary capabilities:

  • Most coding standards require externally facing modules to have a default constructor for robustness.  For example, many interfaces such as JavaBeans, EJB, Servlet, JPA, etc. require a default constructor.
  • Static methods are allowed.  Add the following to the Address class:
       static public int getReturnPlusFifteenTwo (int x) { return x + 15; }
    with this in the Do section of the wiki:
       | check | get Return Plus Fifteen Two | 10 | 25 |
  • As long as any "arbitrary methods" for utility purposes are encapsulated in a fixture, FitLibrary with the appropriate UFO patch will accommodate embedded fixtures.  Case in point, there is a FitNesse fixture called Sleep that takes a millisecond argument.

In essence, although it's possible to extend FitNesse to handle unit testing, it may prove more appropriate and robust to use an xUnit suite rather than a FitNesse suite.  Recognizing that occasionally there are overlaps in domain, the mindsets are different.

Again, xUnit insures the code is built right, and FitNesse insures the right code is built.

~~Andy

--- In fitnesse@yahoogroups.com, "anubhavas" <anubhava@...> wrote:
>
> Thanks for spending precious time to read my post and for your response?
>
> I haven't researched Workflow pattern in detail but just by looking at
> your response, will it instantiate objects that have NO default
> public constructor (constructor with no arguments). If I have Address
> class with one 1 constructor:
> public Address(int streetNo, String street, String city, int postcode,
> String state); will your example still work?
>
> And what about class with static methods like lava.lang.Math class?
>
> And what about the ability to call arbitrary static methods like
> java.lang.Thread.sleep(delay) any where in test tables?
>
> Regards,
> Anubhava
> --- In fitnesse@yahoogroups.com, "Andy Dassing" andrew.dassing@
> wrote:
> >
> > Does not this same functionality already exist in the Workflow pattern
> > of FitLibary? There are two flavors: 1) In-line, and 2) phased. 1.
> > Inline !define TEST_RUNNER {fitlibrary.suite.FitLibraryServer} |
> > Address | ---- DO
> > | set Address | 123 || Nutley Street || New York || 21019 || NY | '''
> > Get & Check '''
> > | check | Street No | 123 |
> > | check | City | New York |
> > | check | State | NY |
> > | check | Full Address | 123 Nutley Street, New York, NY - 21019 | '''
> > Set '''
> > | set Street No | 111 |
> > | set Postcode | 20133 | ''' Get & Check '''
> > | check | Postcode | 20133 |
> > | check | Street No | 111 |
> > | check | State | NY | 2. Phased
> > !define TEST_RUNNER {fitlibrary.suite.FitLibraryServer}
> > | Address |
> > ---- ''' Do '''
> > | set Address | 123 || Nutley Street || New York || 21019 || NY |
> > ---- ''' Get & Check '''
> > | Street No | 123 |
> > | City | New York |
> > | State | NY |
> > | Full Address | 123 Nutley Street, New York, NY - 21019 |
> > ---- ''' Set '''
> > | Street No | 111 |
> > | Postcode | 20133 |
> > ----
> > ---- ''' Get & Check '''
> > | Postcode | 20133 |
> > | Street No | 111 |
> > | State | NY |
> >
> >
> >
> > --- In fitnesse@yahoogroups.com, "anubhavas" <anubhava@> wrote:
> > >
> > > Hi Friends,
> > >
> > > I wrote a Generic Fixture where you just drop your class in FitNesse's
> > > class path, write your test tables in wiki and be ready to test
> > > without having to write a single line of Java code.
> > >
> > > Please visit my bog
> > >
> >
> http://anubhavas.blogspot.com/2008/01/introducing-generic-fixture-for.ht\
> > ml
> > > to read this in detail and see the code.
> > >
> > > Thanks,
> > > Anubhava
> > >
> >
>



Mon Jan 28, 2008 6:10 pm

andydassing
Offline Offline
Send Email Send Email

Forward
 | 
Expand Messages Author Sort by Date

Hi Friends, I wrote a Generic Fixture where you just drop your class in FitNesse's class path, write your test tables in wiki and be ready to test without...
anubhavas
Offline Send Email
Jan 24, 2008
11:58 pm

Hello Anubhava, I just built the GenericFixture and took it for a spin around the block. It rocks. In thinking about this, the things that currently come to...
Tim Walker
tbone9992
Offline Send Email
Jan 25, 2008
4:32 am

Yes, nice job! It's a variation on the DoFixture/DomainFixture theme. I'll have to try it out a bit before I can see the pros and cons of the different...
Mike Stockdale
jediwhale
Offline Send Email
Jan 25, 2008
4:50 pm

Dear Tim, Thanks a lot for your comments. I am glad that you liked my effort. I am at present working on handling of user defined class in the method...
anubhavas
Offline Send Email
Jan 25, 2008
9:51 pm

This is indeed a significant milestone!! This will take away the burdon from developers for writing fixtures and eliminates the dependancy on developers from...
Pudur Ramaswamy
pudur
Offline Send Email
Jan 25, 2008
6:20 pm

Thanks a lot guys for spending your valuable time and giving your comments on my blog post of Generic Fixture. This is the complete code for Generic Fixture: ...
anubhavas
Offline Send Email
Jan 25, 2008
6:57 pm

Very interesting stuff! I have a question though; how would you use this fixture to supply arguments of a complex type to a method? Is there an ...
Kevin Lundberg
kevinrlundberg
Offline Send Email
Jan 25, 2008
6:57 pm

Kevin, Thanks for your comments. I am at present working on handling of user defined class (or complex type as you said) in the method arguments. I was also...
anubhavas
Offline Send Email
Jan 25, 2008
9:51 pm

Does not this same functionality already exist in the Workflow pattern of FitLibary? There are two flavors: 1) In-line, and 2) phased. 1. Inline !define...
Andy Dassing
andydassing
Offline Send Email
Jan 25, 2008
8:10 pm

Thanks for spending precious time to read my post and for your response? I haven't researched Workflow pattern in detail but just by looking at your response,...
anubhavas
Offline Send Email
Jan 26, 2008
3:38 am

Hi Anubhava, Thank you for this great new fixture and for the dialog to discuss it. ... These are great questions. I don't know about support for these in the ...
Tim Walker
tbone9992
Offline Send Email
Jan 26, 2008
5:01 pm

Tim, Once again thanks a ton for your time and analysis. I'm excited to know that you liked it. And more than anything I am immensely grateful to you for...
anubhavas
Offline Send Email
Jan 28, 2008
2:04 pm

Anubhava, your accomplishment is commendable and certainly not the focus of my comments. Please accept my apology if it was perceived as such. Unless you're...
Andy Dassing
andydassing
Offline Send Email
Jan 28, 2008
6:10 pm

Dear Andy, I really welcome all the healthy discussion on this forum and there is absolutely no need for apology. I really admire your knowledge and expertise...
anubhavas
Offline Send Email
Jan 28, 2008
11:54 pm

... It always depends on your point of view and context, i.e. who is your customer? From my pov it's not a strict unit tests but a development-centric test,...
Johannes Link
jlinkyh
Offline Send Email
Jan 29, 2008
2:42 pm

Dear Johannes, Thanks a lot for your though provoking email. Yes I completely agree if test tables are being written by customers then it makes more sense to...
anubhavas
Offline Send Email
Jan 29, 2008
4:53 pm

Hi, I'd like to subscribe to Johannes' view. FitNesse has its strengths in customer-centric tests. A customer's DSL will be much more declarative and concise...
Andreas Thiel
andreas_thie...
Offline Send Email
Jan 29, 2008
6:08 pm

Hi Andreas, I whole heartedly agree with you regarding strengths of DSL vs general purpose programming language. And if you read my response I mentioned it...
anubhavas
Offline Send Email
Jan 29, 2008
7:23 pm

Guys, For the purpose of handling user defined objects as method parameters I made an enhancement in my Generic Fixture. In order to use a user defined object...
anubhavas
Offline Send Email
Jan 25, 2008
10:52 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help