You're viewing an older version of Vaadin JavaDoc. Please see version 24.7.0 for the latest.
com.vaadin.uitest.

Class TestCodeGenerator

java.lang.Object
com.vaadin.uitest.TestCodeGenerator
public class TestCodeGenerator extends Object

Public class to use ui-generator from other apps like copilot.

  • Field Details

  • Constructor Details

    • TestCodeGenerator

      public TestCodeGenerator()
  • Method Details

    • addTestDependencies

      public static boolean addTestDependencies(UiRoute route, String projectRoot, String testFolder) throws Exception

      Throws:

      Exception

    • writeUiTest

      public static File writeUiTest(UiRoute route, String source) throws Exception

      Throws:

      Exception

    • configureKeys

      public static void configureKeys(String aiToken, String pineKey, String pineUrl)
    • generateTests

      public static String generateTests(UiRoute route, TestFramework testFramework)
    • generateTests

      public static String generateTests(UiRoute route)
    • getGeneratorImplementation

      public static Generator getGeneratorImplementation(String name)
    • implementationName

      public static String implementationName(Class<?> clazz)
    • getParserImplementation

      public static Parser getParserImplementation(String name, String baseUrl)
    • createInstance

      public static <T> T createInstance(Class<T> interfaceClass, String className, Object param)

      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.