Testing
Magewire's test coverage is currently limited, focusing primarily on Playwright tests. We plan to expand testing in the future to include unit tests and other test types as needed.
Playwright
Playwright is an open-source automation library developed by Microsoft for testing and automating web applications. It enables developers to write reliable end-to-end tests by simulating user interactions across multiple browsers, including Chromium, Firefox, and WebKit. Playwright supports various programming languages like JavaScript, TypeScript, Python, and C#, and provides features such as auto-waiting, network interception, and mobile emulation. It is widely used for ensuring web application functionality and performance.
Requirements
Before we start, make sure you have the following installed:
- Magewire 3.0.0 or later
- Magento version 2.4.4 or later
Installation
-
CD into the Playwright test folder
-
Install all dev-dependencies
-
Create a
.env
config file in the rootPlaywright
folder using the following variables:Set theBASE_URL=https://local.test/ ENVIRONMENT=local ACCOUNT_FIRSTNAME=Veronica ACCOUNT_LASTNAME=Costello ACCOUNT_EMAIL=roni_cost@example.com ACCOUNT_PASSWORD=roni_cost3@example.com
BASE_URL
value with thebase-url
of your Magento instance. -
Run tests
-
Run tests manually (optional)