Book Image

Testing with F#

By : Mikael Lundin
Book Image

Testing with F#

By: Mikael Lundin

Overview of this book

Table of Contents (17 chapters)
Testing with F#
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Web-browser-based testing


When working with web-based interfaces, the best way to execute functional testing is to query the website and assert on the result HTML. There are some tools and methods to go about doing this, and we will now take a look at a few of them.

Before starting, it is worth discussing where this testing will take place. Before you can use a web client to functionally test a website, you need to deploy this website somewhere. You also need to set up the website with a predictable state so the test doesn't fail because an editor has moved around some content.

How to set up a web-based application is very targeted to the application. Often, you will base a new website on Content Management System (CMS), and this system has its own methods to set up a particular state. Sometimes, however, it is enough to roll back a database backup before the test suite runs, and at other times, you need to create a remote procedure that will set up the necessary state for you. At any rate...