A Comprehensive Guide on Testing Software with KaneAI
Introduction :
I started my career as a software tester and worked in this domain for years, I tested various web apps, and mobile apps on platforms like Android & iOS.
Throughout this journey, I enjoyed and learned a lot and later I moved to the development side. However, the lessons I learned in testing still help me to develop the software without worrying about potential bugs and covering edge cases.
During my initial days at testing software, I was amazed at how powerful automation testing is I used to combine test suites and leave them for testing overnight and in the morning they had reports ready in their email about how many test suits passed and what test cases failed.
When AI came into the picture last two years I was looking for some tools that could take automation testing to the next level and the wait ended in September when I received the invitation to try out Lambdatest’s new AI Automation testing tool KaneAI.
What is KaneAI?
According to the official website of the KaneAI is :
“KaneAI - Testing Assistant is the World’s first end-to-end software testing agent, an Advanced AI-powered platform built on modern Large Language Models (LLMs).
The unique approach to create, debug and evolve end-to-end tests using natural language”
Kane AI is an AI-powered platform that uses large language models (LLMs) to test the application functionality from start to finish.
Key Features of KaneAI: A Revolution in Test Automation
1. Conversational Test Creation
No more technical jargon. Describe your test scenarios in plain English. KaneAI's NLP magic transforms your words into executable test cases.
Bridge the communication gap. Collaborate seamlessly with technical and non-technical team members.
2. Intelligent Test Planning
Effortless test design. Input your high-level testing goals, and KaneAI crafts a detailed, automated test plan.
Maximize test coverage. Ensure comprehensive testing while saving time.
3. Flexible Code Export
- Integrate seamlessly—export tests in multiple programming languages and frameworks to fit your existing tech stack.
4. Smart Debugging and Optimization
Rapid issue resolution. KaneAI's RCA pinpoints problems quickly, saving you time and frustration.
Self-healing for efficiency. Adapt to minor changes automatically, reducing maintenance overhead.
5. Seamless Tool Integration
Centralized collaboration. Connect KaneAI with your favourite project management and communication tools (Jira, Slack, Microsoft Teams).
Stay informed. Keep your entire team in the loop with real-time updates.
6. Intuitive Goal Understanding:
- Simple input, powerful results. Just describe what you want to test, and KaneAI will do the rest.
7. Automated Test Creation:
- Optimized steps, effortless testing. KaneAI generates tailored test steps based on your goals.
8. Pre-built Templates:
- Jumpstart your testing. Use our ready-to-go examples for common scenarios and save time.
9. Other Features
Wide-ranging support. LambdaTest works seamlessly with popular languages like Java, Python, C, Ruby, and JavaScript.
Flexible framework options. Choose from TestNG, JUnit, Pytest, NUnit, and Cucumber to match your project's needs.
Intelligent Test Creation: KaneAI generates test cases automatically, analyzing your app's behaviour to identify potential issues.
Universal Compatibility: Test web, mobile, and cloud applications with ease.
Enhanced Bug Detection: Discover hidden defects that manual testing often misses, improving accuracy and efficiency.
Streamlined Testing: Automate repetitive tasks, freeing your team to focus on strategic initiatives.
DevOps Integration: Integrate seamlessly with your CI/CD pipelines for faster development and delivery.
Real-World Applications of KaneAI
1. E-commerce:
- Seamless shopping experience. Test the entire purchase journey, from product selection to checkout.
2. Healthcare:
- Accurate and efficient. Automate form submissions and verify compliance with industry regulations.
3. Insurance:
- Personalized quotes. Generate custom quotes for various insurance products.
4. Travel:
Reliable bookings. Validate flight and hotel booking processes and payment gateways.
Useful Commands in KaneAI:
KaneAI Prompts: Powerful Commands for Automated Testing
KaneAI empowers you to automate tests quickly and efficiently using prompts, simple commands typed into the text field. These prompts guide KaneAI on what actions to take and how to identify bugs.
Common Prompt Types:
Open / Go to: Launch a website by specifying its URL.
- Example:
go to
https://www.google.com
- Example:
Wait: Introduce a pause in your test.
- Example:
wait for 5 seconds
- Example:
Click: Tell KaneAI to click on a specific element.
- Example:
click on login button
- Example:
Type or Enter Text: Instruct KaneAI to enter text into an input field.
Examples:
enter "username"
type "password"
send keys "123456"
Clear: Clear the text within an input field.
Examples:
clear email input field
clear the password field
Select: Choose a specific date from a dropdown menu.
- Example:
select 21st september date
- Example:
Hover: Simulate hovering over an element.
- Example:
hover on shop by category option
- Example:
Search: Perform a search query on the page.
- Example:
search for iPhone
- Example:
Refresh: Reload the current page.
- Example:
refresh page
- Example:
Navigate Back/Forward: Move through your browser history.
Examples:
go back
(navigate to the previous page)navigate forward
(move to the next page)
Open New Tab: Create a new browser tab.
- Example:
open new lambdatest tab
- Example:
Switch Tabs: Move between open tabs.
Examples:
switch to 2nd tab
switch to lambdatest tab
Close Tab: Close an open tab.
Examples:
close lambdatest tab
close 2nd tab
Scroll: Move the browser window up, down, or to a specific position.
Examples:
scroll to the bottom
scroll by 100px
scroll 3 times
Assert Element Text: Verify if the text displayed on an element matches a specific value.
- Example:
assert if red button text is "subscribe"
- Example:
Query Information: Retrieve information from the web page.
- Example:
query the current url
- Example:
Conditional Actions: Execute a specific action only if a particular condition is met.
- Example:
if pop up is present in the viewport then click on it
- Example:
By mastering these prompts, you can create powerful and efficient automated tests with KaneAI, enhancing your overall testing experience. Refer to the documentation for more details!
Run Your First KaneAI Web Test: A Streamlined Guide
Ready to automate your web testing with KaneAI? This guide walks you through running your first test using real-world examples on Tesla's website.
Getting Started:
Login to KaneAI: You may be on a waitlist during beta.
Click "Create a Web Test": This launches the Chrome Virtual Browser in the cloud.
Writing Prompts:
KaneAI processes prompts sequentially, one line at a time.
You can type prompts one by one or enter them all at once.
Exploring the Interface:
KaneAI Input Box: Here you type prompts to instruct KaneAI.
Test Results Box: Shows the outcome of each prompt.
Chrome Virtual Browser: Displays the website you're testing.
A Sample Test Case:
Navigate to Tesla's website: Type
Go to
https://www.tesla.com/
Refresh the page: Type
refresh page
if elements are hidden.Scroll down: Type
scroll 3 times
to reach the Model S section.Click buttons: Use prompts like
click order now button
andclick finance tab in the Model S categories
.Navigate back: Type
back to previous page
to go back in browser history.
Multiple Prompts for Efficiency:
Enter multiple prompts at once to speed up testing.
KaneAI queues them and processes them sequentially.
Example: Adding a Wall Connector to the Cart:
Scroll to bottom of the page
Click Shop Now
Click on Wall Connector card
Click on add to card button
Analyzing Results and Debugging:
KaneAI identifies and explains any issues it encounters.
Fix errors by writing additional prompts or using manual interaction.
Manual Interaction:
Click on elements in the browser to record interactions as tests.
Useful if you're unsure of the exact prompt needed.
Finishing and Saving Your Test:
Click "Finish Test" when you're done.
Choose a folder and name your test.
Save the test case.
Test Manager: Managing Your Tests:
Access all your test cases in the Test Manager.
View details like performed steps, code generation, and execution.
Edit steps and perform additional tests.
Experience the Ease of Automated Testing:
KaneAI offers an intuitive interface and AI-powered prompts to streamline your web testing process. With the Test Manager, you can effectively manage your test cases and gain valuable insights.
Run your first KaneAI web Test:
"KaneAI empowers you to automate testing with ease using simple prompts. Let's dive into a real-world example and conduct your first test on Tesla's website.
To begin, log in to KaneAI. You should see a screen like the one below."
Before we begin writing prompts, it's important to understand that KaneAI processes them sequentially. This means that one prompt must finish executing before the next one starts.
You have flexibility in how you write prompts. You can choose to write them sequentially or combine multiple prompts into a single block. KaneAI will then process them in the order you specify.
Sequential Prompt
For this section, we'll be processing prompts sequentially. Each command will be a single line, followed by pressing Enter for KaneAI to execute it.
Please note that KaneAI is currently in beta, so you might need to be on a waitlist. If you've already signed in, let's continue.
First, click on the 'Create a Web Test' button. This will load the Chrome Virtual Browser in the cloud.
In the text area panel on the bottom right, enter your first prompt.
Go to https://www.tesla.com/
Press Enter or click the return icon in the text area box. This will open the Tesla homepage in your Chrome Virtual Browser, as shown below.
As highlighted in the image, there are three key sections:
KaneAI Input Box: This is where you enter commands or prompts to instruct KaneAI on the desired tests.
Test Results Box: This area displays the current operations or tests that KaneAI has processed, along with the corresponding results.
Chrome Virtual Browser: This is where the actual browser activities and test interactions take place.
However, in the Chrome Virtual Browser, the Tesla homepage might be partially obscured by the navbar. To address this, enter the following prompt to refresh the page:
refresh page
Your test result should look like this below.
As you can see in the test results section, the new prompt has been successfully executed.
Next, type 'scroll 3 times' in the KaneAI input box. This will navigate to the Model S section on the Tesla homepage, as shown below.
Next, we'll click the 'Order now' button and then select the 'Finance' tab within the Model S categories. To achieve this, enter the following prompts one at a time, pressing Enter after each:
1. click order now button
2. click finance tab in the Model S categories
The first prompt should open the page. as indicated below.
The second prompt will switch the tab from “cash” to “finance”. as indicated below
If you feel like navigating back to the previous page in the history stack, you can use the back command to do so.
1. back to previous page
2. refresh page
You should have the Model S page displayed again.
For smaller test cases, typing prompts individually can be effective. However, you can significantly save time by entering prompts in batches or steps.
Multiply Prompts
KaneAI enables you to enter multiple prompts simultaneously. When you do this, KaneAI adds them to a queue and processes them sequentially. This is a great way to accelerate testing and allows KaneAI to anticipate the next steps based on the completed prompts.
Let's try an example. Enter the following list of prompts into the KaneAI input box and press Enter:
1. Scroll to bottom of the page
2. Click shop Now
3. Click on Wall Connector card
4. Click on add to card button
KaneAI will initially add the prompts to the queue. It will then execute them one by one, loading the corresponding page for each prompt.
As shown in the image, KaneAI has successfully processed all the prompts and loaded the respective pages. However, you might have noticed that one test didn't behave as expected. KaneAI has provided a textual explanation for this discrepancy.
As indicated in the previous message, KaneAI has explained why the test failed. Let's try another prompt:
click on the add to cart buttons 4 times
You should see a message prompting you to 'view cart' or 'checkout,' as shown below.
Next, we are going to run another prompt. Type the prompt below and press enter.
click on view cart button
Your test result should look like this. Here we have the list of items added to the cart.
We've demonstrated how KaneAI can execute tests using prompts, providing immediate feedback from the browser. Alternatively, you can directly interact with the user interface (UI) instead of relying solely on prompts. This approach is known as Manual Interaction.
Manual Interaction
Manual Interaction allows you to run tests by clicking on elements within the Chrome Virtual Browser. KaneAI will then record your actions and generate the corresponding test.
To enable Manual Interaction, click the 'Manual Interaction' button in the top right corner of the Chrome Virtual Browser.
After activating Manual Interaction, click on the element you want to interact with. Observe as KaneAI captures your action and generates the corresponding test. For instance, click on the 'Checkout' button to see KaneAI record the interaction
The red box in the image highlights the interaction you performed. Notice the text 'Click on the Checkout button.'
Manual Interaction is particularly valuable when you're unsure about the specific prompts needed to interact with the application's UI."
Finish Test
When you've completed your testing session, click the 'Finish Test' button to save your tests
Click the 'Finish Test' button to open the session page, which contains details about the completed test cases
On the session page:
Click 'Select folder' and choose 'New test.'
Click the 'Type' select box and change the type to 'Functional.'
Click 'Save test case.'
This will open the 'Test Manager' panel, which stores all the test information and code.
Test Manager
The Test Manager session provides a comprehensive overview of all your completed test cases, aiding in effective test management. Here's what the Test Manager includes
The Test Manager includes the following:
Project Name: The name of the project.
Project Summary: Details such as the tester's name, test description, and steps performed.
Code Generation: Generates Python/Selenium code based on the test. Click 'View code' to inspect it.
HyperExecution: Enables parallel test execution.
Issues: List any issues encountered during the test cases.
Test History: Displays the history of when tests were performed.
Tester Name: The name of the person conducting the tests.
Test Steps: A detailed list of the steps taken during the test.
Edit/Add Steps: Allows you to modify existing steps or add new ones.
Test Description: A brief overview of the test.
KaneAI offers a streamlined approach to automated testing using AI-powered prompts. With the Test Manager, you can efficiently manage your test cases from every session.
Summary
KaneAI: Your AI-Powered Testing Companion
Revolutionize your website testing with KaneAI, LambdaTest's AI-driven assistant. Experience automated, prompt-based testing across web, mobile, and cloud applications.
Key Features:
Intelligent Test Generation: Create comprehensive tests effortlessly using natural language prompts.
Versatile Code Export: Export tests in multiple programming languages and frameworks to seamlessly integrate with your existing tools.
Strategic Test Planning: Let KaneAI's AI-powered planner devise efficient test strategies.
Advanced Testing Capabilities: Leverage sophisticated testing features through natural language inputs.
How It Works:
KaneAI uses prompts for various testing commands, such as:
Navigating websites: Open specific URLs.
Interacting with elements: Click, type text, and perform other actions.
Verifying results: Assert conditions and expected outcomes.
Flexible Testing:
Execute tests sequentially or with multiple prompts, adapting to your testing needs for optimal efficiency.
Benefits:
Streamlined Testing: Simplify your testing process and save time.
Enhanced Accuracy: Improve the accuracy of your test results.
Deeper Insights: Gain valuable insights into website performance and user experience.
Note: Image Credit (Alex Anie) as my access was disabled to KaneAI Beta.
Subscribe to my newsletter
Read articles from Prankur Pandey directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Prankur Pandey
Prankur Pandey
A 4-year-old freelance MERN Stack software developer, skilled in web and mobile app development. I am open to new work & opportunities.