When I run the Playwright test on Azure CI pipeline.I'm get timeout issue, I increased the timeout, but I think the problem is in the webserver is not starting or can't listen to.It works locally.
Could it be due to restrictions to access the port on the Azure CI pipeline?
Error that I get
Script contents: shell npx playwright test--config = playwright.config.ts ========================== Starting Command Output =========================== "C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a_temp\dbde5bf8-d802-451d-9098-eea49ccf3940.cmd"" [WebServer] - Generating browser application bundles (phase: setup)...
Error: Timed out waiting 120000ms from config.webServer.
To open last HTML report run:
npx playwright show-report
##[error]Cmd.exe exited with code '1'. Finishing: Run Playwright Test Command Line
Here is the webserver configuration in the playwright.config.ts
export default defineConfig({ testDir: './e2e-tests', fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, reporter: 'html', use: { baseURL: 'http://localhost:4200', },
projects: \[
{
name: 'chromium',
use: { ...devices\['Desktop Chrome'\] },
},
\],
webServer: {
command: 'ng serve',
url: 'http://localhost:4200',
timeout: 2 \* 60 \* 1000,
reuseExistingServer: !process.env.CI,
},
});
This thread is trying to answer question "Could the Playwright tests not running on the Azure CI pipeline be due to restrictions to access the port?"
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].