Welcome to the Playwright + NUnit + Azure DevOps project. This README will guide you through setting up your development environment and getting started with our testing suite.
- Visual Studio Code: Download and install from here.
- Git: Download and install from here.
- .NET SDK: Download and install from here.
- DevOps Server: Github or Azure DevOps Server (TFS) account.
- Java: Download and install from here.
- Node.js: Download and install from here.
- Allure Commandline: Download and install from here.
- Allure requires
Java 8
or higher - Allure requires
Node.js 10
or higher - Install with
npm install -g allure-commandline --save-dev
- Allure requires
-
Pick a Directory: Choose a directory to clone the repository to. For example,
C:\LocalRepo\DotNetE2EStarterKit\
. -
Clone the Repository: Open a terminal and type
git clone https://github.com/nullptrerror/DotNetE2EStarterKit.git C:\LocalRepo\DotNetE2EStarterKit\
. -
Cd to Repository: Change directory to the repository with
cd C:\LocalRepo\DotNetE2EStarterKit\
. -
Restore NuGet Packages: Run
dotnet restore
to restore the NuGet packages. -
Cd to NUnit_E2E: Change directory to the NUnit_E2E project with
cd C:\LocalRepo\DotNetE2EStarterKit\NUnit_E2E
. -
Tool Update Powershell: Run
dotnet tool update --global PowerShell
to update the PowerShell tool. -
Install Required Browsers: Run
pwsh NUnit_E2E/bin/Debug/net6.0/playwright.ps1 install
-
Build the Project: Run
dotnet build
to compile the project.
-
Generate Code: Run
pwsh NUnit_E2E/bin/Debug/net6.0/playwright.ps1 codegen
to generate the code. -
If the pwsh command does not work: Run
dotnet tool update --global PowerShell
to update the PowerShell tool.
- Test the Project: Run
dotnet test
to run the tests.
-
Generate Allure Results: Run
allure generate .\NUnit_E2E\bin\Debug\net6.0\allure-results\ -o .\NUnit_E2E\bin\Debug\net6.0\allure-report\
to generate the Allure results. -
Open Allure Results: Run
allure open .\NUnit_E2E\bin\Debug\net6.0\allure-report\ -p 61494
to open the Allure results in your browser at http://localhost:61494/index.html.
-
Create a Branch: Before making any changes, create a new branch. Use the format
feature/{feature-name}
orbugfix/{bug-name}
. -
Make Changes: Make your changes, ensuring you follow the coding standards and best practices.
-
Commit and Push: Commit your changes and push your branch to the Azure DevOps Server repository.
-
Create a Pull Request: Go to the Azure DevOps Server web portal and create a Pull Request for your branch.
-
Review and Merge: After a successful review, your changes will be merged into the main branch.
- Selenium Documentation
- NUnit Documentation
- Azure DevOps Server Documentation
- Dotnet Allure Csharp
- Npm Allure Commandline
- Java Allure reference guide
If you have any questions or need assistance, please reach out to the team lead or any team member.