You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/kaneai-smartui-visual-testing.md
+51-15Lines changed: 51 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,20 +49,20 @@ This guide provides a detailed walkthrough on how to leverage KaneAI to create,
49
49
50
50
## Creating Your First Visual Test
51
51
52
-
### Step 1: Initiate a Web Test
53
-
To begin, navigate to the [KaneAI dashboard](https://kaneai.lambdatest.com/dashboard) and click **Create a Web Test**. You can configure network settings before clicking **Start Testing** to launch the test authoring environment.
52
+
### Initiate a Web Test
53
+
To begin, navigate to the [KaneAI dashboard](https://kaneai.lambdatest.com/dashboard) and click **Author Browser Test**. You can configure network settings before clicking **Start Testing** to launch the test authoring environment.
54
54
55
55
56
-
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/initiate-web-test.png').default} alt="Initiate a Web Test in KaneAI" className="doc_img"/>
56
+
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/initiate-web-test.jpeg').default} alt="Initiate a Web Test in KaneAI" className="doc_img"/>
57
57
58
-
### Step 2: Add a Visual Comparison Step
58
+
### Add a Visual Comparison Step
59
59
Author your test by writing steps in plain language, such as `go to lambdatest`.
60
60
61
61
To add a visual test step, type `/` in the "Write a step" editor and select **Visual Comparison** from the command menu.
A configuration modal will appear for your screenshot.
67
67
***Screenshot Name (Required):** You must provide a descriptive name for the screenshot.
68
68
***Mis-Match Threshold (Optional):** Set an acceptable percentage of difference below which changes are auto-approved. The default is 0%.
@@ -74,17 +74,17 @@ Click **Create** to add the step to your test flow.
74
74
75
75
## Analyzing Baselines and Regressions
76
76
77
-
### Step 4: Establish the Baseline
77
+
### Establish the Baseline
78
78
The first time the test is executed, it captures an initial screenshot that becomes the **Baseline** for all future comparisons. You can view this image by clicking **Show Baseline**.
When you rerun the test, a new screenshot is captured and compared against the baseline. Click **Show Comparison** to open the SmartUI view. This interface highlights any visual differences found between the two images.
82
+
### Rerun and Analyze the Comparison
83
+
When the test case is replayed or re-run during authoring, a new screenshot is captured and compared against the baseline. Click **Show Comparison** to open the SmartUI view. This interface highlights any visual differences found between the two images.
84
84
85
85
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/analyze-comparison.png').default} alt="Analyze the visual comparison between baseline and new screenshot" className="doc_img"/>
86
86
87
-
### Step 6: Approve or Reject Changes
87
+
### Approve or Reject Changes
88
88
Within the comparison view, you can review the changes and decide on a verdict.
89
89
***Reject Screenshot:** If the changes are unintended defects, you may reject the comparison.
90
90
***Approve Screenshot:** If the changes are intentional, you may accept the comparison. This will update the baseline with the new image.
@@ -95,21 +95,57 @@ You can also adjust project settings like **Compare Type** and **Mis-Match Thres
95
95
96
96
## Saving and Automating Your Visual Test
97
97
98
-
### Step 7: Save Your Test Case
98
+
### Save Your Test Case
99
99
Once your test flow is complete, click **Finish test**. You will be prompted to save the session, where you can define the **Project**, **Folder**, **Test Name**, and **Description**.
100
100
101
101
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/save-test-case.png').default} alt="Save the test case session" className="doc_img"/>
102
102
103
-
### Step 8: Schedule the Test for Automation
104
-
You can access your saved tests via the **Test Manager**. To automate execution, navigate to **Test Runs** and schedule the finalized test[cite: 225]. When creating the run, provide a name and select **KaneAI Generated** as the `Type`. You can then set a recurring schedule for execution. Scheduled runs will automatically capture screenshots and store them in the SmartUI project for continuous comparison.
103
+
### Configure Test Case
104
+
After test run creation, make sure to **"Add a Configuration"**:
105
+
***Configuration Name**
106
+
***Desktop Configuration** - Choose and configure among options:
107
+
* Operating Systems (3)
108
+
* OS Versions (6)
109
+
* Browsers (4)
110
+
* Browser Versions (from 2023 to Latest)
111
+
* Resolutions (11)
112
+
113
+
And after creating the configuration make sure to apply this configuration to the test run.
114
+
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/test-run-config.jpeg').default} alt="Save the test case session" className="doc_img"/>
115
+
116
+
### Run or Schedule the Test for Automation
117
+
You can now simply run your tests by selecting **Run on HyperExecute** and either "Run Instance Now" (for quick run) or "Schedule Test Run" (for scheduled visual regression)
118
+
119
+
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/run-test.jpeg').default} alt="Schedule the Test Run for automation" className="doc_img"/>
120
+
121
+
You may also access your saved tests via the **<ahref="https://www.lambdatest.com/support/docs/kaneai-hyperexecute-test-run-execution/"rel="nofollow">Test Manager</a>**. To automate execution, navigate to **<ahref="https://www.lambdatest.com/support/docs/kaneai-scheduled-test-runs/"rel="nofollow">Test Runs</a>** and schedule the finalized test. When creating the run, provide a name and select **KaneAI Generated** as the `Type`. You can then set a recurring schedule for execution. Scheduled runs will automatically capture screenshots and store them in the SmartUI project for continuous comparison.
105
122
106
123
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/schedule-test-run.png').default} alt="Schedule the Test Run for automation" className="doc_img"/>
107
124
108
-
## Step 9: View Your Visual Test Results on SmartUI
109
125
110
-
After the HyperExecute job is finished, all screenshots captured using the `takeScreenshot` command will be available in your SmartUI project for review.
126
+
### Using Advanced Configurations for Visual Regression
127
+
While running **Run Instances Now** user can access **Visual Regression** settings via **Advanced Configurations**
128
+
129
+
130
+
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/advanced_config.jpeg').default} alt="Schedule the Test Run for automation" className="doc_img"/>
131
+
132
+
Here users can enable **Visual Regression** settings to use the advanced configurations:
133
+
* Custom Browsers (upto 4)
134
+
* Custom Viewports (upto 5)
135
+
* Custom Devices (upto 2) with Orientation (Portrait and Landscape)
136
+
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/visual_config.jpeg').default} alt="Schedule the Test Run for automation" className="doc_img"/>
137
+
138
+
For a more flexible usage they may use the **JSON** tab where you may set your own parameters and configuration.
139
+
140
+
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/visual_configs_json.jpeg').default} alt="Schedule the Test Run for automation" className="doc_img"/>
141
+
142
+
143
+
## View Your Visual Test Results on SmartUI
144
+
145
+
After the HyperExecute job is finished, all screenshots captured using the `/Visual Comparison` command via KaneAI will be available in your SmartUI project for review.
146
+
147
+
<img loading="lazy" src={require('../assets/images/kane-ai/smartui/smartui_dashboard.jpeg').default} alt="Schedule the Test Run for automation" className="doc_img"/>
0 commit comments