Revolutionizing Website Testing: A Deep Dive into LambdaTest's KaneAI

Alex Anie - Sep 16 - - Dev Community

In the ever-evolving landscape of web development, ensuring website quality and performance across multiple platforms and browsers has become increasingly complex. KaneAI an AI-powered next-gen testing assistant by LambdaTest brings a groundbreaking solution that revolutionizes how we approach website testing.

As the digital world expands, so does the need for efficient, accurate, and scalable testing methodologies. Traditional manual testing methods, while valuable, often struggle to keep pace with the rapid development cycles and the sheer variety of devices and browsers in use today. This is where KaneAI steps in, offering a potential paradigm shift in validating and optimizing testing web applications.

LambdaTest, a well-known player in the cross-browser testing arena, has taken a significant leap forward with the introduction of KaneAI. This innovative AI-powered tool aims to streamline the testing process, enhance accuracy, and provide deeper insights into website performance and user experience.

In this blog post, we'll deeply dive into KaneAI, exploring its features, benefits, and potential impact on the website testing landscape. We'll examine how this tool fits into the broader context of AI in software testing and what it means for developers, QA professionals, and businesses striving to deliver flawless web experiences.

By the end of this blog, you learn what KaneAI is, its key features, useful KaneAI commands, and how to run AI-powered text with prompts.

What is Kane AI

KaneAI is an AI-powered next-gen testing assistant that enables testers to run automated AI tests on web, mobile, and cloud-based applications using prompts.

If you ever used chatGTP, KaneAI allows you to automate your testing workflows and deliver faster, more accurate results with prompts. This saves time spent on manual testing and provides better ways to catch critical edge cases you might otherwise miss.

Key Features of KaneAI

  • Test Generation & evolution: This lets you effortlessly use natural language inputs, simplifying the testing process with intelligent automation.
  • Multi-Language Code Export: Testers can convert automated tests in all major languages and frameworks
  • Intelligent Test Planner: Testers can automatically generate and automate test steps using high-level objectives.
  • Smart show-me mode: Testers can convert your actions into natural language instructions to generate bullet-proof tests
  • Sophisticated Testing capabilities: Testers can express sophisticated conditions and assertions in natural language.
  • Generate your tests: generate your tests with just high-level objectives.
  • Resilient tests from inception: Utilize built-in smart capabilities and auto-heal.
  • Web, mobile, or both: Develop tests across your stack on both web and mobile devices for extensive test coverage.
  • Plan and organize your test cases: Use the Test Management platform to aid in planning your test.
  • Tag KaneAI: In your conversations start test automation from various sources. Use KaneAI tags that are available for JIRA, Slack, and GitHub issues!
  • 2-way test editing: lets you focus on one and we'll sync the other—instruction to code and Code to instruction translation for effortless maintenance of tests.
  • Smart versioning support: KaneAI maintains separate versions for every change you make.
  • Run scheduled tests on HyperExecute: This lets you accelerate test execution up to 70% more than the traditional cloud.
  • Run generated tests: across 3000+ combinations of browsers, OS, and real devices.
  • AI-Powered Debugging: Experience assisted Debugging with KaneAI’s Test Agent to help you troubleshoot with the breeze.
  • 360 Test Observability: Detailed test execution reports with Test Intelligence and deep analytics.
  • Seamless integrate KaneAI into your workflow: Tag KaneAI wherever you go.

Useful Command Types for KaneAI

In other to perform tests with KaneAI, commands called “prompts” are required to be typed into the KaneAI text field. This will enable KaneAI to know what kinds of tests to perform and how to catch bugs if the test fails.

  • Open / Go to: This command lets you launch or open a website by specifying its URL.
👉 go to https://www.lambdatest.com

👉 open https://www.lambdatest.com
Enter fullscreen mode Exit fullscreen mode
  • Wait: Use to perform a wait operation.
👉 wait for 5 seconds
Enter fullscreen mode Exit fullscreen mode
  • Click: Use to tell KaneAI to click on elements.
👉 click on login button
Enter fullscreen mode Exit fullscreen mode
  • Type or Enter Text: Used to tell KaneAI to enter a text into an input field.
👉 enter "random@gmail.com"

👉 type "random@gmail.com"

👉 send keys "random@gmail.com"
Enter fullscreen mode Exit fullscreen mode
  • Clear: Used to tell KaneAI to clear a text in an input field.
👉 clear email input field

