rpx-test-kit
v0.2.2
Published
A testing toolkit for web projects, combining end-to-end testing with Cypress and visual regression testing to standardize quality assurance.
Downloads
10
Readme
RPX Test Kit
RPX Test Kit is a testing toolkit designed for web projects, combining end-to-end testing with Cypress and visual regression testing to standardize quality assurance.
Usage
Installation
To use RPX Test Kit in your project, you need to install the package via npm. Run the following command in your project directory:
npm install rpx-test-kit --save-dev
Environment Setup
To configure the environment for your specific site, you need to set the SITE_URL
which Cypress will use to run the tests. This URL should point to the environment where you want to run your tests (e.g., local, staging, or production).
Setting Up Environment Variables
For local development, you can set the SITE_URL
in a .env
file or directly in your operating system's environment variables. Here's how you can set it up in a .env
file:
SITE_URL=https://localhost:8000
Ensure your development environment loads this .env
file, or use a library like dotenv
in your project to load these variables.
Running Tests
To run tests locally or in your CI environment, you can use the scripts defined in the package. Here are the commands:
To open Cypress in interactive mode:
npm run test
To run Cypress tests headlessly:
npm run test:ci
To run visual regression tests:
npm run test:vrt