Skip to content

A data-driven,parameterized framework implemented on a website's homepage using pytest in Selenium that asks user for browser choice before execution,populate user details for submission and ultimately display SUCCESS alert on console based on run status, along with test report and log details creation

Notifications You must be signed in to change notification settings

shinjini-1310/HOMEPAGE_FORM_FILLUP_UTILITY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HOMEPAGE_FORM_FILLUP_UTILITY

Pre-requisites: 1)Python should be installed and its path should be added to environment variable 2)Requires installation and import of certain packages : selenium,pytest,time,inspect,logging 3)A steady Internet connection 4)Knowledge of the philosophies of Page Object Mechanism(POM), Object-Oriented Programming System(OOPs), Web Testing Automation and User Friendly Customization

SUMMARY We have a requirement to automate a testcase to validate if a user details submission form in a website's front webpage works as expected. We built a data-driven, paramterized framework from scratch using pytest in Selenium, which will ask user for browser choice before execution,testcase choice from which data will be picked,populate user details, submit them and ultimately display SUCCESS alert on console. There will be separate folders for all setup and teardown utlities,testcases,logs and reports. The utility developed will leverage the philosophies of Page Object Mechanism(POM), Object-Oriented Programming System(OOPs), Web Testing Automation and User Friendly Customization and execute within minimal time, parallely updating logs and forming reports for each run, with screenshots attached in case of test failure

TECHNOLOGIES USED Backend: Python, Selenium, Pytest, HTML Frontend: Shell Scripting, Website - https://rahulshettyacademy.com/angularpractice/shop

ACHIEVEMENTS Easy Framework Setup: For this framework, we just need to install python along with selenium and pytest packages. Reduces Overall Time And Effort: Complete autonomy of frontend user to choose browser, hassle free trigger command that returns test results and validation metrics under 5 minutes Fast-paced timelines friendly: Mindful usage of Implicit Wait,time.sleep() and Explicit Wait allows testcase to execute, log and generate test summary, all within 5 minutes Automated Testcase Status Assertion: We used assertions to validate if expected success alert was displayed in the console to ensure that the testcase has passed Improved Readability: Usage of OOPs and POM philosophies imparts a Divide and Conquer quality to the utility, making each class and their functions more task (or webpage) specific and readable to the developers working with legacy code Customizable Utilization: Browser selection at runtime, ability to quickly target a specific function in a specific webpage for client requested modifications Learning Opportunity: We learnt standards of writing Selenium tests in frameworks,creating browser invocation fixtures in conftest.py,setting up base class to hold all common utilities,inheriting base class to all tests to remove fixture redundant code, passing command line options to select browser at runtime,implementing Page Object Mechanism,smarter way of returning page objects from navigation methods,creating Selenium webdriver custom utilities in base class, parameterizing webdriver tests with multiple datasets,organizing data from different datafiles and injecting into fixture at runtime ,implementing logging feature to webdriver tests,test execution's html reporting while building this automated testcase

TRIGGER COMMAND : py.test [PYTHON_FILENAME_WITH_LOCATION] -v -s --html=report.html

About

A data-driven,parameterized framework implemented on a website's homepage using pytest in Selenium that asks user for browser choice before execution,populate user details for submission and ultimately display SUCCESS alert on console based on run status, along with test report and log details creation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published