Skip to content

JapneetSachdeva1/SeleniumFramework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skills Gained

  • Test Automation Framework Design
  • Selenium WebDriver Integration
  • TestNG Suite Management
  • Maven Dependency Management
  • HTML Report Generation
  • Page Object Model (POM) Implementation
  • Modular Code Organization
  • Configuration Management
  • Custom Wait Implementation
  • JSON Data Handling
  • Utility Class Development
  • Listener Integration in TestNG
  • Extent Reports Customization
  • Cross-Browser Testing Setup
  • Reusable Code Development
  • Debugging and Troubleshooting Test Cases
  • Scalability and Maintenance of Frameworks

Project Structure Breakdown

Root Directory: JapneetSachdeva1-SeleniumFramework/

  • This is the base folder containing all the framework components.

suites/

  • Contains TestNG XML suite files that define test execution flow.

Files:

  • allTestSuite_testNG.xml: Likely includes all test cases in the framework.
  • smoke_testNG.xml: Focuses on critical "smoke" tests to verify the basic functionality.
  • regression_testNG.xml: Contains tests that ensure changes don’t break existing functionality.

pom.xml

  • The Maven Project Object Model (POM) file. Manages dependencies, build lifecycle, and plugins for the project.
    • Examples of dependencies it may include:
      • Selenium WebDriver
      • TestNG
      • Extent Reports
      • JSON parsing libraries (e.g., Jackson or Gson)

reports/

  • Contains HTML test execution reports, generated for each test run. Organized by date:
    • 13_11_2022/ and 14_11_2022/: Subfolders with timestamped HTML reports for specific execution times.

README.md

  • A documentation file in Markdown format. Typically provides:
    • Overview of the project
    • Setup instructions
    • How to run the tests
    • Contribution guidelines

src/

  • This folder holds the main source code and test files.

napkin-selection (1)

Framework Structure

6.1. main/

  • Contains the framework's core functionality.

resources/config.properties

  • Configuration file for properties like URLs, browser types, and timeout durations.

java/

base/

  • Core classes shared across the framework:
    • SetupDriver.java: Manages WebDriver setup and teardown.
    • CustomWaits.java: Contains utility methods for custom explicit/implicit waits.
    • Commons.java: Commonly used helper functions.

pages/

  • Implements the Page Object Model (POM) design.
  • Subfolders organize pages by category:
    • products/: Classes representing product-related pages:
      • LaptopPage.java, DesktopPage.java, etc.
    • LoginPage.java, HomePage.java, RegisterPage.java, etc.: Represent specific application pages.

utils/

  • Utility/helper classes:
    • ExtentReportHelper.java: Manages Extent Report generation.
    • ListenerHelper.java: Implements TestNG listeners for logging and reporting.
    • PropertyReaderHelper.java: Reads and fetches values from config.properties.

6.2. test/

  • Holds the test cases and related configurations.

testData/

  • Stores test data files.
    • Example: ecom_login_data.json: Contains login credentials or other test data.

pageTests/

  • Test classes for each page:
    • RegisterPageTests.java, LoginPageTests.java, HomePageTests.java, etc.
  • Organized into subfolders like ProductTests/ for product-related test cases.

testConfig/

  • Contains test configurations.
    • Example: BaseTest.java: A base class for test setup and teardown (e.g., WebDriver initialization, loading config).

Key Highlights

  • TestNG and Maven: A well-organized framework leveraging TestNG for test execution and Maven for dependency management.
  • Page Object Model (POM): Follows POM design for better maintainability and readability.
  • Modular Design: Separate modules for pages, utilities, and tests enhance scalability.
  • Reporting: Includes timestamped HTML reports for test execution tracking.
  • Reusable Components: Shared code in base and utils promotes reusability and reduces redundancy.
  • Industry Standard: This framework structure aligns with industry standards for Selenium-based test automation.

napkin-selection

About

This is a test framework which uses Selenium for browser automation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published