Annotation Type HoverflyConfig

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String absoluteResponseBodyFilesPath
      Override the default parent path for resolving the response body file.
      int adminPort
      The Hoverfly admin port, default is set to use any randomized free port
      java.lang.String binaryLocation
      Overrides the default path for Hoverfly binary and working directory.
      java.lang.String caCertPath
      Custom CA certificate for Hoverfly LocalHoverflyConfig.overrideDefaultCaCert(String, String)
      java.lang.String caKeyPath
      Key for Hoverfly custom CA cert LocalHoverflyConfig.overrideDefaultCaCert(String, String)
      boolean captureAllHeaders
      By default Hoverfly does not capture any request headers, enable this flag to capture all headers
      java.lang.String[] captureHeaders
      A list of request headers to capture
      java.lang.String[] clientAuthDestination
      Destination filter to what target urls to enable mutual TLS authentication.
      java.lang.String clientCaCertPath
      Client CA certificate file in classpath.
      java.lang.String clientCertPath
      Client certificate file in classpath.
      java.lang.String clientKeyPath
      Client key file in classpath.
      java.lang.String[] commands
      Set additional commands for starting Hoverfly
      java.lang.String[] destination
      Use this destination filter to set which hostname to simulate or capture, for example setting this to "hoverfly.io" will only simulate or capture requests to "hoverfly.io"
      boolean disableTlsVerification
      Configure Hoverfly to skip TLS verification.
      boolean enableIncrementalCapture
      By default Hoverfly exports the captured requests and responses to a new file by replacing any existing one.
      io.specto.hoverfly.junit.core.config.LogLevel logLevel
      Set Hoverfly log level
      boolean plainHttpTunneling
      Enable this flag allows Hoverfly to handle CONNECT requests for non-TLS tunnelling, making it possible to work with Netty-based HTTP client such as reactor-netty
      boolean proxyLocalHost
      By default Hoverfly does not proxy localhost requests, but you can enable it using this flag
      int proxyPort
      The Hoverfly proxy port, default is set to use any randomized free port
      java.lang.String relativeResponseBodyFilesPath
      Override the default parent path for resolving the response body file (relative to the test resources folder).
      java.lang.String remoteHost
      External Hoverfly instance hostname RemoteHoverflyConfig.host(String)
      java.lang.Class<? extends io.specto.hoverfly.junit.core.SimulationPreprocessor> simulationPreprocessor  
      java.lang.String sslCertificatePath
      Deprecated.
      java.lang.String sslKeyPath
      Deprecated.
      boolean statefulCapture
      By default Hoverfly only capture multiple identical requests once, enable this flag to capture all requests sequentially
      java.lang.String upstreamProxy
      Set upstream proxy for hoverfly to connect to target host
      boolean webServer
      Enable web server mode
    • Element Detail

      • adminPort

        int adminPort
        The Hoverfly admin port, default is set to use any randomized free port
        Default:
        0
      • proxyPort

        int proxyPort
        The Hoverfly proxy port, default is set to use any randomized free port
        Default:
        0
      • proxyLocalHost

        boolean proxyLocalHost
        By default Hoverfly does not proxy localhost requests, but you can enable it using this flag
        Default:
        false
      • destination

        java.lang.String[] destination
        Use this destination filter to set which hostname to simulate or capture, for example setting this to "hoverfly.io" will only simulate or capture requests to "hoverfly.io"
        Default:
        {}
      • captureAllHeaders

        boolean captureAllHeaders
        By default Hoverfly does not capture any request headers, enable this flag to capture all headers
        Default:
        false
      • captureHeaders

        java.lang.String[] captureHeaders
        A list of request headers to capture
        Default:
        {}
      • statefulCapture

        boolean statefulCapture
        By default Hoverfly only capture multiple identical requests once, enable this flag to capture all requests sequentially
        Default:
        false
      • sslCertificatePath

        @Deprecated
        java.lang.String sslCertificatePath
        Deprecated.
        Custom SSL certificate for Hoverfly LocalHoverflyConfig.sslCertificatePath(String)
        Default:
        ""
      • sslKeyPath

        @Deprecated
        java.lang.String sslKeyPath
        Deprecated.
        Custom SSL key for Hoverfly LocalHoverflyConfig.sslKeyPath(String)
        Default:
        ""
      • caCertPath

        java.lang.String caCertPath
        Custom CA certificate for Hoverfly LocalHoverflyConfig.overrideDefaultCaCert(String, String)
        Default:
        ""
      • caKeyPath

        java.lang.String caKeyPath
        Key for Hoverfly custom CA cert LocalHoverflyConfig.overrideDefaultCaCert(String, String)
        Default:
        ""
      • remoteHost

        java.lang.String remoteHost
        External Hoverfly instance hostname RemoteHoverflyConfig.host(String)
        Default:
        ""
      • plainHttpTunneling

        boolean plainHttpTunneling
        Enable this flag allows Hoverfly to handle CONNECT requests for non-TLS tunnelling, making it possible to work with Netty-based HTTP client such as reactor-netty
        Default:
        false
      • disableTlsVerification

        boolean disableTlsVerification
        Configure Hoverfly to skip TLS verification. This option allows Hoverfly to perform "insecure" SSL connections to target server that uses invalid certificate (eg. self-signed certificate)
        Default:
        false
      • upstreamProxy

        java.lang.String upstreamProxy
        Set upstream proxy for hoverfly to connect to target host
        Default:
        ""
      • webServer

        boolean webServer
        Enable web server mode
        Default:
        false
      • simulationPreprocessor

        java.lang.Class<? extends io.specto.hoverfly.junit.core.SimulationPreprocessor> simulationPreprocessor
        Default:
        io.specto.hoverfly.junit5.api.UnsetSimulationPreprocessor.class
      • commands

        java.lang.String[] commands
        Set additional commands for starting Hoverfly
        Default:
        {}
      • logLevel

        io.specto.hoverfly.junit.core.config.LogLevel logLevel
        Set Hoverfly log level
        Default:
        io.specto.hoverfly.junit.core.config.LogLevel.INFO
      • clientCertPath

        java.lang.String clientCertPath
        Client certificate file in classpath. Must be a PEM encoded certificate, with .crt or .pem extensions
        Default:
        ""
      • clientKeyPath

        java.lang.String clientKeyPath
        Client key file in classpath. Must be a PEM encoded certificate, with .crt or .pem extensions
        Default:
        ""
      • clientAuthDestination

        java.lang.String[] clientAuthDestination
        Destination filter to what target urls to enable mutual TLS authentication.
        Default:
        {}
      • clientCaCertPath

        java.lang.String clientCaCertPath
        Client CA certificate file in classpath. Must be a PEM encoded certificate, with .crt or .pem extensions
        Default:
        ""
      • binaryLocation

        java.lang.String binaryLocation
        Overrides the default path for Hoverfly binary and working directory.
        Default:
        ""
      • enableIncrementalCapture

        boolean enableIncrementalCapture
        By default Hoverfly exports the captured requests and responses to a new file by replacing any existing one. Enable this option to import any existing simulation file and append new requests to it in capture mode.
        Returns:
        the HoverflyConfig for further customizations
        Default:
        false
      • relativeResponseBodyFilesPath

        java.lang.String relativeResponseBodyFilesPath
        Override the default parent path for resolving the response body file (relative to the test resources folder). The default parent path is set to the default hoverfly test resources folder which is test/resources/hoverfly/
        Default:
        ""
      • absoluteResponseBodyFilesPath

        java.lang.String absoluteResponseBodyFilesPath
        Override the default parent path for resolving the response body file. The default parent path is set to the default hoverfly test resources folder which is test/resources/hoverfly/
        Default:
        ""