Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Fitnesse - Acceptance testing


Published on

Fitnesse for simplified Acceptance testing. A couple of slides might be irrelevant, but the presentation is useful on the whole

Published in: Technology, Business

Fitnesse - Acceptance testing

  1. 1. Fitnesse -- a beginners introduction
  2. 2. Manifesto for Agile Software Development <ul><li>Individuals and interactions over processes and tools </li></ul><ul><li>Working software over comprehensive documentation </li></ul><ul><li>Customer collaboration over contract negotiation </li></ul><ul><li>Responding to change over following a plan </li></ul>
  3. 3. Acceptance Testing <ul><li>Basically black-box testing giving a high-level view of what the system can produce. Different from Unit-testing that focuses on what the application does internally </li></ul><ul><li>E.g. Blackbox testing - FIT, FitNesse (A Wiki built over the FIT framework) </li></ul><ul><li>Unit testing -- Junit, HTTPUnit etc </li></ul><ul><li>Advantages: </li></ul><ul><li>Easy for the user to describe the requirements themselves (no programming, just text). Assumption is that we are using an existing frameworks. </li></ul><ul><li>Easy for the developer to glue the requirements to the business logic </li></ul><ul><li>Tests are written before the code, so this approach supports TDD i.e Test Driven Development </li></ul><ul><li>Inexpensive because the frameworks are open source, execution of the </li></ul><ul><li>tests can be automated. </li></ul><ul><li>The developer has a clear goal to achieve! </li></ul><ul><li>Disadvantages: </li></ul><ul><li>No capture & replay possible </li></ul><ul><li>Learning curve to understand the framework. Curve steeper if we have to modify the framework </li></ul>
  4. 4. Fitnesse – What is it ? <ul><li>FitNesse is a tool for enhancing collaboration in software development. </li></ul><ul><li>FitNesse enables customers, testers, and programmers to learn what their software should do, and to automatically compare that to what it actually does do. It compares customers' expectations to actual results. </li></ul><ul><li>FitNesse is a software testing tool. </li></ul><ul><li>From another perspective, FitNesse is a lightweight, open-source framework that makes it easy for software teams to: </li></ul><ul><li>Collaboratively define AcceptanceTests -- web pages containing simple tables of inputs and expected outputs. </li></ul><ul><li>Run those tests and see the results. </li></ul><ul><li>FitNesse is a wiki. </li></ul><ul><li>You can easily create and edit pages. </li></ul><ul><li>FitNesse is a web server. </li></ul><ul><li>It requires no configuration or setup. </li></ul><ul><li>Just run it and then direct your browser to the machine where it is running. </li></ul>
  5. 5. How does it work
  6. 6. Fixture, what ?
  7. 7. Fixture code
  8. 8. Fixtures – What’s available <ul><li>ColumnFixture: maps columns in the test data to fields or methods; a new column fixture is created for each table that uses one. </li></ul><ul><li>ActionFixture: executes the command in the first column </li></ul><ul><li>start aClass: create an object of aClass to work with </li></ul><ul><li>enter aMethod anArgument: invoke the method on the object </li></ul><ul><li>press aMethod: invoke the method on the object (without parameters) </li></ul><ul><li>check aFunction aValue: invoke the (parameterless) function and compare return value with the specified value </li></ul><ul><li>RowFixture: invokes methods on the objects and </li></ul><ul><li>compares the returned values to those in the table </li></ul><ul><li>binds the columns to variables and methods by reflection. </li></ul><ul><li>Executes the functions to get the result rows which will be </li></ul><ul><li>checked. </li></ul><ul><li>matches the expected and result rows and check the matches. </li></ul><ul><li>marks missing and surplus rows </li></ul>
  9. 9. Fixtures – What’s available - contd <ul><li>TPF Fixture : Fixture developed in-house (Jake Dempsey) that can create a Sabre Session, execute commands on it and compare the responses to expected values. </li></ul><ul><li>Other available fixtures : </li></ul><ul><li>CommandLineFixture : to execute shell commands in multiple threads </li></ul><ul><li>HtmlFixture : to examine and navigate html pages </li></ul><ul><li>SummaryFixture : displays a summary of all tests on a pageTableFixture: lets you access the cells in a table by row and column </li></ul><ul><li>TimedActionFixture : (like ActionFixture) additionally with visual feedback on how long certain functions take to execute </li></ul><ul><li>JDBC Fixture :JDBC fixture makes it easy to manage tests on a test bed of databases, for example, to exercise an order processing system with sample data. </li></ul>
  10. 10. Creating and Running Test Suites … <ul><li>Steps :- </li></ul><ul><li>Creating a Test Suite. </li></ul><ul><li>Create a new Wiki and give it a name. This would be the name of your test suite. </li></ul><ul><li>Set Actions Properties for this Wiki page to “Suite” and save it. </li></ul><ul><li>Create more Wiki pages underneath the suite and name them. These would be the names for your tests. </li></ul><ul><li>Set Actions Properties for this Wiki pages to “Test” and save them. </li></ul><ul><li>Edit the test Wiki pages and put in your test code i.e test tables that access the fixtures you would have created for your projects. </li></ul><ul><li>Run your tests by clicking the test button on the panel onto the left of the page. Results page will be displayed! </li></ul>
  11. 11. The Road Ahead … <ul><li>Start with defining test cases for Host using the TPF fixture. This fixture allows you to create OFEP, NOFEP Sabre sessions, run commands on them, compare results with expected values etc. Other groups in Sabre already using this. (Can be done by a DPM) </li></ul><ul><li>A list of all commands currently allowed can be found under “Command Reference” on the Fitnesse Wiki </li></ul><ul><li>Reuse and extend current fixtures to interface and interact with the application code. (Should be done by a developer) </li></ul><ul><li>Update command reference and have a brief description on how the new fixture should be used. Samples to work from would be helpful. </li></ul><ul><li>DPMs can use the new command reference and examples to create Acceptance tests. </li></ul>
  12. 12. Developer resources <ul><li>Fitnesse home page :- </li></ul><ul><li>Eclipse plugin for Fixtures :- </li></ul><ul><li>Useful links </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li> </li></ul><ul><li>Checkout our Fitnesse URL. Lots of documentation present there </li></ul>