A baseline is defined by 5 parameters as can be seen in this article:
1) Application name
2) Test name
3) OS
4) Viewport Size
5) Browser
The first two are the test parameters, and parameters 3-5 are the environment parameters.
When running a test, Applitools Eyes checks if there is an existing baseline. If there is, then it compares the test to it, and if not it creates one.
A baseline is always saved within its environment (combination of OS, Viewport Size and Browser).
There is an option to compare tests across environments - for that you set a Baseline Environment Name.
Setting a Baseline Environment name allows you to compare and validate your application across different OS, Browsers and Viewport sizes.
A Baseline Environment name can only be associated with one environment, you can see all the environments that you ran tests against and their associated names under the environment view.
In order to run test across environments, we will need to define a Baseline Name, that will link between the different environments, using the following syntax:
Java
eyes.setBaselineEnvName("BaselineName");
Python
eyes.baseline_name="BaselineName"
Ruby
eyes.baseline_name='BaselineName'
JavaScript - Selenium Web Driver
eyes.setBaselineEnvName("BaselineName");
eyes.BaselineEnvName = "BaselineName";
Note: Locate the above method before the eyes.open(); method.
When running a test for the first time with a given Baseline Name, the Baseline Name "points" to the environment of that test, and any future tests that will run with this Baseline Name will be compared to the corresponding test within the environment to which the Baseline Name is "pointing" to.
Accept / Reject
Accepting / rejecting and saving in cross environment test changes the Status (passed / failed) of the current test results but it is NOT changing the baseline of the environment to which the Baseline Name is pointing to or the baseline of the checkpoint (if such exist).