1 / 13

Using Fit on an Agile J2EE Project John Tyler Houston Java Users Group January 30, 2008

Using Fit on an Agile J2EE Project John Tyler Houston Java Users Group January 30, 2008. Contents. Intro & background Excel vs. HTML vs. FitNesse Performance and maintenance Test data Users writing tests? Things that would've made our lives a lot easier Q&A. Intro & Background.

elan
Download Presentation

Using Fit on an Agile J2EE Project John Tyler Houston Java Users Group January 30, 2008

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using Fit on an Agile J2EE ProjectJohn TylerHouston Java Users GroupJanuary 30, 2008

  2. Contents • Intro & background • Excel vs. HTML vs. FitNesse • Performance and maintenance • Test data • Users writing tests? • Things that would've made our lives a lot easier • Q&A

  3. Intro & Background • Rewrite of public content-based website • 6mm page views per day • 500k+ registered users • ATG Dynamo → Spring MVC + Hibernate • Heavy emphasis on automated testing (JUnit, Fit, Selenium)‏ • Maven + Continuum

  4. Why Fit? • Fit: Framework for Integrated Test • Encourage communication and transparency • ”Executable requirements” • Keep unit tests pure and fast • Fit: Ward Cunningham, Jim Shore • FitNesse: Ward Cunningham • FitLibrary: Rick Mugridge

  5. Excel / HTML / FitNesse ? • Product Managers (PMs) to maintain tests • Subversion • Maven + Continuum • Easily accessible by PMs and developers • Easy to edit & run

  6. Why We Chose Excel • PMs didn't like wiki-style of FitNesse • Thought Excel formulas & fill-down would be helpful • Everybody was comfortable with Excel • Easily versioned and organized files • Can edit directly in Eclipse

  7. Fit Refresher • Test defined in Excel file • reference fully-qualified name of fixture • must be formatted correctly • Fixture defined in Java • extend one of many provided fixtures in Fit and FitLibrary (e.g. ColumnFixture, DoFixture)‏ • translate test data/sequence into calls on underlying ”system under test” • Output in color-coded HTML + summary

  8. Challenges with Excel • Excel Dates != Java Dates • Keeping up with borders is annoying • No support for multiple sheets • Limited support for running individual files • Excel is a heavyweight editor

  9. Performance & Maintenance • Test parsing was slow, and Maven made it worse • reportIndex.html was helpful, especially with continuous integration • Fixtures were refactoring-safe, but tests would break • Entire suite of 90+ test files would take ~10 minutes to run

  10. Test Data • Full-stack integration tests would hit dev database • Tests must clean up after themselves • Define setup data inside the test • Try not to depend on existing test records

  11. Users Writing Tests? • Typical scenario: • Developer creates fixture and basic test • PM looks at test to see if it makes sense • Developer maintains test, adding scenarios as they think of new cases • Occasionally PM would add new test cases • A few times PM would define new test from scratch

  12. I'd Give My Right Arm For... • JUnit-style IDE integration • Faster test parsing • Spreadsheet runner that supported multple worksheets • Console / log output • More flexible formatting

  13. Q & A • ???

More Related