Book Image

Selenium 1.0 Testing Tools: Beginner's Guide

By : David Burns
Book Image

Selenium 1.0 Testing Tools: Beginner's Guide

By: David Burns

Overview of this book

<p>Selenium is a suite of tools to automate web application testing across many platforms. A strong understanding of using Selenium will get you developing tests to ensure the quality of your applications.</p> <p>This book helps you understand and use Selenium to create tests and make sure that what your user expects to do can be done. It will guide you to successfully implement Selenium tests to ensure the quality of your applications.</p> <p>The Selenium Testing Tools Beginner’s guide shows developers and testers how to create automated tests using a browser. You'll be able to create tests using Selenium IDE, Selenium Remote Control and Selenium 2 as well. A chapter is completely dedicated to Selenium 2. We will then see how our tests use element locators such as css, xpath, DOM to find elements on the page.</p> <p>Once all the tests have been created we will have a look at how we can speed up the execution of our tests using Selenium Grid.</p>
Table of Contents (18 chapters)
Selenium 1.0 Testing Tools Beginner's Guide
Credits
About the Author
About the Reviewers
Preface
Index

Time for action – starting to create the test suite


TestNG requires that we have an XML configuration file that it can look at before the tests begin. This means that we can control how our tests are run when we need to run them.

  1. Create a new XML file in a text editor and call it testng.xml.

  2. Add the following to it:

    <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
    <suite name="Parallel Tests" verbose="1">
    </suite>

What just happened?

We have just created our first part of TestNG file. This creates our test suite and will give us the scaffolding that is required to make our tests run in parallel later. Now that we have this in place we need to set parameters in the file that will be used to drive the tests.

Parameters in the configuration file

Now that we have created a configuration file, we need to give it some parameters that our tests can then use to start up the browser. These parameters are nodes within the <test> node that we are going to be adding to our...