Class BrowserlessBuildConfigurator
java.lang.Object
com.vaadin.copilot.testrecordergenerator.browserless.BrowserlessBuildConfigurator
Adds the Browserless test dependencies to a Maven or Gradle (Groovy) build.
Dependencies are added in test scope without a version, which requires that the version is managed by a BOM (the Vaadin BOM manages the Browserless artifacts, Spring Boot manages its own test dependencies). When no BOM can be found the dependency is not added and a warning is returned instead of guessing a version.
Browserless tests run with Surefire / the Gradle test task, so no
Failsafe configuration or application start/stop is added. All operations are
idempotent.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe result of configuring the build. -
Method Summary
Modifier and TypeMethodDescriptionconfigure(Path moduleRoot, List<BrowserlessProjectSetup.TestDependency> dependencies) Adds the given test dependencies to the build file in the module root.
-
Method Details
-
configure
public static BrowserlessBuildConfigurator.Result configure(Path moduleRoot, List<BrowserlessProjectSetup.TestDependency> dependencies) throws IOException Adds the given test dependencies to the build file in the module root.- Parameters:
moduleRoot- the module root folderdependencies- the dependencies to add- Returns:
- the result
- Throws:
IOException- if the build file cannot be read or written
-