@syngrisi/syngrisi
v2.5.1
Published
Syngrisi - Visual Testing Tool
Downloads
5,319
Maintainers
Readme
Syngrisi: Visual Testing Tool
Syngrisi is designed to facilitate automated visual regression testing. It seamlessly integrates with both new and existing test automation kits, providing an API for automated solutions and a user-friendly UI for reviewing and managing visual test data.
Try with a Single-Click
To quickly preview the project without setting it up locally, click the 'Open in Gitpod' button. Gitpod will automatically set up an environment, install the Syngrisi Cucumber Boilerplate Project, and launch the Syngrisi instance for you.
System Prerequisites
There are two modes in which Syngrisi can be run:
- Native Mode: Utilize Node.js to run Syngrisi directly on your operating system for local execution.
- Container Mode: Utilizing Docker and Docker Compose, this mode is more apt for production environments.
Native Mode
- NodeJS
v22.19.0or above. - MongoDB Community Edition
8.0or above (7.0 is also supported)
Container Mode
Quick Start
[!TIP] If you want to try Syngrisi for the first time, you can use boilerplate projects; they are installed easily and quickly and allow you to evaluate the basic capabilities of the tool.
Native Mode Installation
To install Syngrisi in the current folder:
npm init sy@latestTo install to a specific folder:
npm init sy@latest <path_to_syngrisi>For more details on setup customization, refer to the create-sy package documentation.
[!IMPORTANT] Ensure that MongoDB is running before starting Syngrisi in native mode.
To run the server, execute:
npx syContainer Mode Installation
In addition to running the application natively, it can also be launched in a Docker container using a Docker Compose file. To download and execute Docker and Docker Compose files for Syngrisi, follow these steps:
# Check if docker-compose is installed
command -v docker compose >/dev/null 2>&1 || { echo >&2 "docker-compose is required; please install it and run this command again."; exit 1; }
# Create the project folder
mkdir my_new_syngrisi_project && cd my_new_syngrisi_project
# Download Docker and Docker Compose files
curl -LO https://raw.githubusercontent.com/syngrisi/syngrisi/main/packages/syngrisi/syngrisi-app.dockerfile
curl -LO https://raw.githubusercontent.com/syngrisi/syngrisi/main/packages/syngrisi/docker-compose.yml
# Create and start services
sudo docker compose up[!NOTE] By default Docker pulls the
latestnpm tag of@syngrisi/syngrisi. To pin a specific release, setSYNGRISI_NPM_TAG, e.g.SYNGRISI_NPM_TAG=2.3.0 docker compose up.
You are free to modify the Docker Compose file according to your requirements. Ensure that service definitions and options are set up correctly; otherwise, services may not function as expected.
Environment variables for Docker Compose can be configured either in an environment file or directly in the shell. For detailed configuration instructions, please refer to the Syngrisi documentation.
sudo docker compose upSyngrisi Boilerplates
To quickly take a look at Syngrisi or start a new automation test project, you can use one of the boilerplates:
- Syngrisi Cucumber Boilerplate project: the project contains all the necessary steps for functional tests + steps for visual checks.
- Syngrisi Playwright Boilerplate: Starter project for functional Playwright tests with the ability to do visual checks based on Syngrisi
Configuration via Environment Variables
Customize Syngrisi's behavior effortlessly using environment variables, without any need to modify the codebase. The System Environment variables have priority more than correspondent Syngrisi Admin Settings if they exist. For example, to set the log level to debug, use the following command:
Windows:set SYNGRISI_LOG_LEVEL=debug
macOS/Linux: export SYNGRISI_LOG_LEVEL=debug
You can also include the variables in your .env or modify variables in docker-compose.yml file before start Syngrisi
service.
More details on environment variables are available in the docs/environment_variables.md file.
API documentation
To view the OpenAPI documentation, use Swagger. The documentation is available at:
Swagger UI: http://your-domain/swagger/
Swagger JSON: http://your-domain/swagger/json
Devices list
Syngrisi includes a list of recognized devices, sourced from BrowserStack.
The application sets the platform icon based on this list. Do not edit this file directly. If you wish to add your own devices, simply create an additional file named custom_devices.json; the data from this file will be appended to the main list.
Development
[!NOTE] Before setting up your project, make sure MongoDB is installed.
Clone the repository and go to the Syngrisi package folder.
git clone [email protected]:syngrisi/syngrisi.git cd syngrisi/packages/syngrisi/Install dependensies
npm run install:allBuild the project
npm run buildCopy
.env.templateto.envand set your own variables if neededcp .env.template .envStart the application
npm startOr use development mode (builds UI once, watches server, auth disabled)
npm run dev
License
Syngrisi is available under the MIT License. For more details, refer to the LICENSE file.
