TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • TestNG
  • Tools
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

Selenium

Sample Selenium Framework with TestNG

Introduction

Selenium Automation framework design requires a well-defined approach. Based on short-term goals as well as long term goals kept in mind, in order to reap the maximum benefits of automation.

Any automation framework benefit is its ability to increase the test coverage, increase the efficiency of test resources, increase the quality and reliability of the software application under test (AUT), and maintainability of automation code.

 

Sample_Selenium_Framework

 

An effective web application automation using Selenium is with the Page Object Model. Page objects offer minimum changes to the test scripts when the application under test code changes.

What is a Page Object?

A page object wraps an HTML application page, with an automation-specific API ( application programming interface ), allowing you to manipulate page elements without the knowledge of the test application HTML code. To learn more about Page objects see below links:

Page Objects

TestNG Framework.

TestNG is a test framework usually for large scale end-to-end testing needs.
It uses Java and test methods are written using @Test annotation. ( TestNG Framework Tutorial )

Automation Process

Most companies adopt  Agile testing techniques to achieve test automation. Most of the input for automation tests comes from user stories. Automation Engineers work closely with the Manual QA and Development teams to derive automation scenarios and automation testing scope.

What needs to be automated?

Plan to automate repeated tests and replaced important tests that are difficult to execute manually.  We might ask these questions about what needs to be automated.

  • Is the scenario repeatable?
  • Does it need manual intervention?
  • Are test Data available?
  • Is the test a candidate for the Regression test?
  • Is the expected result clear for the Test scenario?

Sample automation code flow

 

AutomationCodeFlow

 

We can divide the effort into two main parts with regard to Selenium Automation Framework.

1.Framework development

2.Test Scripts Authoring using the framework.

Framework development effort involves the development of Page Objects, common functions, Test configuration, handling test data, logging utility, reporting utility, and any functionality which is common to entire scripts.

Test scripts are developed based on test scenarios provided and identified by the Manual team.

Automation Tools generally required for our sample automation framework:

Automation Code RepositoryPerforce or GitHub or SVN
FrameworkTestNG Framework
ToolsEclipse IDE or IntelliJ IDE, Selenium WebDriver, TestNG API, Surefire Maven Plugin, Log4J, JXL( Excel Java API ), Jackson mapper, SnakeYAML, etc
LanguageJava 1.8
Build Tool
Maven, Gradle Tool.
Continuous IntegrationJenkins, CircleCI, etc.

Tools

https://www.testingdocs.com/downloading-and-extracting-eclipse-ide/

https://www.testingdocs.com/testng-framework-basics/

https://www.testingdocs.com/getting-started-with-git-version-control/

https://www.testingdocs.com/getting-started-with-jenkins/

https://www.testingdocs.com/what-is-maven/

You can find the Sample Framework shown below in the picture with major components of our sample selenium automation framework using TestNG. The figure illustrates the tasks involved from the collection of automation scenarios to the end of report generation.

Sample Automation framework

A sample automation framework with major components.

 

Sample_TestNG_Selenium_framework

 

 

 

See also:

https://www.testingdocs.com/selenium-4-project-setup-guide/

For more information, please visit Selenium official website:

https://www.selenium.dev/

Related Posts

Windows 10 Settings

Selenium /

Add Microsoft Webdriver on Windows OS

Download Selenium Components

Selenium /

Getting Started with Selenium Webdriver

LambdaTest Testing Cloud SaaS Platform

Selenium /

LambdaTest – Testing Cloud SaaS Platform

Selenium /

Selenium 3.0 and Mozilla GeckoDriver

SauceLabs Website

Selenium /

Run an Example Test on SauceLabs

‹ window .maximize() , .close() and .quit()› Learning Selenium PageFactory

Recent Posts

  • Antivirus Products for Windows 11 PC
  • Install CodeBlocks IDE on Windows 11
  • Location Privacy Settings on Windows
  • Windows 11 Virus & Threat Protection
  • Download & Install Python on Windows 11
  • Cumulative Update for Windows 11 Version
  • Test execution speed in Selenium IDE
  • Check Windows 11 Free Upgrade
  • Download IntelliJ IDE on Windows 11
  • New MySQL Connection in Workbench

Back to Top

Automation Tutorials

  • JBehave Tutorial
  • Selenium Tutorial
  • TestNG Tutorial
  • JUnit Tutorial

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version