SlideShare a Scribd company logo
2
Most read
4
Most read
6
Most read
TestNG with Selenium
GOUSALYA RAMACHANDRAN
WHAT IS TESTNG?
 TestNG is an automation framework which allows organizing, prioritizing and
reporting the test automation scripts (Selenium cannot do this)
 TestNG allows us to execute multiple test cases simultaneously
 It also helps us separate the test case into suites.
What are the uses of TestNG
 TestNG provides several annotations to organize the test cases
 TestNG can be used to group and prioritize test cases
 Supports parameterization (multi browser testing)
 It supports data-driven testing using Data Providers.
 It can generate HTML test reports
 It supports parallel execution.
 Logs can be generated.
Installation of TestNG
 Install Eclipse IDE
 Method 1
 Go to Help > Eclipse Market place
 Search for “TestNG for Eclipse”
 Install the plugin
 Method 2
 Go to Help > Install new software
 Enter http://dl.bintray.com/testng-team/testng-eclipse-release/
 Install the plugin
 Restart Eclipse
Adding TestNG Library
 Create a Java project
 Add selenium jar from “Add External Jar” button
 Add TestNG Library using “Add Library” button
Annotations in TestNG
 BeforeSuite
 BeforeClass
 BeforeGroups
 BeforeTest
 Test
 AfterTest
 AfterGroups
 AfterClass
 AfterSuite
 Dataprovider
Sample Exercise
 Create a Java Project
 Add Selenium and TestNG
 Create a test script to validate title “Google” when navigating to
https://www.google.com
 Verify the report
 Verify the logs
 Create testng.xml file for the project

More Related Content

What's hot (20)

PPTX
Unit Testing
Sergey Podolsky
 
PPTX
TestNG Session presented in Xebia XKE
Abhishek Yadav
 
PPTX
Scripting robot
Chonlasith Jucksriporn
 
PPTX
An overview of selenium webdriver
Anuraj S.L
 
PPTX
JUNit Presentation
Animesh Kumar
 
PPTX
Introduction to Selenium Web Driver
Return on Intelligence
 
PPT
Selenium ppt
Naga Dinesh
 
PDF
Selenium Automation Testing Interview Questions And Answers
Ajit Jadhav
 
PPTX
Unit Testing And Mocking
Joe Wilson
 
PPS
JUnit Presentation
priya_trivedi
 
PPTX
Java Unit Testing
Nayanda Haberty
 
PPTX
Unit tests & TDD
Dror Helper
 
PDF
Automation Testing using Selenium
Naresh Chintalcheru
 
PPT
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
PPTX
Automation - web testing with selenium
Tzirla Rozental
 
PPT
Selenium
Kalyan ch
 
PDF
Selenium interview questions and answers
kavinilavuG
 
PPTX
Selenium TestNG
KadarkaraiSelvam
 
PPTX
Unit Testing Concepts and Best Practices
Derek Smith
 
Unit Testing
Sergey Podolsky
 
TestNG Session presented in Xebia XKE
Abhishek Yadav
 
Scripting robot
Chonlasith Jucksriporn
 
An overview of selenium webdriver
Anuraj S.L
 
JUNit Presentation
Animesh Kumar
 
Introduction to Selenium Web Driver
Return on Intelligence
 
Selenium ppt
Naga Dinesh
 
Selenium Automation Testing Interview Questions And Answers
Ajit Jadhav
 
Unit Testing And Mocking
Joe Wilson
 
JUnit Presentation
priya_trivedi
 
Java Unit Testing
Nayanda Haberty
 
Unit tests & TDD
Dror Helper
 
Automation Testing using Selenium
Naresh Chintalcheru
 
QSpiders - Automation using Selenium
Qspiders - Software Testing Training Institute
 
Automation - web testing with selenium
Tzirla Rozental
 
Selenium
Kalyan ch
 
Selenium interview questions and answers
kavinilavuG
 
Selenium TestNG
KadarkaraiSelvam
 
Unit Testing Concepts and Best Practices
Derek Smith
 

Similar to TestNG with selenium (20)

PDF
TestNG Annotations in Selenium | Edureka
Edureka!
 
PDF
Test ng for testers
Colombo Selenium Meetup
 
