ITEA is the Eureka Cluster on software innovation
ITEA is the Eureka Cluster on software innovation
ITEA 4 page header azure circular

UI test generator

Project
20023 SmartDelta
Type
New product
Description

The UI Test Generator, currently under development by Vaadin as part of the SmartDelta project, is a tool designed to automate the creation of initial UI tests for web-application views. Its primary objective is to supply developers with a robust set of baseline test cases, which can be further customized and enhanced to suit specific needs. This tool significantly simplifies the testing workflow, offering a strong foundation for thorough and comprehensive UI test coverage.

Contact
Yuriy Yevstihnyeyev
Email
yuriy@vaadin.com
Research area(s)
Test generation
Technical features

The UI Test Generator tool operates by parsing the source code of a view class into Gherkin-style syntax test cases. It intelligently identifies interactable elements within the view, along with the resultant UI changes following interaction. The tool also executes the application, analyzing the produced DOM structure to pinpoint suitable selectors for these elements. During this process, the DOM is repeatedly parsed for each detected interaction, ensuring thorough analysis. Once these selectors are identified, they are seamlessly incorporated into the generated test cases. The culmination of this process is the conversion of these test cases into executable Playwright tests.

While comprehensive, this solution may not encompass every possible scenario. However, it provides a substantial foundation of test scenarios for each parsed view. Developers have the flexibility to further refine these scenarios, tailoring the selection of UI elements and modifying assertions as needed.

A notable aspect of the tool is its utilization of the OpenAI API, which processes prompts containing both the class source code and the DOM. It is essential to recognize that while OpenAI does not retain the shared code, best practices dictate avoiding the submission of sensitive information, such as database contents and personal data, to ensure privacy and security.

Integration constraints
  • Supports only Java view classes (not compatible with Kotlin)
  • Compatible with JUnit 5
  • Requires Playwright 1.32.0
  • Operates on Java 17
Targeted customer(s)
  • Web Application Developers
  • Java Developers
Conditions for reuse
  • Still in development
  • Closed source
  • Governed by Vaadin Commercial License and Service Terms
Confidentiality
Public
Publication date
12-12-2023
Involved partners
Vaadin (FIN)