diff --git a/assets/images/kane-ai/app-test/create-app-test.gif b/assets/images/kane-ai/app-test/create-app-test.gif new file mode 100644 index 000000000..3189d7ef9 Binary files /dev/null and b/assets/images/kane-ai/app-test/create-app-test.gif differ diff --git a/assets/images/kane-ai/app-test/execute-test.gif b/assets/images/kane-ai/app-test/execute-test.gif new file mode 100644 index 000000000..72853c037 Binary files /dev/null and b/assets/images/kane-ai/app-test/execute-test.gif differ diff --git a/assets/images/kane-ai/app-test/save-test-cases.png b/assets/images/kane-ai/app-test/save-test-cases.png new file mode 100644 index 000000000..4a93dcf84 Binary files /dev/null and b/assets/images/kane-ai/app-test/save-test-cases.png differ diff --git a/assets/images/kane-ai/app-test/write-test-case.png b/assets/images/kane-ai/app-test/write-test-case.png new file mode 100644 index 000000000..673e55c53 Binary files /dev/null and b/assets/images/kane-ai/app-test/write-test-case.png differ diff --git a/assets/images/kane-ai/kane-ai-js-execution.mp4 b/assets/images/kane-ai/kane-ai-js-execution.mp4 new file mode 100644 index 000000000..284e9dc42 Binary files /dev/null and b/assets/images/kane-ai/kane-ai-js-execution.mp4 differ diff --git a/docs/hyperexecute-multi-webdriver-support.md b/docs/hyperexecute-multi-webdriver-support.md deleted file mode 100644 index 0ed38e4d8..000000000 --- a/docs/hyperexecute-multi-webdriver-support.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -id: hyperexecute-multi-webdriver-support -title: Multi WebDriver-Based Parallel Execution -hide_title: false -sidebar_label: Multi WebDriver-Based Parallel Execution -description: Multi WebDriver-Based Parallel Execution -keywords: - - LambdaTest HyperExecute - - HyperExecute Integration - - Azure Test Plan - - Katalon - - Provar - - Tosca - - Excel - - Accelq -url: https://www.lambdatest.com/support/docs/hyperexecute-multi-webdriver-support/ -site_name: LambdaTest -slug: hyperexecute-multi-webdriver-support/ ---- - - - -In traditional testing scenarios, executing test cases that require multiple components running concurrently with different webdrivers presents a significant challenge. Typically, each test case is mapped to a single webdriver, limiting the ability to execute tests in parallel. - -This documentation explores how HyperExecute addresses this challenge by enabling parallel execution of test cases utilizing multiple webdrivers. - -## Challenges Unveiled - -One of our client's testing environment involved test cases divided into three components: **Caller**, **Transmitter**, and **Receiver**. Each component required a separate webdriver for execution. To achieve the desired test coverage, it was necessary for all three components to launch and run simultaneously. - -However, on their local machines, running three separate instances concurrently for extended periods, such as nine hours straight, was impractical and resource-intensive. - -## Unveiling the Approach - -HyperExecute provided a solution by introducing parallel execution capabilities within a single virtual machine (VM). By launching three different sessions within one VM for the Caller, Receiver, and Transmitter components, HyperExecute enabled parallel execution of the test cases. - -This approach optimized resource utilization and bandwidth, eliminating the need for running multiple machines simultaneously. - -## Implementation Details - -HyperExecute enabled parallel execution of multiple webdrivers within a single Virtual Machine (VM): - -### Parallel Session Management - -HyperExecute manages parallel test execution by launching separate sessions within a single VM for each component - Caller, Transmitter, and Receiver. These sessions operate concurrently, enabling the simultaneous execution of test cases. - -### `concurrentSession` Flag - -This flag triggers the launch of parallel webdrivers, allowing for the execution of test cases across multiple components simultaneously. - -```bash -concurrentSession: true -``` - -## Benefits - -This parallelization approach has several benefits: - -### Optimized Resource Utilization -By consolidating multiple sessions within a single VM, HyperExecute optimizes resource utilization, reducing the need for running multiple machines concurrently. - -### Bandwidth Optimization -Executing test cases in parallel within a single VM minimizes network bandwidth requirements, resulting in efficient utilization of available resources. - -### Time Efficiency -Parallel execution of test cases significantly reduces the overall test execution time, enhancing productivity and accelerating the testing process. - -## Conclusion - -HyperExecute's implementation of parallel test execution with multiple webdrivers addresses the challenges associated with traditional testing scenarios. - -By leveraging parallel sessions within a single VM and utilizing the concurrentSession flag, HyperExecute offers an efficient solution for achieving simultaneous execution of test cases across multiple components. - -This approach enhances resource utilization, optimizes bandwidth, and improves overall testing efficiency, enabling organizations to streamline their testing processes effectively. \ No newline at end of file diff --git a/docs/hyperexecute-use-cases.md b/docs/hyperexecute-use-cases.md index f7a8cbada..67845cefe 100644 --- a/docs/hyperexecute-use-cases.md +++ b/docs/hyperexecute-use-cases.md @@ -49,11 +49,6 @@ slug: hyperexecute-use-cases/
+
+### Step 2: Write Your Test Cases in Plain English
+In this step, you'll describe your desired test outcomes using plain English. Don't worry about writing specific code or scripts – KaneAI will handle that for you.
+
+For example:
+- Click on the hamburger menu button.
+- Write the test in the text field "This is a sample app".
+- Click on the "+" button.
+
+Continue to add instructions/commands in plain English as you go; KaneAI will automatically queue them for execution, eliminating the need to wait for one test to finish before writing the next. Click the **Fininsh Test**.
+
+> **Remember:** The more specific you are, the more accurate KaneAI's generated test cases will be.
+
+
+
+### Step 3: Save your Test Case
+Now, save all of the test cases you've generated so far.
+
+Select your Project and the folder where you want to save your test cases. The **Test Name** and **Description** will be generated automatically, but you can also edit them. Select your test's **Type** and **Status**, as well as the necessary tags that will allow you to search for it later.
+
+
+
+### Step 4: Execute your test
+To execute your test, click on the **HyperExecute** button and you will be redirected to the [HyperExecute dashboard](https://hyperexecute.lambdatest.com/hyperexecute/jobs) where your tests will be executed.
+
+
\ No newline at end of file
diff --git a/docs/kane-ai-javascript-execution.md b/docs/kane-ai-javascript-execution.md
new file mode 100644
index 000000000..5c9185ca9
--- /dev/null
+++ b/docs/kane-ai-javascript-execution.md
@@ -0,0 +1,117 @@
+---
+id: kane-ai-javascript-execution
+title: KaneAI - JavaScript Execution
+hide_title: false
+sidebar_label: JavaScript Execution
+description: Learn how to execute your tests on Kane AI using custom javascript snippets
+keywords:
+ - lambdatest automation
+ - lambdatest kaneai
+ - kaneai guided walkthrough
+ - kane ai prompts
+ - kane ai commands
+url: https://www.lambdatest.com/support/docs/kane-ai-javascript-execution/
+site_name: LambdaTest
+slug: kane-ai-javascript-execution/
+---
+
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+
+With KaneAI’s new JavaScript Execution feature, you now have the flexibility to write or paste custom JavaScript code snippets to perform tests. This allows for more advanced and customized test scenarios alongside KaneAI’s plain English test-writing format.
+
+This can be very useful for:
+- **Advanced Interactions:** If you need more granular control over interactions that can’t be expressed in plain English.
+- **Complex Test Scenarios:** For scenarios that involve manipulating the DOM, testing specific elements, or interacting with APIs directly.
+- **Flexibility:** Switch between natural language and JavaScript to suit your testing needs.
+- **Precision:** Perform tests that require more detailed code logic.
+- **Seamless Execution:** Test JavaScript code directly without any setup.
+
+## How to Execute Custom JavaScript Tests
+### Step 1: Click on the "Write a Step" Field
+In KaneAI’s test editor, navigate to the "Write a Step" field where you typically write your test scenarios in plain English.
+
+### Step 2: Trigger JavaScript Mode
+To switch to JavaScript execution mode, type the forward slash `/` or click on the `+` icon. You will see a JavaScript Pop-up Option appear. Click on the JavaScript option to switch the input mode to custom JavaScript.
+
+### Step 3: Write or Paste Your JavaScript Code
+Now, you can write or paste your custom JavaScript code snippet directly into the text field. A sample JavaScript code:
+
+```javascript
+function simulateTyping(element, text) {
+ element.value = ''; // Clear any existing value
+
+ for (let i = 0; i < text.length; i++) {
+ let char = text[i];
+ let keyDownEvent = new KeyboardEvent('keydown', {key: char});
+ element.dispatchEvent(keyDownEvent);
+ element.value += char;
+
+ let inputEvent = new Event('input', {bubbles: true});
+ element.dispatchEvent(inputEvent);
+ let keyUpEvent = new KeyboardEvent('keyup', {key: char});
+ element.dispatchEvent(keyUpEvent);
+ }
+
+ let changeEvent = new Event('change', {bubbles: true});
+ element.dispatchEvent(changeEvent);
+}
+
+// Example usage
+let inputElement1 = document.querySelector('[aria-label="First Name"]');
+let inputElement2 = document.querySelector('[aria-label="Last Name"]');
+let inputElement3= document.querySelector('[aria-label="Email"]');
+simulateTyping(inputElement1, 'Aman');
+simulateTyping(inputElement2, 'Chopra');
+simulateTyping(inputElement3, 'amanc@lambdatest.com');
+
+return {"First name": "Aman", "Last name": "Chopra", "email": "amanc@lambdatest.com"};
+```
+
+The provided code snippet simulates typing into text fields programmatically by dispatching key-related events such as keydown, input, keyup, and change. It mimics real user interaction by typing each character into the field and updating its value accordingly. The example provided fills in the first name, last name, and email fields with specific values and returns them in an object format.
+
+### Step 4: Execute the Test
+Once your code is ready, simply press Enter. KaneAI will run your custom JavaScript snippet in the current testing environment.
+
+#### Handling Return Values and Variable Usage
+If your JavaScript snippet contains return values, KaneAI will automatically save these values in a variable that can be used later in the test. The output from your JavaScript code will be captured and assigned to a variable. This variable will be available for use throughout your test execution.
+
+For example, in the code snippet provided:
+
+```javascript
+return {"First name": "Aman", "Last name": "Chopra", "email": "amanc@lambdatest.com"};
+```
+
+The returned object with the keys `First name`, `Last name`, and `email` will be stored in a variable. You can reference this variable later in your test to validate or reuse the values.
+
+> Variables created from return values can be used in subsequent test steps. To use the variable, simply refer to the specific property (e.g., First name) in your test steps for verification or further actions.
+
+#### JavaScript Snippets in Generated Code
+When your test is executed, the JavaScript code snippet you provided will be added directly into the generated test code. This ensures that any custom interactions performed with JavaScript are part of the overall test logic. The inclusion of JavaScript in the generated code allows for easy tracking, debugging, and modification if needed.
+
+
diff --git a/docs/kane-ai-web-test.md b/docs/kane-ai-web-test.md
index 72b8c9f0d..5fbb0087b 100644
--- a/docs/kane-ai-web-test.md
+++ b/docs/kane-ai-web-test.md
@@ -63,7 +63,7 @@ Keep adding instructions/commands in plain English as you go; KaneAI will automa
### Step 3: Save your Test Case
Now, save your test cases that you have generated till now.
-Select your Project, and the folder in which you want to store your test cases. The **Test Name** and the **Description** will be generated automatically, and you can also edit it. Select the **Type** of your test, and the status, and define the necessary tags which will help ypu to search your tests later.
+Select your Project, and the folder in which you want to store your test cases. The **Test Name** and the **Description** will be generated automatically, and you can also edit it. Select the **Type** of your test, and the **Status**, and define the necessary tags which will help ypu to search your tests later.
### Step 4: Execute your test
diff --git a/sidebars.js b/sidebars.js
index 944084f9b..39d2aafd0 100644
--- a/sidebars.js
+++ b/sidebars.js
@@ -740,7 +740,6 @@ module.exports = {
items: [
"hyperexecute-how-smart-caching-boosts-tests-speed",
"hyperexecute-seamless-integration-with-tools",
- "hyperexecute-multi-webdriver-support",
"hyperexecute-build-mobile-apps-using-tools",
"hyperexecute-utilizing-custom-libraries",
"hyperexecute-supported-languages-and-packages"
@@ -1016,6 +1015,11 @@ module.exports = {
"kane-ai-guided-walkthrough",
],
},
+ {
+ type: "doc",
+ label: "App Test",
+ id: "kane-ai-app-test"
+ },
{
type: "doc",
label: "Test Plan",
@@ -1027,6 +1031,7 @@ module.exports = {
label: "Knowledge Base",
items: [
"kane-ai-command-guide",
+ "kane-ai-javascript-execution"
],
},
{