I have playwright test which I need to run in Azure function. It runs fine locally but when deployed to Azure function it fails with error below. The only reporter configured is list and it shall not write to test-results or read from there.
reporter: [['list']]
All my logging going to AppInsights, how do I overcome this issue, I really don't need any sort of persistence locally for any of playwright reporters.
{"success":false,"message":"Failed to run Playwright tests","error":"Command failed: node ./node_modules/@playwright/test/cli.js test\nError in reporter Error: EROFS: read-only file system, open '/home/site/wwwroot/test-results/.last-run.json'\n at async open (node:internal/fs/promises:641:25)\n at async Object.writeFile (node:internal/fs/promises:1215:14)\n at async LastRunReporter.onEnd (/home/site/wwwroot/node_modules/playwright/lib/runner/lastRun.js:71:5)\n at async wrapAsync (/home/site/wwwroot/node_modules/playwright/lib/reporters/multiplexer.js:89:12)\n at async Multiplexer.onEnd (/home/site/wwwroot/node_modules/playwright/lib/reporters/multiplexer.js:57:25)\n at async InternalReporter.onEnd (/home/site/wwwroot/node_modules/playwright/lib/reporters/internalReporter.js:77:12)\n at async finishTaskRun (/home/site/wwwroot/node_modules/playwright/lib/runner/tasks.js:94:26)\n at async runTasks (/home/site/wwwroot/node_modules/playwright/lib/runner/tasks.js:81:10)\n at async runAllTestsWithConfig (/home/site/wwwroot/node_modules/playwright/lib/runner/testRunner.js:379:18)\n at async runTests (/home/site/wwwroot/node_modules/playwright/lib/program.js:242:18) {\n errno: -30,\n code: 'EROFS',\n syscall: 'open',\n path: '/home/site/wwwroot/test-results/.last-run.json'\n}\n","output":"\nError: EROFS: read-only file system, rmdir '/home/site/wwwroot/test-results'\n\n\n","errors":"Error in reporter Error: EROFS: read-only file system, open '/home/site/wwwroot/test-results/.last-run.json'\n at async open (node:internal/fs/promises:641:25)\n at async Object.writeFile (node:internal/fs/promises:1215:14)\n at async LastRunReporter.onEnd (/home/site/wwwroot/node_modules/playwright/lib/runner/lastRun.js:71:5)\n at async wrapAsync (/home/site/wwwroot/node_modules/playwright/lib/reporters/multiplexer.js:89:12)\n at async Multiplexer.onEnd (/home/site/wwwroot/node_modules/playwright/lib/reporters/multiplexer.js:57:25)\n at async InternalReporter.onEnd (/home/site/wwwroot/node_modules/playwright/lib/reporters/internalReporter.js:77:12)\n at async finishTaskRun (/home/site/wwwroot/node_modules/playwright/lib/runner/tasks.js:94:26)\n at async runTasks (/home/site/wwwroot/node_modules/playwright/lib/runner/tasks.js:81:10)\n at async runAllTestsWithConfig (/home/site/wwwroot/node_modules/playwright/lib/runner/testRunner.js:379:18)\n at async runTests (/home/site/wwwroot/node_modules/playwright/lib/program.js:242:18) {\n errno: -30,\n code: 'EROFS',\n syscall: 'open',\n path: '/home/site/wwwroot/test-results/.last-run.json'\n}\n"}