In WordPress, we continuously update our plugin. As a Junior Software Test Engineer, I have to test various aspects, one of which is checking for any fatal errors in the plugin. To streamline this process, I wrote a small automation test script using Playwright. This script navigates through every page and checks for any PHP/fatal error messages. It saves me a lot of time because we have numerous pages to check, and we need to test across different PHP versions. Since this is a long-term process, automating it with a script was essential.
git clone [email protected]:nahidthenh/wp-fatal-checker.git
npm install -f
npx playwright test
npx playwright test tests/essential_addons.spec.js
npx playwright test tests/essential_addons.spec.js --project chromium
npx playwright test tests/essential_addons.spec.js --project chromium --headed