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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.openqa.selenium.WebDriver
     
    protected String
    Used to determine what host the test is running on.
    protected int
    Used to determine what port the test is running on.
    protected String
    Returns the URL to the root of the server, e.g.
    protected abstract String
    Gets the absolute path to the test, starting with a "/".
    void
     
    static void
     

    Methods inherited from class com.vaadin.testbench.BrowserTestBase

    getCapabilities, getHubHostname, getRunLocallyBrowser, getRunLocallyBrowserVersion, setBrowserTestInfo

    Methods inherited from class com.vaadin.testbench.AbstractBrowserDriverTestBase

    getDriver, setDriver

    Methods 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, wrap

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods 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

      protected abstract String 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

      protected String 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

      protected String 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:
      createDriver in interface com.vaadin.testbench.DriverSupplier