Friday, September 25, 2009

fitnesse Q&&A

(We will intermix "fix" and "fixt" and "fixture.)

fitness runs with 2 JVM
* a long term infra jvm
* a jvm launched for the system under test

FIT system interprets HTML inbound and outbound. Fitnesse wraps FIT.

set commission rate -> setCommissionRate() will be called.

Q: automated build?
A: ant can trap the fit failures

Q: cvs?
A: fitness has versions for each page

Q: books on fit tricks
A: it may not sell, since the fitness guys did good documentation(?)

-- 5 types of colors
* green: expected = actual
* red: obvious
* yellow: a broken (not found) fixture -- Thanks to blog reader comment below.
* grey background: See the top summary saying "5 ignored" meaning "5 table cells ignored". nothing-to-run. expected will show ...............
good for comments
We should leave "expected" output header empty.

* grey text: expected -- we don't care. Actual will show.
Good for debugging.
We should leave "expected" output header empty.

Q: Just want to execute a method and the result is not important (or the method is void)?
A: use the SetUpFixture instead (see http://www.fitnesse.info/fixturegallery:fitlibraryfixtures:setupfixture).
A: The ColumnFixture will also allow you to just print the result of the calculation, not testing it.
A: empty cell in a fitnesse table? Try it

---- various fixtures ----
one table => one fixture class. For doFixture, one page => one fixt class. Stateful fix

column/row fixt need one fixt class per TABLE; do fixt need a fixt class per PAGE. That's the norm. However, a doFix can also instantiate a rowFix, like Peter Walker showed.

-- col fixt --
one input column => one field
one output column => one method
-------------

-- testing
Q: How do I know what type of 'error' matched my expected 'error'?
A: provide another method that opens the exception...

Q: how to share an object between 2 column fixtures on a page, so that first fixt populates it for 2nd fixt?
A: use a new class to hold a static instance to the object

Q: other output columns for an error row?
A: leave blank

Q: how to say expected = null?
A: just spell out n u l l

Q: what if an "expected" is in camel case and confuses fitness
A: escape it with ! or "!-...-!"

Q: use fit to test non-public stuff?
A: not designed for that. try parallel tree

-- wiki
Q: save the editor?
A: alt-S

Q: collapse or hide a table?
A: http://localhost/FitNesse.QuickReferenceGuide

Q: comment?
A: see notes on grey-background

Q: comment at end or elsewhere?
A: yes

!contents // will render to a table of links

1 comment:

Thomas E. Kenny said...

I believe there is another color. Yellow indicates a broken (not found) fixture. I include a "yellow" broken fixture in my demo of FitNesse so people know what it is in case they cause this condition...

Otherwise you have a good set of notes.

Total Pageviews

my favorite topics (labels)

_fuxi (302) _misLabel (13) _orig? (3) _rm (2) _vague (2) clarified (58) cpp (39) cpp_const (22) cpp_real (76) cpp/java/c# (101) cppBig4 (54) cppSmartPtr (35) cppSTL (33) cppSTL_itr (27) cppSTL_real (26) cppTemplate (28) creditMkt (14) db (65) db_sybase (43) deepUnder (31) dotnet (20) ECN (27) econ/bank` (36) fin/sys_misc (43) finGreek (34) finReal (45) finRisk (30) finTechDesign (46) finTechMisc (32) finVol (66) FixedIncom (28) fMath (7) fMathOption (33) fMathStoch (67) forex (39) gr8IV_Q (46) GTD_skill (15) GUI_event (30) inMemDB (42) intuit_math (41) intuitFinance (57) javaMisc (68) javaServerSide (13) lambda/delegate (22) marketData (28) math (10) mathStat (55) memIssue (8) memMgmt (66) metaProgram` (6) OO_Design (84) original_content (749) polymorphic/vptr (40) productive (21) ptr/ref (48) py (28) reflect (8) script`/unix (82) socket/stream (39) subquery/join (30) subvert (13) swing/wpf (9) sysProgram` (16) thread (164) thread_CAS (15) thread_cpp (28) Thread* (22) timeSaver (80) transactional (23) tune (24) tuneDB (40) tuneLatency (30) z_ajax (9) z_algoDataStruct (41) z_arch (26) z_arch_job (27) z_automateTest (17) z_autoTrad` (19) z_bestPractice (39) z_bold (83) z_bondMath (35) z_book (18) z_boost (19) z_byRef^Val (32) z_c#GUI (43) z_c#misc (80) z_cast/convert (28) z_container (67) z_cStr/arr (39) z_Favorite* (8) z_FIX (15) z_forex (48) z_fwd_Deal (18) z_gz=job (33) z_gzBig20 (13) z_gzMgr (13) z_gzPain (20) z_gzThreat (19) z_hib (19) z_IDE (52) z_ikm (5) z_IR_misc (36) z_IRS (26) z_javaWeb (28) z_jdbc (10) z_jobFinTech (46) z_jobHunt (20) z_jobRealXp (10) z_jobStrength (15) z_jobUS^asia (27) z_letter (42) z_linq (10) z_memberHid` (11) z_MOM (54) z_nestedClass (5) z_oq (24) z_PCP (12) z_pearl (1) z_php (20) z_prodSupport (7) z_py (31) z_quant (14) z_regex (8) z_rv (38) z_skillist (48) z_slic`Problem (6) z_SOA (14) z_spring (25) z_src_code (8) z_swingMisc (50) z_swingTable (26) z_unpublish (2) z_VBA/Excel (8) z_windoz (17) z_wpfCommand (9)

About Me

New York (Time Square), NY, United States
http://www.linkedin.com/in/tanbin