👉 clear the password field
Enter fullscreen mode Exit fullscreen mode
  • Select: Use to tell KaneAI to select date from a select tag.
👉 select 21st september date
Enter fullscreen mode Exit fullscreen mode
  • Hover: Used to trigger a hover state
👉 hover on the shop by category option
Enter fullscreen mode Exit fullscreen mode
  • Search: used to perform a search query
👉 search for iPhone
Enter fullscreen mode Exit fullscreen mode
  • Refresh: used to refresh the page
👉 refresh the page
Enter fullscreen mode Exit fullscreen mode
  • Navigate Back/Forward: To move back or forward to the previous page from the browser history.
👉 go back

👉 navigate back

👉 go forward

👉 navigate forward
Enter fullscreen mode Exit fullscreen mode
  • Open New Tab: Open a new browser tap
👉 open new lambdatest tab
Enter fullscreen mode Exit fullscreen mode
  • Switch Tabs: Navigate between opened tabs on the browser.
👉 switch to 2nd tab

👉 switch to lambdatest tab
Enter fullscreen mode Exit fullscreen mode
  • Close Tab: Close the opened tab.
👉 close lambdatest tab

👉 close 2nd tab
Enter fullscreen mode Exit fullscreen mode
  • Scroll: Scroll within the current page.
👉 scroll once

👉 scroll by 100px

👉 scroll to the bottom

👉 scroll to the top

👉 scroll 3 times

👉 scroll by 20 percent
Enter fullscreen mode Exit fullscreen mode
  • Assert Element Text: The assert keyword lets you test if a condition in your code returns True, if so it returns “Assertion True” . If not, the program will raise an AssertionError called “Assertion Failed”.
👉 assert if red button text is "subscribe"
Enter fullscreen mode Exit fullscreen mode
  • Query Information: Used to perform a query operation.
👉 query the current url
Enter fullscreen mode Exit fullscreen mode
  • Conditional Actions: Used to tell KaneAI to perform a specified task if the condition statement is true.
👉 if pop up is present in the viewport then click on it.
Enter fullscreen mode Exit fullscreen mode

Using the KaneAI prompt can improve your test experience overall. You can learn more from the documents here.

Run your first KaneAI web Test.

KaneAI lets you perform automated tests using prompts as explained in the previous section. In this section, we will learn how to conduct our first test using real-world examples. These examples involve running a test on Tesla’s official website.

You will see how KaneAI can be used to run tests on the cloud on any website. To get started login to KaneAI, you should see a page display like the one below.

KaneAi front page Beta

Before we start writing prompts, it’s important to note that KaneAI processes prompts sequentially, as a result, a particular prompt has to be completed before the next prompt is evaluated. However, how we can choose to write prompts is up to us, we can choose to write them sequentially or multiply the prompt and let KaneAI then decide how to process it.

Sequential Prompt

All prompts in this section are going to be processed sequentially. That is each command will be a single line of code and then we’ll press enter for KaneAI to process it.

At the time of writing, KaneAI is in beta, so you might be required to be on a waitlist. But if you’ve already signed in, let’s keep going.

Image description

First, click on the Create a Web Test button. This will load the Chrome Virtual Browser on the cloud.

Image description

From the textarea panel on the right bottom section, type your first prompt.

Go to https://www.tesla.com/
Enter fullscreen mode Exit fullscreen mode

Next press enter or press the return icon on the textarea box. This will open the Tesla home page on your Chrome Virtual Browser as indicated below.

Image description

From the above illustration, we have three important sections marked.

Number 1: This is KaneAI input box, where all commands/prompts are typed to let KaneAI know what test to perform.

Number 2: This box displays the current operation/tests KaneAI has processed and displays the result as soon as the test is completed.

Number 3: This is the Chrome Virtual Browser, where test activities performed on the browser are displayed.

However, from the Chrome Virtual Browser, we have the Tesla home page displayed. But from the view above, it seems the Navbar is covering the home page. To fix this issue type the prompt below to refresh the Tesla home page.

refresh page
Enter fullscreen mode Exit fullscreen mode

Your test result should look like this below.

KaneAI refresh-page-0

Notice from the mark section above, that we now have a new test result showing the new prompt we just ran.

Next, type scroll 3 times on the KaneAI input box, this will navigate to the Model S section on the Tesla home page as indicated below.

Image description

Next, we want to click on the “Order now” button and then click on the finance tab in the Model S categories, to do this type the first prompt below and press enter, then follow by the second one.

