Table of Contents
This is a project I did on an Udemy course about NUnit, Selenium WebDriver and C#.
-
Although it's based on the project seen on said course, I did some improvements on the code and some corrections on the conventions used on it.
-
It has:
-
The fundamentals of a professional project with said technologies used on companies.
-
A POP (Page Object Pattern) structure set of tests
-
A configuration file which eases the process of setting up and configuring the project
-
Parallelized tests
-
The structure of the folders is the following:
- Start: The beggining of this project. It has the fundamental things you need to know on how to make a basic test.
- Frames: A test on how to switch between HTML iframes.
- Selectors: A test of various selectors used on tests.
- PageObjectPattern: A test suite of a basic fruit e-commerce. Said test suite is based on various excercises used on some company exams, using models, helpers, factories, etc.
- Visual Studio
- .NET desktop development workload
-
Clone the repo
git clone https://github.com/EmRodDev/testautomation-tests-nunit
-
Open the project in Visual Studio
-
Build the solution
There is an appsettings.json configuration file inside the root folder of the project. This file only affects the tests inside the PageObjectPattern folder or the FreshMarketTest visible on the Test Explorer.
Said file comes with some parameters you can change to your liking, which are the following:
-
Browser: The browser used on the tests. The supported options here are Chrome, Edge or Firefox. Any other option will throw an error.
-
WaitTimeout: The time in seconds of the driver trying to find an element with a selector before it fails the test.
-
Headless: A boolean parameter which indicates the driver to execute in headless mode or not.