Section 8.2. Getting Started


8.2. Getting Started

A programmer will need to set up FitNesse and show you how to run it, as discussed in Chapter 27. It may well be useful to go over the following process with the programmers.

When you run your browser to connect to FitNesse, it shows the FrontPage. (You may need to log in first.) If that page has not been changed too much from the initial install, you will see several links to various pages in a Table of Contents table.

If you click the link FitNesse.UserGuide, you will see a new page for the FitNesse user guide. That page has a table of contents, with links to further pages. For example, the link WikiInstructions goes to a section of the guide that includes details of the markup language for bold text, headers, and so on. The manual is easy to follow, so we're going to focus now on what you need to do to start creating tables and running Fit tests.

Go back to the FrontPage, using the Back button on the browser or by clicking the FitNesse icon in the upper left of the page. Note the links at the top left of the page: Edit, Properties, Versions, and Search. Click Edit, and the unformatted text of the page is shown in an edit box. Add a wiki wordsee the Note on page 60such as TestMyTable, at the bottom of the edit page, as shown in Figure 8.1.

Figure 8.1. Editing a Page to Add a Wiki Word


Ignore the other text on the page, but don't alter it; the markup used there is explained in the FitNesse user guide, which you may like to look at later. Click the Save button at the bottom of the page; you may need to scroll down to see it.

You should see the FrontPage afresh, but with your wiki word displayed with a following question mark (?)for example, "TestMyTable?". If not, you've used the name of a page that already exists or is not a wiki word. So change it to something else by clicking Edit again, altering your wiki word, and clicking the Save button.

Click the ? of your wiki word, and you'll be taken to a new page for TestMyTable, ready for editing. Type in the followinga ColumnFixture tablewith no leading spaces, and make sure that at least one blank line follows:

                |eg.Division|                |numerator|denominator|quotient?|                |6|2|3| 

FitNesse allows ? as an alternative to () in the calculated columns of a ColumnFixture table. Click the Save button at the bottom of the page, as before. Your new page is saved and displayed, as shown in Figure 8.2. Note that there is now a Test link at the top left of the page, below the image of the dial. If it's not there, see the Tips on page 59.

Figure 8.2. TestMyTable


Click the Test link. A new page is displayed, showing the Fit report that results, as shown in Figure 8.3.

Figure 8.3. TestMyTable Report


You may like to now edit your page and add extra rows to the table or experiment with adding text and markup to your pages. You will probably find it handy to see the user guide while you're editing pages. So start another browser window at the URL http://localhost and click FitNesse.UserGuide.

Note

A wiki is a Web-based system that is accessed through a Web browser. Ward Cunningham's idea was to have a Web place where people could share information. For example, you may like to see the original wiki at http://c2.com/cgi/wiki.

Each page of wiki has a title and contains text, images, and links, like an ordinary Web page. Unlike the usual Web page, however, a user can click an edit button and change the contents of that page. Some wiki systems limit who can make changes, based on their login.

Any word in the text of a page that has a starting and an embedded uppercase letter is a wiki word: for example, FrontPage, FitNesse, and WorldWideWiki. When a wiki page is displayed with formattingis not being editeda wiki word is shown in one of two forms. If a page with that name exists, the name is shown as a link: underlined. If there is no page with that name, the name is displayed with a ? after the name, where the ? is a link to create and edit a new page with that name. This makes it trivial to make a new page; simply use the name in another page and click through to it.

Simple markup is used for formatting headings, lists, and so on. This markup is less sophisticated than HTML because the main aim is to encourage people to share information, not to have pretty pages.


Tips

If your page name doesn't start with "Test," the Test link won't be visible. You can still test it, but you need to first click Properties, tick the Test box at the top, and click the Save button.

If you use a wiki word such as ActionFixture, inside your table, it will be shown with a ? character. To avoid this, place a ! just before the table. However, if you wish to format values in table cells, write it as !-ActionFixture-! so that it's not treated as a wiki word.




    Fit for Developing Software. Framework for Integrated Tests
    Fit for Developing Software: Framework for Integrated Tests
    ISBN: 0321269349
    EAN: 2147483647
    Year: 2005
    Pages: 331

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net