Selenium simple web framework using page object model for basic websites having say atleast five to ten pages. Please don't forget to hit the donate button below and make a kind donation if you or your organisation is benefitting from this work. You can also please star the project to keep the project active.
Selenium automated tests framework for a sample app. This repo can be used as a startup for writing C# api tests.
- Data file can host the data needed for the tests using nunit data driven framework. The website URL can be added here as well.
- Constants file consists of the constants like the server name, protocol, api keys and other constants.
- Pages folder consists of page objects for each page. Each page object needs to be initialized when using objects on that page.
- Tests folder consists of nunit test cases for a test flow like navigating each page on a website.
- Models folder consists of models for responses which can be generated on jsontocsharp
- Parallel/ multi thread test execution possible using nunit for faster test runs. Set LevelOfParallelism to say ideally 4 and play with parallel scope in NUnitSettings file.
- The Tests folder have samples for integration tests. The Pages folder consists one page class file for each page.
Please note the sample website used in this code has no relation to this repository and is an independent site. It is advised to update the website and the code(Pages and Tests) to match the website that you are trying to automate.
Git clone the repo and open the solution file on your VS. I am not sure about other IDEs.
- Installation process - Cloning the repo and opening the solution in MS Visual Studio 2021 using .NET 6.0 should be good enough. The below Nuget packages get installed as well when the solution is opened in VSTS and is documented only for showing the dependencies here.
- Software dependencies - trying almost 0 (none) but NUnit, Selenium.Webdriver, Selenium.Support, , Selenium.Webdriver.ChromeDriver
- Latest releases - main branch
In VS Tests--> Test Explorer shows the tests and can used to run or debug the tests.
Different testers like to organize tests differently like having say Signup or Login parts as independent methods or functions. It is possible to achieving another layer above Tests to achieve this to obey the DRY principles.
Please feel free to donate as this work is made possible with donations like yours. It involves years of efforts with money, time and efforts spent to obtain the college degree and experience gained to write quality software. Not to worry if the business says FashionJewelry as it is a common business. PM for customizations and implementations.
Most of all. Enjoy Coding 👍