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 Name.
Setting a Baseline name allows you to compare and validate your application across different OS, Browsers and Viewport sizes.
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";
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).