Class AbstractIT
java.lang.Object
com.vaadin.testbench.AbstractBrowserTestBase
com.vaadin.testbench.AbstractBrowserDriverTestBase
com.vaadin.testbench.BrowserTestBase
com.vaadin.observability.tests.common.AbstractIT
- All Implemented Interfaces:
com.vaadin.testbench.DriverSupplier,com.vaadin.testbench.HasDriver,com.vaadin.testbench.HasElementQuery,com.vaadin.testbench.HasSearchContext,com.vaadin.testbench.HasTestBenchCommandExecutor
public abstract class AbstractIT
extends com.vaadin.testbench.BrowserTestBase
implements com.vaadin.testbench.DriverSupplier
Base class for Observability Kit integration tests. Spins up a headless
Chrome driver (or connects to a hub when configured) and navigates to the
view under test before each test method.
-
Field Summary
Fields inherited from class com.vaadin.testbench.BrowserTestBase
screenshotOnFailureExtension -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.WebDriverprotected StringUsed to determine what host the test is running on.protected intUsed to determine what port the test is running on.protected StringReturns the URL to the root of the server, e.g.protected abstract StringGets the absolute path to the test, starting with a "/".voidsetup()static voidMethods inherited from class com.vaadin.testbench.BrowserTestBase
getCapabilities, getHubHostname, getRunLocallyBrowser, getRunLocallyBrowserVersion, setBrowserTestInfoMethods inherited from class com.vaadin.testbench.AbstractBrowserDriverTestBase
getDriver, setDriverMethods inherited from class com.vaadin.testbench.AbstractBrowserTestBase
assertEquals, blur, checkLogsForErrors, checkLogsForErrors, clickElementWithJs, clickElementWithJs, concatUrl, drag, dragAndDrop, dragElementOver, executeScript, findElement, findElements, getCommandExecutor, getContext, getLogEntries, getScrollX, getScrollY, hasCssClass, isElementPresent, scrollBy, scrollIntoViewAndClick, scrollToElement, testBench, waitForDevServer, waitForElementNotPresent, waitForElementPresent, waitForElementVisible, waitUntil, waitUntil, waitUntilNot, waitUntilNot, wrapMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.testbench.HasElementQuery
$, $
-
Constructor Details
-
AbstractIT
public AbstractIT()
-
-
Method Details
-
setupClass
@BeforeAll public static void setupClass() -
setup
@BeforeEach public void setup() -
getTestPath
Gets the absolute path to the test, starting with a "/".- Returns:
- the path to the test, appended to
getRootURL()for the full test URL.
-
getRootURL
Returns the URL to the root of the server, e.g. "http://localhost:8080".- Returns:
- the URL to the root
-
getDeploymentPort
protected int getDeploymentPort()Used to determine what port the test is running on.- Returns:
- the port the test is running on, by default 8080
-
getDeploymentHostname
Used to determine what host the test is running on.- Returns:
- the host name of the deployment
-
createDriver
public org.openqa.selenium.WebDriver createDriver()- Specified by:
createDriverin interfacecom.vaadin.testbench.DriverSupplier
-