Sunday, March 13, 2011

Using FITNesse and Selenium for acceptance testing, example 1

I have alredy written that Fitnesse+SLIM+Selenium is a pretty powerfull tandem to be used for testing web applications. Also I have a blog post about Selenium 2/WebDriver that is much better for testing web applications than first Selenium. In this and upcoming posts I gonna to share my experience of testing complex use cases in my web application using Fitnesse and WebDriver.

For example, there is a list of the SharePoint Sites. You can use checkboxes and a toolbar to select and execute a set of actions for them. Let's do Copy List: select a site and click the Copy List button. It will araise the Select Lists dialog box.
Here you have to select lists what you want to copy and press the Next button. In the next dialog box it's necessary to select target site. Actually a list of these site can be very long. But there is a search here that allows you to narrow a scope: type a name of site that you want to target and press the Search button. Now find the site in the search result and press copy.
Now wait for operation to be completed.
Actually the scenario forks here. It can be completed successfully or not.
If operation is failed, you will see an error description and can click to the SharePoint log files link to see more details.
Here the fitnesse test that checks this scenario.
And here it's code

As you can see the working element here is the Browser python class

No comments:

Post a Comment