Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 1.08 KB

TestWithPlaywright.md

File metadata and controls

39 lines (26 loc) · 1.08 KB

Test with Playwright

The Playwright tests are available in chapter 10 and 12.

Deploying the Application to Azure using azd

Run the load tests

  1. Change to the directory of the project Codebreaker.GamesAPI.Playwright:
cd Codebreaker.GameAPIs.Playwright
  1. Change the BaseUrl configuration to reference your Azure Container App games API (appsettings.json)
  2. Build the project dotnet build
  3. Install required browsers:
pwsh bin/Debug/net8.0/playwright.ps1 install
  1. 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
  1. 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
  1. Start the tests
dotnet test -- NUnit.NumberOfTestWorkers=50