This is a automation architecture for C# language.
-
Cloning the repository:
git clone https://github.com/TestautoDev/SeleniumCSharpFramework.git
/Framework:
Base/ # Super classes for Elements, Pages and Tests.
BaseElement.cs
BasePage.cs
BaseTest.cs
Driver/ # Used to manage drivers.
Chrome.cs
Firefox.cs
Helper/ # Used to keep useful methods for common Selenium operations
DatabaseFactory.cs
DriverFactory.cs
General.cs
WaitUntil.cs
/Test.UI.[System Name]: # Project that references the system is being automated.
Page/ # Folder where classes that implement pages mapping according to PageObjects.
[PageName]Page.cs
[PageName]Page.cs
[PageName]Page.cs
Test/ # Folder where test cases are kept.
[TestName]Test.cs
[TestName]Test.cs
[TestName]Test.cs
app.config # File where all variables needed to run the tests are kept.
AssemblyInfo.cs # File where the level of parallelism is set.
-
Local Execution
Set
False
at<add key="Remote" value=" [here] " />
in app.config file. -
Remote Execution
Set
True
at<add key="Remote" value=" [here] " />
in app.config file and make sure the Selenium Server is up and running at URL set at<add key="SeleniumServerURL" value="http://localhost:4444/wd/hub"/>
. -
Parallel Execution
Set
[assembly: LevelOfParallelism( [here] )]" />
the number of parallel executions in AssemblyInfo.cs file.
cd path/to/selenium_csharp_tests
docker-compose up -d --scale chrome=3