Skip to content

Latest commit

 

History

History
220 lines (164 loc) · 8.17 KB

File metadata and controls

220 lines (164 loc) · 8.17 KB

Frequently asked questions

Maven

FM01 Which Serenity are we currently using?

You can find the Serenity compatible with each Tiger version in the [ReleaseNotes](ReleaseNotes.md)

FM02 When using maven, no tests are executed.

Please first make sure that either the surefire or failsafe plugin is enabled and shown as running in the console. If you use Junit4 test annotations, you have to make sure that the junit vintage engine from the Junit5 library is included in the dependencies.

<dependency>
    <groupId>org.junit.vintage</groupId>
    <artifactId>junit-vintage-engine</artifactId>
    <version>${version.junit5}</version>
</dependency>

FM03 When running tests in Tiger, the test run aborts with a java.lang.NoSuchMethodError.

More specifically, the error is as follows:

Exception in thread 'main' java.lang.NoSuchMethodError: 'java.util.Set org.json.JSONObject.keySet()'

This is due to a dependency conflict which may be solved by an exclusion in the tiger-test-lib:

<exclusion>
    <groupId>com.vaadin.external.google</groupId>
    <artifactId>android-json</artifactId>
</exclusion>

FM04 I don’t see any log output, there are only warnings about outdated versions at the beginning

Apparently you included SLF4J V2 dependencies. We currently use the logback classic 1.2.x branch, which is delivered in the most recent SpringBoot version. This is not compatible to SLF4J 2.x.x.

FM05 There are selenium version conflicts when I want to run my project with SpringBoot and tiger with selenium

SpringBoot deploys an outdated selenium version. To solve the conflicts, please use the versions stated in the release notes via dependency managent in the maven pom.xml.

FM06 When using Scenario Outlines, the tests are not displayed with the scenario name in the JUnit report, but e.g. as Examples.Example #1.1.

The system property cucumber.junit-platform.naming-strategy.short.example-name (usually in the junit-platform.properties file) is probably set to something other than "pickle". If this property has not been explicitly set, Tiger will automatically set it to "pickle".

Extensions

FE01 When I start a docker image in tiger.yaml, the TestenvironmentManager’s startup fails

Please make sure that you added the tiger-cloud-extension dependency in the most recent version.

<dependency>
    <groupId>de.gematik</groupId>
    <artifactId>tiger-cloud-extension</artifactId>
    <version>x.y.z</version>
</dependency>

FE02 When using the tiger-cloud-extensions, healthcheck at docker servertypes in Gematik SW factory fails

Tiger expects that Docker Daemon starts the container locally. However, if this is not the case, you may use the environment variable TIGER_DOCKER_HOST to share on which server instance the container is started and the HealthcheckURL is adjusted accordingly. For purposes of the Gematik SW-factory, the following code snippet is recommended for the pipeline script:

stage('Test') {
    environment {
        TIGER_DOCKER_HOST = dockerGetCurrentHostname()
    }
    steps {
        mavenVerify(POM_PATH)
    }
}

FE03 Can I run a Docker image or CANOPY without the tiger-cloud-extension?

Yes. Since Tiger 4.3, tiger-testenv-mgr ships built-in docker and canopy server types (Testcontainers-backed, single-container scope). For a docker-compose-style multi-service env or Kubernetes/Helm, keep using tiger-cloud-extension; for ad-hoc images and CANOPY DNS interception, the in-tree types are enough.

servers:
  myProxy:
    type: tigerProxy
    tigerProxyConfiguration:
      adminPort: 9000
      proxyPort: 9090
  myCanopy:
    type: canopy
    canopy:
      image: gematik1/tiger-canopy-image:latest
      # tigerProxyUrl, controlMode and dependsUpon are auto-wired from myProxy
  app:
    type: docker
    docker:
      image: my-org/my-app:1.2.3
      exposedPorts: [8080]
      # dnsServers is auto-prepended with myCanopy's IP; opt out with injectDns: false
      waitStrategy: { kind: HTTP, httpPath: /health, timeoutSeconds: 60 }

See the tiger-testenv-mgr user-manual section "Built-in container server types" for the full configuration schema and the placeholders these types publish.

Workflow UI

FW01 In the workflow UI scenarios are listed twice and are refreshed the same time (as if they ran parallely)

Usually, this only happens when the test suite is started in intellij and TigerCucumberListener is delivered as a plugin in TigerCucumberListener. This is no longer necessary since v1.3 because the listener is added automatically. Due to this manual adjustment, two listeners are running that communicate the scenarios twice to the workflow UI. If this happens in a mvn call, please check the tiger-maven-plugin configuration or the generated driver classes in terms of additional plugins in CucumberOptions.

FW02 After having pressed shutdown in the workflow UI, I cannot see messages in RbelLog Details Pane anymore

By stopping the test runs, the workflow UI backend is terminated as well. You may recognize this by the light-red color of the side bar. However, navigating in the RbelLog Details Pane requires a running backend. In addition, RbelPath- and JEXL inspect dialogues are not working.

Other topics

FO01 How can I change the logging levels of loggers used by Tiger

Inside the tiger.yaml file, you can add a section logging.level: and add a list of packages / classes and the desired logging level.

logging:
  level:
    de.gematik.test.tiger.testenvmgr.TigerTestEnvMgr: TRACE
    de.gematik.test.tiger.lib.TigerDirector: TRACE
    de.gematik.test.tiger.proxy: TRACE
    localTigerProxy: TRACE

FO02 Docker container creation fails

Use the command below to remove all unused containers. Or look for containers starting with "tiger", stop and remove them.

docker system prune

Last resort:

netcfg -d

and restart docker

FO03 Adding alternative names programmatically throws SSLException

When using directly the method de.gematik.test.tiger.proxy.TigerProxy.addAlternativeName() to add multiple alternative names to the TLS certificate of the tiger proxy the following exception may come up:

12:17:48.604 [MockServer-EventLog13] ERROR o.mockserver.log.MockServerEventLog - 58165 exception creating SSL context for serverfailed to set certificate and key
javax.net.ssl.SSLException: failed to set certificate and key

The tiger proxy uses a mockserver internally which creates a SSLContext when handling the first request. Adding additional names after the first request will not update the created SSLContext and the exception will be thrown.

A workaround for this behaviour is to explicitly restart the internal mockserver after adding an alternative name. E.g.:

TigerProxy proxy = TigerDirector.getTigerTestEnvMgr().getLocalTigerProxyOrFail();
proxy.addAlternativeName(host);
proxy.restartMockserver();

FO04 How do I get rid of "alias hell" in my docker-compose setup?

If your test environment uses static networks.<net>.aliases (or extra dns: entries) just so a container thinks api.example.com lives at the Tiger proxy IP, you’ve probably hit the limits of that pattern: routing is fixed at compose-up time, every scenario change forces an environment restart, and debugging is painful.

The tiger-canopy module replaces that with a tiny programmable DNS server. Point your containers' dns: at it and it will:

  • answer queries for hostnames you have registered with the Tiger proxy IP,

  • forward everything else to the system upstream resolvers.

The list of registered hostnames is mutable at runtime via a REST API (/api/v1/proxied-hosts) and via Cucumber glue steps shipped in tiger-test-lib (CanopyGlue):

Given TGR set CANOPY base URL to http://canopy:8080
When  TGR add the following proxied hosts to CANOPY:
  | host             | matchType |
  | api.example.com  | EXACT     |
  | example.com      | SUFFIX    |
Then  TGR CANOPY contains proxied host api.example.com

See tiger-canopy/README.md for the full REST reference, configuration options and a ready-to-run docker-compose.example.yaml.