Trace: » whatswrongwithxunit » fitnesse » setfixture » additional_libraries » integrationtests » updatecommand » sequencefixture » webtest
WebTest Fixtures
2009-Nov-17: Marisa Seal and Chris McMahon are WebTest maintainers on sourceforge
2008-Mar-04: Project is now hosted on SourceForge: see http://sourceforge.net/projects/webtestfixtures/
2008-Feb-13: Release 2.0 Now available.
WebTest Fixtures are an extension to FIT/FitNesse that implement a customer-friendly language for web testing, utilising Selenium Remote Control. WebTest runs inside FitNesse, allowing you to integrate web UI tests into an automated build system, and use other FitNesse fixtures to talk to your domain model, prepare and verify database changes during Web UI tests. Both .NET and Java FitNesse runners are supported, and the library is released under GPL.
For an introduction into WebTest and best practices for how to use it, see:
Download
Version 2.0 - 20080213
- webtest-complete-20080213 Start with this package, it contains WebTest binaries, all dependencies and a Wiki web site with examples (5MB).
- webtest-source-20080213 Source code for both .NET and Java implementations, with the acceptance tests Wiki site (5MB).
- webtest-dotnet-binaries-20080213 .NET binaries only (25k).
- webtest-java-binaries-20080213 Java binaries only (25k).
- For source code access, see also http://sourceforge.net/projects/webtestfixtures/
Getting started
To get started, download the webtest-complete package, unpack it somewhere on your disk and start both Selenium Remote Control and FitNesse using startFitnesse.bat and startSeleniumRC.bat (provided in the package). You will need Java JVM 5 or later to start FitNesse and Selenium Remote Control. If you want to run the .NET version of WebTest, you will also need .NET framework 2.0 or later. By default, those batch files start FitNesse on port 8085 and Selenium Remote Control on port 4444 (you can change the port in those batch files). Once FitNesse is running, open your browser and go to http://localhost:8085/ You will see the welcome page, with links to examples for both Java and .NET versions. As far as the WebTest features and syntax are concerned, there is no difference between those two versions. Two versions are provided to give you more flexibility for integrating Web tests with other acceptance tests, and talking to your domain/database from web tests.
WebTest package contains two fixtures:
- com.neuri.webfixture.WebTest: A DoFixture instance that implements a customer-friendly domain language for web testing. See webtest_reference for a list of supported methods
- com.neuri.webfixture.PlainSeleniumTest: A SequenceFixture instance that provides a way to paste Selenium tests directly into FitNesse, and includes a few additional methods . See PlainSeleniumTest reference for a list of supported methods.
In general, if you are going to write your tests manually, use WebTest fixture. If you want to record scripts using Selenium IDE, use PlainSeleniumTest fixture. They are both intended to be used in flow mode, so they have to be started in the first table on the page. For WebTest , use this template (Replace bold values with your browser name, selenium remote console location and test web server location.):
WebTest usage template
| com.neuri.webfixture.WebTest |
| Start Browser | firefox | With Selenium Console On | localhost | At Port | 4444 | And Scripts At | http://www.google.com |
| user Opens URL | http://www.google.com |
# call test methods here
| shutdown browser |
PlainSeleniumTest usage template
For PlainSeleniumTest, use this template:
| com.neuri.webfixture.PlainSeleniumTest |
| start browser | firefox | localhost | 4444 | http://www.google.com |
| open | http://www.google.com |
# call test methods here
| shutdown browser |
It is a good practice to put the part before your test methods into a suite SetUp page, and the command to shut down the browser into the suite TearDown page.
Feedback
Please send your feedback on WebTest either by using the Discussion tab on this page, or by e-mail
