We use cookies to serve our customers and website visitors in the best possible way. Cookies are used for the proper functioning of the website and for improving the user experience, monitoring visitor traffic and marketing purposes. By continuing to browse the site, you agree to our use of cookies. You can read more about cookies here.
com.vaadin.uitest.
Package com.vaadin.uitest
Class TestCodeGenerator
java.lang.Object
com.vaadin.uitest.TestCodeGenerator
Public class to use ui-generator from other apps like copilot.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
addTestDependencies
(UiRoute route, String projectRoot, String testFolder) static void
configureKeys
(String aiToken, String pineKey, String pineUrl) static <T> T
createInstance
(Class<T> interfaceClass, String className, Object param) Creates an instance of a class using reflection.
static String
generateTests
(UiRoute route) static String
generateTests
(UiRoute route, TestFramework testFramework) static Generator
static Parser
getParserImplementation
(String name, String baseUrl) static String
implementationName
(Class<?> clazz) static File
writeUiTest
(UiRoute route, String source)
-
Field Details
-
AI_ASSISTANT
See Also:
-
-
Constructor Details
-
TestCodeGenerator
public TestCodeGenerator()
-
-
Method Details
-
addTestDependencies
public static boolean addTestDependencies(UiRoute route, String projectRoot, String testFolder) throws Exception Throws:
-
writeUiTest
Throws:
-
configureKeys
-
generateTests
-
generateTests
-
getGeneratorImplementation
-
implementationName
-
getParserImplementation
-
createInstance
Creates an instance of a class using reflection.
Parameters:
className
- Fully qualified name of the class to instantiate.interfaceClass
- The class it should implement, e.g., Generator.class.param
- Constructor parameter (can be null for default constructor).Returns:
An instance of the class if found and instantiated, otherwise null.
-