Class BrowserlessBuildConfigurator
java.lang.Object
com.vaadin.copilot.testrecordergenerator.TestBuildConfigurator
com.vaadin.copilot.testrecordergenerator.browserless.BrowserlessBuildConfigurator
Adds the Browserless test dependencies to a Maven or Gradle (Groovy) build.
Browserless tests run with Surefire / the Gradle test task, so no
Failsafe configuration or application start/stop is added. The Gradle
test task is made to use the JUnit Platform. All operations are
idempotent.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe result of configuring the build.Nested classes/interfaces inherited from class com.vaadin.copilot.testrecordergenerator.TestBuildConfigurator
TestBuildConfigurator.ManagedBy, TestBuildConfigurator.TestDependency -
Method Summary
Modifier and TypeMethodDescriptionconfigure(Path moduleRoot, List<TestBuildConfigurator.TestDependency> dependencies) Adds the given test dependencies to the build file in the module root.protected booleanconfigureGradleBuild(GradleFileRewriter rewriter, String content) Called when a Gradle (Groovy) build file is configured, to make changes other than adding dependencies.Methods inherited from class com.vaadin.copilot.testrecordergenerator.TestBuildConfigurator
addDependencies, hasDependency
-
Method Details
-
configure
public static BrowserlessBuildConfigurator.Result configure(Path moduleRoot, List<TestBuildConfigurator.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
-
configureGradleBuild
Description copied from class:TestBuildConfiguratorCalled when a Gradle (Groovy) build file is configured, to make changes other than adding dependencies. Does nothing by default.- Overrides:
configureGradleBuildin classTestBuildConfigurator- Parameters:
rewriter- the rewriter for the build filecontent- the content of the build file before any changes- Returns:
- true if the build file was changed
-