Class TestConfiguration


  • public class TestConfiguration
    extends Object
    Configuration options for the test.
    Since:
    10.9
    Version:
    $Id: 3d8fa3aea0298ce911dbed641b5cf2cddf1c0a90 $
    • Constructor Detail

      • TestConfiguration

        public TestConfiguration()
    • Method Detail

      • getBrowser

        public Browser getBrowser()
        Returns:
        the browser to use
      • setBrowser

        public void setBrowser​(Browser browser)
        Parameters:
        browser - see getBrowser()
      • getDatabase

        public Database getDatabase()
        Returns:
        the database to use
      • getServletEngine

        public ServletEngine getServletEngine()
        Returns:
        the Servlet engine to use
      • isVerbose

        public boolean isVerbose()
        Returns:
        true if the test should output verbose console logs or not
      • setVerbose

        public void setVerbose​(boolean verbose)
        Parameters:
        verbose - see isVerbose()
      • isDebug

        public boolean isDebug()
        Returns:
        true if the test should output debug console logs or not
        Since:
        10.11RC1
      • setDebug

        public void setDebug​(boolean debug)
        Parameters:
        debug - see isDebug()
      • isOffline

        public boolean isOffline()
        Returns:
        true if the Maven resolving is done in offline mode (i.e. you need to have the required artifacts in your local repository). False by default to avoid developer problems but should be set to true in the CI to improve performance of functional tests
        Since:
        10.10RC1
      • setOffline

        public void setOffline​(boolean offline)
        Parameters:
        offline - see isOffline()
      • getDatabaseTag

        public String getDatabaseTag()
        Returns:
        the docker image tag to use (if not specified, uses the default from TestContainers)
        Since:
        10.10RC1
      • setDatabaseTag

        public void setDatabaseTag​(String databaseTag)
        Parameters:
        databaseTag - see getDatabaseTag()
      • getServletEngineTag

        public String getServletEngineTag()
        Returns:
        the docker image tag to use (if not specified, uses the "latest" tag)
        Since:
        10.10RC1
      • setServletEngineTag

        public void setServletEngineTag​(String servletEngineTag)
        Parameters:
        servletEngineTag - see getServletEngineTag()
      • getJDBCDriverVersion

        public String getJDBCDriverVersion()
        Returns:
        the version of the JDBC driver to use for the selected database (if not specified, uses a default version depending on the database)
        Since:
        10.10RC1
      • setJDBCDriverVersion

        public void setJDBCDriverVersion​(String jdbcDriverVersion)
        Parameters:
        jdbcDriverVersion - see getJDBCDriverVersion()
      • vnc

        public boolean vnc()
        Returns:
        true if VNC container is started and recording is done and saved on test exit
        Since:
        10.10RC1
      • setVNC

        public void setVNC​(boolean vnc)
        Parameters:
        vnc - see vnc()
      • isWCAG

        public boolean isWCAG()
        Returns:
        true if WCAG rules should be checked.
        Since:
        15.2RC1
      • setWCAG

        public void setWCAG​(boolean wcag)
        Parameters:
        wcag - see isWCAG()
        Since:
        15.2RC1
      • getProperties

        public Properties getProperties()
        Returns:
        the list of configuration properties to use when generating the XWiki configuration files such as as xwiki.properties (check xwiki.properties.vm to find the list of supported properties)
        Since:
        10.10RC1
      • getDatabaseCommands

        public Properties getDatabaseCommands()
        Returns:
        the list of database docker commands to use and that will override default commands (example of command character-set-server=utf8mb4
        Since:
        11.2RC1
      • getExtraJARs

        public Set<org.xwiki.test.integration.maven.ArtifactCoordinate> getExtraJARs()
        Returns:
        the list of extra JARs to add to the WEB-INF/lib directory
        Since:
        10.11RC1
      • setExtraJARs

        public void setExtraJARs​(Set<org.xwiki.test.integration.maven.ArtifactCoordinate> extraJARs)
        Parameters:
        extraJARs - see getExtraJARs()
      • isResolveExtraJARs

        public boolean isResolveExtraJARs()
        Returns:
        true if extra JARs version should be resolved when missing, see UITest.resolveExtraJARs()
        Since:
        12.5RC1
      • setResolveExtraJARs

        public void setResolveExtraJARs​(boolean resolveExtraJARs)
        Parameters:
        resolveExtraJARs - see isResolveExtraJARs()
      • getExtensionOverrides

        public List<org.xwiki.tool.extension.ExtensionOverride> getExtensionOverrides()
        Returns:
        the overrides of the extensions descriptors
        Since:
        11.6RC1
      • setExtensionOverrides

        public void setExtensionOverrides​(List<org.xwiki.tool.extension.ExtensionOverride> extensionOverrides)
        Parameters:
        extensionOverrides - see getExtensionOverrides()
      • getSSHPorts

        public List<Integer> getSSHPorts()
        Returns:
        the list of ports that should be SSH-forwarded when connecting from a Docker container to the host (i.e. when using the host.testcontainers.internal host name). This is in addition to port 8080 which is always added. For example if you need XWiki to send a mail to a SMTP server running on port 3025 on the host, you should add port 3025 to the list.
        Since:
        10.11RC1
      • getProfiles

        public List<String> getProfiles()
        Returns:
        the list of Maven profiles to activate when resolving dependencies for the current POM.
        Since:
        10.11RC1
      • getName

        public String getName()
        Returns:
        the String representation of the configuration (used for example as a directory name where to save the generated XWiki configuration - XWiki WAR file, etc)
        Since:
        10.10RC1
      • getOutputDirectory

        public String getOutputDirectory()
        Returns:
        the output directory where to output files required for running the tests. If the maven.build.dir system property is not defined then construct an output directory name based on the defined configuration so that we can run different configurations one after another without them overriding each other. The maven.build.dir system property is there to allow controlling where the Maven output directory is located when running from Maven.
      • isOffice

        public boolean isOffice()
        Returns:
        true if an office container must be provided to run the tests.
        Since:
        10.11RC1
      • setOffice

        public void setOffice​(boolean office)
        Parameters:
        office - see isOffice()
      • getForbiddenServletEngines

        public List<ServletEngine> getForbiddenServletEngines()
        Returns:
        the list of Servlet Engines on which this test must not be executed. If the Servlet Engine is selected then the test will be skipped
        Since:
        10.11RC1
      • isDatabaseDataSaved

        public boolean isDatabaseDataSaved()
        Returns:
        true true if the database data should be mapped to a local directory on the host computer so that it can be saved and reused for another run
        Since:
        10.10RC1
      • setSaveDatabaseData

        public void setSaveDatabaseData​(boolean saveDatabaseData)
        Parameters:
        saveDatabaseData - see isDatabaseDataSaved()
      • isPermanentDirectoryDataSaved

        public boolean isPermanentDirectoryDataSaved()
        Returns:
        true if the XWiki permanent directory should be mapped to a local directory on the host computer so that it can be accessed once the test is finished, for debugging purposes
        Since:
        14.5
      • setSavePermanentDirectoryData

        public void setSavePermanentDirectoryData​(boolean savePermanentDirectoryData)
        Parameters:
        savePermanentDirectoryData - see isPermanentDirectoryDataSaved()
        Since:
        14.5