1. click order now button
2. click finance tab in the Model S categories
Enter fullscreen mode Exit fullscreen mode

The first prompt should open the page. as indicated below.

Image description

The second prompt will switch the tab from “cash” to “finance”. as indicated below

Image description

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
Enter fullscreen mode Exit fullscreen mode

You should have the Model S page displayed again.

Image description

If you are performing small test cases, typing out the prompts one after the other is not a bad idea. However, you can save valuable time by typing out the prompts in steps.

Multiply Prompts

KaneAI allows multiple prompts to be specified at once. By typing out multiple prompts, KaneAI adds them to a queue and processes them one after the other until everything is completely processed.

This is very useful as it speeds up testing and it allows KaneAI to know what to work on next after a specific prompt is completed.

Let’s take a list of prompts below as a use case. Go ahead and type it on the KaneAI input box and click 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

Enter fullscreen mode Exit fullscreen mode

Firstly, KaneAI will add them to the queue, go through each prompt one after another, and then load the page corresponding to each prompt.

Kane Ai click

From the image above, KaneAI has processed all the prompts and loaded the page accordingly. But one out of all the tests did not respond as expected, as you would have noticed. KaneAI has provided a text description to explain why this is the case.

KaneAI has reported why the previous test

From the above instruction, KaneAI has reported why the previous test was not run as expected. So let’s run another prompt below.

click on the add to cart buttons 4 times
Enter fullscreen mode Exit fullscreen mode

You should see a model asking you to “view cart” or “checkout” as indicated below.

Image description

Next, we are going to run another prompt. Type the prompt below and press enter.

click on view cart button
Enter fullscreen mode Exit fullscreen mode

Your test result should look like this. Here we have the list of items added to the cart.

Image description

We have seen how KaneAI can be used to run tests with immediate feedback from the browser by using prompts. However, you can also interact with the UI instead of running prompts. This is called Manual Interaction.

Manual Interaction

Manuel Interaction lets us run a test by interacting with the UI of the Chrome Virtual Browser, and then KaneAI records and generates the interaction as a test.

To activate manual interaction, click on the “Manuel Interaction” button on the top right corner of the Chrome Virtual browser.

Image description

Once the Manual Interaction button is activated, we can click on the element we want to interact with and then watch as KaneAI returns it as a test. For example, click on the “checkout” button and watch KaneAI return the interaction.

KaneAI click-manual-interaction

The red box on the image shows the interaction we made. Notice the written text. “Click on the Checkout button”.

Manuel Interaction can be very useful in many cases, especially in cases where you are unsure what kind of prompt is required to perform or interact with the application UI.

Finish Test

KaneAI provides a “finish Test” button, used to save tests when you finish your testing in your current session.

KaneAI Finish Test

Click on the “Finish Test” button, this will open the session page with information on the test cases performed.

KaneAi click on the select folder

On the session page, click on the select folder and choose “new test”.

  • Next, click on the type select box and change the “type” to “functional”.
  • Next, click on the “save test case”.

This will open up the “Test Manager” panel. Where all information and code from the test are stored.

Test Manager

The Test Manager session includes all test cases performed, it helps in managing our tests. The Test Manager includes the following.

Image description

  • number 1: The name of the project
  • number 2: Summary of the project, such as;
    1. name of the tester.
    2. description of the test
    3. steps performed during the test.
  • number 3: Generate python/selenium code from the performed test. you can click on the view code to see the code.
  • number 4: Hyperexecute code.
  • number 5: Issues from the performed test cases.
  • number 6: Display the history regarding when tests are performed.
  • number 7: The name of the tester.
  • number 8: Steps taken when performing tests
  • number 9: Use to edit steps taken or perform additional tests.
  • number 10: Description of the test taken. ****

KaneAI provides a streamlined process for running automated tests using AI-powered prompts. With Task Manager, you can effectively manage performed tests from every test session you make.

Summary

KaneAI is an AI-powered testing assistant by LambdaTest that revolutionizes website testing through automated, prompt-based testing across web, mobile, and cloud-based applications

Key features include test generation, multi-language code export, intelligent test planning, and sophisticated testing capabilities using natural language inputs.

KaneAI uses prompts for various testing commands, including opening websites, clicking elements, entering text, and performing assertions.

Tests can be run sequentially or with multiple prompts, allowing for efficient and flexible testing processes.

KaneAI aims to streamline the testing process, enhance accuracy, and provide deeper insights into website performance and user experience

. . . . . . . . . . . . . . .
Terabox Video Player