Test Case Insights
Analyzing the test case level insights of your test automation execution on LambdaTest is now easier than ever with the Test Case Insights
module. The user can easily find information about the count, and type of the test cases through the highly customizable widgets.
Prerequisites For Insights:
- You should have an active LambdaTest account.
- You should han active subscription plan with HyperExecute or App Automation.
- You should have executed at least one test on the LambdaTest HyperExecute / App Automation platform.
How To Access Test Case Insights?
- Go to the
Insights
tab on the left navigation bar and click on theCreate New
. - Select the
Custom Dashboard
option from the menu. - Now, search for
Test Case
widgets in theApp Automation & HyperExecute
products. - Add the widgets to the dashboard by clicking on the
Add Widget
button.
Capture Test Case Insights for App Automation
Capture by WebHook
You can use LambdaHooks to start and end a test case within a single Appium session.
Test Case Start
To start a test case, use the lambda-testCase-start
hook:
// To start a test case
((JavascriptExecutor) driver).executeScript("lambda-testCase-start=find Name");
Test Case End
To end a test case, use the lambda-testCase-end
hook:
// To end a test case
((JavascriptExecutor) driver).executeScript("lambda-testCase-end=find Name");
To know more about the hooks and how to use them, you can refer to the LambdaHooks for Appium documentation.
Capture Test Case Insights for HyperExecute
Capture by WebHook
You can capture the test case insights by using the WebHook. You need to add the following WebHook
in your test script.
// For Stage of test case `START`
driver.executeScript(`lambda-testCase-start=${Name of the test case}`)
// For Stage of test case `END`
driver.executeScript(`lambda-testCase-end=${Name of test case}`)
Capture by NPM Package for WebdriverIO
You can capture the test case insights by using the NPM Package. You need to add the following NPM Package
in your test script. Here is the link to the NPM package: wdio-lambdatest-test-case-analytics-service
npm i wdio-lambdatest-test-case-analytics-service
Now, once the package has been installed, you need to add the following code in your wdio.conf.js
file.
exports.config = {
// ...
services: [
['lambdatest-test-case-analytics', {}], // Add the service
// ... other services
],
// ...
};
Once, you have completed the configuration and start executing your tests on the HyperExecute
platform, you will be able to see the test case insights on the Test Case Insights
module.
Test Case Insights Widgets
Test Case Health Snapshot
You can analyze the health of your test cases by using the Test Case Health Snapshot
widget. The widget will display the total number of test cases success, failed. The widget will be displayed in card view and you can also view the details of the test cases by clicking on the View Details
button.
Test Case Group View
You can analyze the test cases by their group by using the Test Case Group View
widget. The widget will display the total number of test cases in each group. The widget will be displayed in card view and you can also view the details of the test cases by clicking on the View Details
button.
Test Case Use Cases
The user can use the Test Case Insights
module to analyze the test case level insights of their test automation execution on LambdaTest. The user can use the module to analyze the following use cases:
- Analyze the test case level insights of your test automation execution on LambdaTest.
- Check the health of your test cases.
- Detect the test cases that are failing frequently.
- Drill down to the test cases for faster debugging.