Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 4 Next »

Introduction

The Selenium test environment will be set up independent from the project that is being tested and it will have its own GIT repository. The testing framework used is TestNG, and the Selenium tests will be built with Maven (ran with Maven SureFire). The properties file will be generated with Maven AntRun.

Selenium Documentation

Selenium JavaDocs

TestNG Documentation

TestNG JavaDocs

 

Setting Up Maven Dependencies and Plugins

Sample pom.xml for Maven: pom.xml

Selenium

TestNG

Maven SureFire

Maven AntRun

 

Framework Structure

  • Each page in the website will be contained within its own package.
  • Tests for each page can be separated into separate classes for better organization/structure. For example, if a page contains multiple views or different tabs within the page.
  • In TestNG, test classes are ran in alphabetical order. (The unit tests within each class are ran in alphabetical order as well.)
  • Architecture Example:

 

Setting Up The TestNG Test Suite

TestNG is invoked using a testng.xml file. See TestNG Documentation (testng.xml).

Sample testng.xml file: testng.xml

Note: Tests within a TestNG suite are made up of classes. Classes within a test are executed in alphabetical order while tests are executed in the order listed in the testng.xml file. 

 

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.