The Playwright tests are available in chapter 10 and 12.
Deploying the Application to Azure using azd
- Change to the directory of the project Codebreaker.GamesAPI.Playwright:
cd Codebreaker.GameAPIs.Playwright- Change the
BaseUrlconfiguration to reference your Azure Container App games API (appsettings.json) - Build the project
dotnet build - Install required browsers:
pwsh bin/Debug/net8.0/playwright.ps1 install- Get the access token from the Playwright portal, and set the environment variable for your project:
$env:PLAYWRIGHT_SERVICE_ACCESS_TOKEN= # Paste Access Token value from previous step- In the Playwright portal, copy the command under Add region endpoint in your set up and set the following environment variable:
$env:PLAYWRIGHT_SERVICE_URL= # Paste region endpoint URL- Start the tests
dotnet test -- NUnit.NumberOfTestWorkers=50