About - Selenium

Definition

Development and Versions

Pre-requisites

Languages supported

Manual vs Automation

Choosing Selenium

Selenium - Components

Selenium IDE

Selenium RC

Selenium WebDriver

Selenium Grid

QTP

Selenium vs QTP

Selenium - IDE

Features

Install and configure

Selenium - Webdriver

About WebDriver

install and configure

First test case

Web element

Element Locators

Example of locators

Chropath

Web driver commands

Eclipse and TestNG

About Eclipse

Choose and download

About TestNG

Testng installation on eclipse

Testng Annotations

Pass Fail and Skip test cases

Run test cases in batch

testng.xml - Explanation

testng grouping

Running tests parallely

dependsOnMethods

dependsOnGroups

Prioritization

Passing parameters

Data providers

Read data from excel

Ant - XSLT reports

Testng listeners

Cross browser testing

Page Object Model



testng.xml - Explanation
 
There is another term running multiple batch suites:


In the previoous example, there is only one suite that got executed.

But in case you have more than one Suite , there is a way to execute more than one suite.

This is possible like below. Combining two or more Suites below a parent suite.

Let the parent suite be MasterSuite and it can have two or more suites under the master suite. Now right click on the master suite file and Run as TestNG Suite .

All suites under the master suite will be executed.

Suppose there are 2 suites where one suite consists of login functionality and another suite consists of payment functionality. And for both above functionalities we have two suite files like LoginFunctionality.xml and PaymentFunctionality.xml.

Now if you want to run all the tests and test classes in both functionalities

Just write the code like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="MasterSuite">
<suite-files>
<suite-file path="loginFunctionality.xml"></suite-file>
<suite-file path="paymentFunctionality.xml"></suite-file>
</suite-files>
</suite>



<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <suite name="LoginSuite">
<test thread-count="5" name="LoginTest">
<classes>
<class name="com.testngdemo.TestNGDemo1"/>
<class name="com.testngdemo.LoginFunctionality"/>
</classes>
</test>
</suite>
There are other possible tags in testng.xml file. Let's discuss one by one:

a) What is Suite tag or Suite?

Any testng execution or run is represented by Suite. Generally an xml file is called Suite. Each suite can consist of their child suites. This has been discussed already

c) What is Test tag?

d) Test tag represents one or more Test files or TestNG classes.

e) What is Class?

f) Class is representation of any java testng class file that has a @Test annotation/s inside it.

g) Parallel attribute : this takes methods/classes/test as the name itself describes, methods means parallel test methods or parallel test case. Similarly for parallel classes and tests. Parallel attribute is discussed later.

I conduct online tutions on Manual Testing, Selenium and the following. For more details contact anandaibmindia@gmail.com
Manual Testing - 1600/-           Selenium - 1600/-
           Jsp and Servlet -2000/-           Java training - 2000/-