NashTech Blog

How to use TestCraft extension in Automation Testing

Table of Contents

1. Introduction to TestCraft extension

1.1 What is TestCraft extension?

TestCraft is a Chrome extension created to enhance your software testing experience. This tool allows users to directly select UI elements from their browser and utilize the power of large language models (LLMs) to generate creative test concepts, develop automation scripts compatible with multiple frameworks and programming languages, and conduct accessibility assessments.

1.2 Key feature

  • Generate Test Ideas: Utilize LLMs to brainstorm diverse testing ideas and scenarios.
  • Automation: Automatically generate test scripts in multiple languages and frameworks, including JavaScript, TypeScript, Java, C#, and Python, and using testing frameworks like Playwright, Cypress, and Selenium.
  • Check Accessibility: Assess the accessibility of UI components to ensure compliance with standards and improve usability.

2. How to install and use

2.1 Installation

Navigate to https://home.testcraft.app/ and click on Install

Click “Add to Chrome” to install the extension.

Click the Extensions icon in the browser toolbar, and pin the extension so that the TestCraft icon is always visible

2.2 Usage

To open TestCraft, click on the TestCraft icon in the browser toolbar. In this article, we’ll use https://www.saucedemo.com/ as the AUT

2.2.1 Automation settings

Click on the setting icon

In the Automation Settings, you can freely choose the language and framework that best suit your needs. In my demo, I will choose Playwright framework by Javascript.

In the API Settings, due to the costs, gpt-3.5-turbo is default, and the dropdown is disabled. To enable other models, set the OpenAI API key or Server URL.

2.2.2 Pick Element

To initiate the selection process, click on the “Pick Element” button.

Position your cursor over the element of interest on the webpage. On this page, I will hover the whole login form.


Click to confirm your selection. The details of the selected element will be imported into TestCraft for subsequent actions.

2.2.3 Generating Test Ideas

Once an element has been selected, proceed by clicking on “Generate Test Ideas.”

Examine the proposed test ideas, which are organized into three categories: Positive Tests, Negative Tests, and Creative Test Scenarios:

Positive Tests: Verify that the system performs as anticipated under standard conditions.

Negative Tests: Assess the system’s response to error situations or invalid inputs.

Creative Test Scenarios: Investigate less typical conditions or combinations of inputs to identify potential unique issues.

We can modify the proposed test ideas by utilizing the pencil icons adjacent to each suggestion.

2.2.3.1 Automate Test Ideas

Use the checkboxes to select the test ideas you find relevant (optionally, you can edit them first).

Click “Automate” to generate automation scripts based on the selected test ideas for the specific UI element.

Now, I will try to genenate automation scripts for login happy case

After clicking Automate button, the code will be generated and organized based on the Page Object Model and my automation setting, we can copy that code by clicking Copy to clipboard. It will save more time compared to implementing the code.

2.2.3.2 Copy Test Ideas

Use the checkboxes to select the test ideas you find relevant (optionally, you can edit them first).

Click on “Copy to clipboard” to copy selected ideas for documentation or further processing.

2.2.4 Writing Automation Scripts for a specific component

After selecting an element, we can click on “Automate” to generate the code. All the script to integrate with all elements in a component will be generated.

Copy the generated code directly into your IDE by clicking on “Copy to clipboard”.

2.2.5 Check Accessibility

After selecting an element, click on “Check Accessibility”.

Review the detailed report pointing out potential issues and recommendations for tests. Here is example

3. Conclusion

To sum up, using the TestCraft extension in Chrome can help you easily create and manage test cases. It makes your automation process smoother, saving you time and effort. However, for more complex test scenarios, you may still need coding skills. In general, it can improve your testing efficiency, but don’t forget that some tests may need more customization.

Reference

https://github.com/TestCraft-App/test-craft-app-v1?tab=readme-ov-file#testcraft-chrome-extension

https://home.testcraft.app

Picture of Duy Le

Duy Le

I'm an automation tester at NashTech with over two years of experience in both automated and manual testing. My expertise lies in ensuring the quality and efficiency of software solutions through precise automation techniques, honed through diverse projects and challenges.

1 thought on “How to use TestCraft extension in Automation Testing”

  1. An amazing guide book on How to use TestCraft extension in Automation Testing, it was like “Spoon Feeding to a Baby”. Really thanks and appriciate your efforts to teach people.

Leave a Comment

Your email address will not be published. Required fields are marked *

Suggested Article

Scroll to Top