220 likes | 357 Views
FitNesse in Fifty Minutes. Chris Harbert Resonate. What is FitNesse ?. FitNesse is an open source collaboration and testing framework based on the wiki concept .
E N D
FitNessein Fifty Minutes Chris Harbert Resonate
What is FitNesse? FitNesse is an open source collaboration and testing framework based on the wiki concept. Written by Robert Martin (a.k.a “Uncle Bob”), a software consultant and prolific author who was one of the original signers of the “Agile Manifesto”.
What is FitNesse? Wiki pages are suites, tests, or static pages. Suites are organized into hierarchies. • TestSuites • TestSuites.SuiteOne • TestSuites.SuiteOne.TestOne • TestSuites.SuiteOne.TestTwo You can run at the suite level or at the test level. http://yourfitnesseurl/TestSuites.SuiteOne?suite http://yourfitnesseurl/TestSuites.SuiteOne.TestOne?test
When to use FitNesse? Collaboration You want to encourage more collaboration around requirements and testing.* * Results not typical.
When to use FitNesse? Documentation You want your tests to serve as documentation. The good kind.
When to use FitNesse? Share the love You want to provide the ability to write automated tests to a technical, but non-developer audience.
Other Fixtures • CSV File • REST API • Command Line / SSH • JIRA (e.g. to assert the ticket status) • PDF • Check Email
Creating Your First Fixture Steps • Identify a test (or create one) that needs a fixture implemented. • Select the appropriate fixture type.* • Implement the methods that fixture type expects. • Run the test. * Fixtures can actually implement multiple fixture types simultaneously. In some cases, existing classes can be used as is.
The Basic Fixture Types Source: FitNesse User Guide
Options for Running Tests • From the UI • From the Command Line • Using the web URLs • … with HTML response • … with XML response useful for integration w/ build servers, TCM systems, etc.
Additional Cool Stuff and Tips • Suite filters allow you to run any tests with a given tag. • Symbols can be used to pass data around. • Use SLIM tables, not older fixtures. • Use collapsed sections to hide setup and teardown in order to increase readability.
When NOT to use FitNesse? • You’re writing fine-grained unit tests. • Only developers will see them. • No one can write fixtures.
Caveats • Requires developers to provide appropriate fixtures (which may be re-usable by non-developers). • No parallel runs (out of the box ;) ). • Is FitNesse dead?
Resources • The website, http://fitnesse.org/ • The User Guide (included in link of install) • The repo, https://github.com/unclebob/fitnesse