GitHub Automation is a C# automation project for GitHub.com.
It simulates basic new-user operations such as creating a repository, creating a project, and more.
This project leverage the following main technologies:
- C#/.Net 6
- NUnit 3
- Selenium WebDriver 4 & Selenium Grid
- POM design pattern
- Extent-Reports
- Local Browsers (Chrome & Firefox)
- Remote Selenium Grid (Chrome & Firefox)
- Filtering by categories
- Parallel execution
To set up the project, follow these steps:
- Download .NET and install it.
- Open terminal and run
dotnet --info
to ensure that the installation was successful. - Clone the repository:
git clone https://github.com/ilorwork/GitHub-Automation.git
- Download and install Visual Studio.
The project's configuration is managed through the AutomationSettings.RunSetting
file,
which can be found inside the infra
project.
The configuration file includes the following parameters:
- Browser
- Allowed Values: [
"Chrome", "Firefox", "GridChrome", "GridFirefox"
]. - Default value =
"Chrome"
- Description: Specifies the desired browser for the automation.
- Allowed Values: [
- SiteUrl
- Value: [
"https://github.com"
]. - Description: The URL for your site. For this project, it is set to GitHub's site.
- Value: [
- GridUrl
- Value: [
"http://<remote_server_ip>:<port>/wd/hub"
]. - Description: The URL of your Selenium Grid.
- Value: [
- Logger
- Allowed Values: [
"LocalFile", "ExtentReports"
]. - Default value =
"ExtentReports"
- Description: The logger you want to use. Supported loggers are
LocalFile
andExtentReports
.
- Allowed Values: [
- width
- Allowed Values: [
int >= 0
]. - Default value =
0
- Description: The width of the browser window.
Specify0
or leave it unspecified for maximum size width.
- Allowed Values: [
- height
- Allowed Values: [
int >= 0
]. - Default value =
0
- Description: The height of the browser window.
Specify0
or leave it unspecified for maximum size height.
- Allowed Values: [
- To execute the tests, use the following commands via the dotnet CLI:
cd GitHubAutomation
# run all tests
dotnet test
# run tests by categories
dotnet test --filter "Category=<Category_name>"
For more information about the dotnet test
command and the --filter
option,
refer to the dotnet CLI documentation.
- Selenium WebDriver Documentation
- NUnit Documentation
- Page Object Model Pattern
- Extent Reports Documentation
Feel free to explore the provided resources to learn more about the technologies and patterns used in this project.