Skip to content

Latest commit

 

History

History
115 lines (81 loc) · 4.52 KB

DevGuide.adoc

File metadata and controls

115 lines (81 loc) · 4.52 KB

Developer-Guide

Start Cucumber scenario within the IDE (IntelliJ IDEA)

In "run configuration":

  • set "main class" on io.cucumber.junit.TigerCucumberRunner

  • set the following "glue code packages"

net.serenitybdd.cucumber.actors
de.gematik.test.tiger.hooks
de.gematik.test.tiger.glue
de.gematik.tim.test.glue

The Tiger-Framework was used for the development of this testsuite. In the following link, you will find the Tiger-Manual for more information.

If the clean endpoints should also be triggered from IntelliJ, the run configuration must also include -Dcucumber.plugin=de.gematik.tim.test.glue.api.utils.cleaning.CucumberListener as a VM option.

Disable TLS

To disable TLS, do not set the environment variables, and delete lines 2 and 3 in tiger.yml.

Important
Line 1 "tigerProxy:" must remain.
tigerProxy:
  tls:
    forwardMutualTlsIdentity: "${TIM_KEYSTORE};${TIM_KEYSTORE_PW};pkcs12"

With this configuration, all links in combine_items.json must be set to http.

Cucumber-Test-Combinations-Maven-Plugin

The parameter plugin generates all possible combinations for each individual test case from the provided interfaces in combine_items.json ,based on the filters. For this, all templates from the test folder are copied to the build folder and filled with the respective tables. The processed files are used when the test suite is started.

With a small number of interfaces that lack sufficient variation in their properties, the plugin may quickly cause the build process to fail. To ignore this, the following steps can be configured.

Disable prepare-items (autofill combine_items.json)

By default, the plugin queries the info interface and adds necessary tags and properties. For more precise control, or if the info interface has not been fully implemented yet, the combine_items.json can be manually created and used. For this, Maven can be run with the disable-prepare-items profile.

maven clean install -P disable-prepare-items

Disable break

With the dont-break-preperation profile, the plugin can be configured to no longer stop the build process in case of errors. All possible information and combinations are generated. An error log can later be viewed at ./target/generated-combine/errorLog.txt .

Influence claim time

The parameter -DclaimDuration=<seconds> can be used to influence the duration for which a device should remain claimed. Only integer second values are allowed.

Parallel claims

The parameter -DclaimParallel=<true/false> can be used to specify whether claims should be executed in parallel. By default, this is disabled. Parallel claims can be disabled for individual test cases or feature files by tagging them with @NoParallel. This can be helpful if there are issues with claiming.

Testcase id

Every testcase run is identified with the testcase name and an id that identifies the specific run. This id is sent in every request in the header Test-Case-Id. It is build like <TestcaseId>/<TestrunUUID>.

Cleanup Trigger

The cleanup trigger is used to avoid data-trash , cause of broken testcases , in the database. It is triggered before every testcase by the api call "cleanup" tagged with signalTestStart. For more information see the API: testdriver.yaml All endpoints involved in this testcase will be triggered. If the testcase has no OrgAdmins, they will be filtered by the home-servers used in this testcase.

Known issues

  1. When generating the code from the test driver interface, it may occur that additional / are created in the request path. These can lead to incompatibilities. This can be circumvented on the test suite side by removing the leading / in the INFO_PATH and DEVICES_PATH of the TestdriverApiPath class.