A baseline is defined by 5 parameters as can be seen in this article:
1) Application name
2) Test name
4) Viewport Size
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:
eyes.BaselineEnvName = "BaselineName";
1) Locate the above method before the eyes.open(); method.
2) Cross environment tests should only be done with the Layout match level as different environments will have noticeable changes to the human eye which will be highlighted with other match levels.
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.