PPT
Selenium Java for Beginners by Sujit Pathak
Software Testing Board
 
PDF
How To Install TestNG in Eclipse Step By Step Guide.pdf
pCloudy
 
DOC
New selenium rc
girichinna27
 
PDF
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
Minh Quân Đoàn
 
PPT
Selenium training in chennai
Thecreating Experts
 
PDF
TestNg_Overview_Config
Abhishek Chakraborty
 
PPTX
Selenium Automation
Pratyush Majumdar
 
PPTX
Selenium Training | TestNG Framework For Selenium | Selenium Tutorial For Beg...
Edureka!
 
PPTX
Test NG Framework Complete Walk Through
Narendran Solai Sridharan
 
PDF
TestNG introduction
Denis Bazhin
 
PDF
Selenium StudyGroup
Marc Myers
 
PDF
Selenium with testng and eclipse ide
Testertester Jaipur
 
PDF
Executing Parallel Test Sessions with TestNG and Selenium WebDriver
pCloudy
 
DOCX
Selenium coursecontent linkedin
Selenium Training
 
PDF
Mobile Test Automation using one API and one infrastructure
Michael Palotas
 
PPTX
Step by step - Selenium 3 web-driver - From Scratch
Haitham Refaat
 
PPTX
Selenium with java
Gousalya Ramachandran
 
TestNG Annotations in Selenium | Edureka
Edureka!
 
Test ng for testers
Colombo Selenium Meetup
 
Selenium Java for Beginners by Sujit Pathak
Software Testing Board
 
How To Install TestNG in Eclipse Step By Step Guide.pdf
pCloudy
 
New selenium rc
girichinna27
 
Lesson_06_Software_and_Automation_Testing_Frameworks.pdf
Minh Quân Đoàn
 
Selenium training in chennai
Thecreating Experts
 
TestNg_Overview_Config
Abhishek Chakraborty
 
Selenium Automation
Pratyush Majumdar
 
Selenium Training | TestNG Framework For Selenium | Selenium Tutorial For Beg...
Edureka!
 
Test NG Framework Complete Walk Through
Narendran Solai Sridharan
 
TestNG introduction
Denis Bazhin
 
Selenium StudyGroup
Marc Myers
 
Selenium with testng and eclipse ide
Testertester Jaipur
 
Executing Parallel Test Sessions with TestNG and Selenium WebDriver
pCloudy
 
Selenium coursecontent linkedin
Selenium Training
 
Mobile Test Automation using one API and one infrastructure
Michael Palotas
 
Step by step - Selenium 3 web-driver - From Scratch
Haitham Refaat
 
Selenium with java
Gousalya Ramachandran
 
Ad

Recently uploaded (20)

PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PPTX
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
Hardware(Central Processing Unit ) CU and ALU
RizwanaKalsoom2
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Ad

TestNG with selenium

  • 2. WHAT IS TESTNG?  TestNG is an automation framework which allows organizing, prioritizing and reporting the test automation scripts (Selenium cannot do this)  TestNG allows us to execute multiple test cases simultaneously  It also helps us separate the test case into suites.
  • 3. What are the uses of TestNG  TestNG provides several annotations to organize the test cases  TestNG can be used to group and prioritize test cases  Supports parameterization (multi browser testing)  It supports data-driven testing using Data Providers.  It can generate HTML test reports  It supports parallel execution.  Logs can be generated.
  • 4. Installation of TestNG  Install Eclipse IDE  Method 1  Go to Help > Eclipse Market place  Search for “TestNG for Eclipse”  Install the plugin  Method 2  Go to Help > Install new software  Enter http://dl.bintray.com/testng-team/testng-eclipse-release/  Install the plugin  Restart Eclipse
  • 5. Adding TestNG Library  Create a Java project  Add selenium jar from “Add External Jar” button  Add TestNG Library using “Add Library” button
  • 6. Annotations in TestNG  BeforeSuite  BeforeClass  BeforeGroups  BeforeTest  Test  AfterTest  AfterGroups  AfterClass  AfterSuite  Dataprovider
  • 7. Sample Exercise  Create a Java Project  Add Selenium and TestNG  Create a test script to validate title “Google” when navigating to https://www.google.com  Verify the report  Verify the logs  Create testng.xml file for the project