Class TigerGlue

java.lang.Object
de.gematik.test.tiger.glue.TigerGlue

public class TigerGlue extends Object
  • Constructor Details

  • Method Details

    • ctxtISetGlobalVariableTo

      @Wenn("TGR setze globale Variable {tigerResolvedString} auf {tigerResolvedString}") @When("TGR set global variable {tigerResolvedString} to {tigerResolvedString}") public void ctxtISetGlobalVariableTo(String key, String value)
      Sets the given key to the given value in the global configuration store. Variable substitution is performed.
      Parameters:
      key - key of the context
      value - value for the context entry with given key
    • ctxtISetLocalVariableTo

      @Wenn("TGR setze lokale Variable {tigerResolvedString} auf {tigerResolvedString}") @When("TGR set local variable {tigerResolvedString} to {tigerResolvedString}") public void ctxtISetLocalVariableTo(String key, String value)
      Sets the given key to the given value in the global configuration store. Variable substitution is performed. This value will only be available in the given scenario being clear up after the scenario run is finished.
      Parameters:
      key - key of the context
      value - value for the context entry with given key
    • setFeatureVariable

      @Wenn("TGR setze lokale Feature Variable {tigerResolvedString} auf {tigerResolvedString}") @When("TGR set local feature variable {tigerResolvedString} to {tigerResolvedString}") public void setFeatureVariable(String key, String value)
    • ctxtAssertVariableMatches

      @Dann("TGR pr\u00fcfe Variable {tigerResolvedString} stimmt \u00fcberein mit {tigerResolvedString}") @Then("TGR assert variable {tigerResolvedString} matches {tigerResolvedString}") public void ctxtAssertVariableMatches(String key, String regex)
      asserts that value with given key either equals or matches (regex) the given regex string. Variable substitution is performed. This checks both global and local variables!

      Parameters:
      key - key of entry to check
      regex - regular expression (or equals string) to compare the value of the entry to
    • ctxtAssertVariableUnknown

      @Dann("TGR pr\u00fcfe Variable {tigerResolvedString} ist unbekannt") @Then("TGR assert variable {tigerResolvedString} is unknown") public void ctxtAssertVariableUnknown(String key)
      asserts that value of context entry with given key either equals or matches (regex) the given regex string. Variable substitution is performed.

      Special values can be used:

      Parameters:
      key - key of entry to check
    • tgrShowColoredBanner

      @Gegebensei("TGR zeige {word} Banner {tigerResolvedString}") @Given("TGR show {word} banner {tigerResolvedString}") public void tgrShowColoredBanner(String color, String text)
    • tgrShowColoredText

      @Gegebensei("TGR zeige {word} Text {tigerResolvedString}") @Given("TGR show {word} text {tigerResolvedString}") public void tgrShowColoredText(String color, String text)
    • tgrIWantToShowBanner

      @Gegebensei("TGR zeige Banner {tigerResolvedString}") @Given("TGR show banner {tigerResolvedString}") public void tgrIWantToShowBanner(String text)
    • tgrWaitForUserAbort

      @When("TGR wait for user abort") @Wenn("TGR warte auf Abbruch") public void tgrWaitForUserAbort()
      This step aborts the test after user acknowledgement.
    • tgrPauseExecution

      @When("TGR pause test run execution") @Wenn("TGR pausiere Testausf\u00fchrung") public void tgrPauseExecution()
      Pauses the validation test suite. Please note, these steps are only modified for the Workflow UI and don't work on a regular console (no failure, there is just no pause).
    • tgrPauseExecutionWithMessage

      @When("TGR pause test run execution with message {string}") @Wenn("TGR pausiere Testausf\u00fchrung mit Nachricht {string}") public void tgrPauseExecutionWithMessage(String message)
      Pauses the validation test suite with a message. Please note, these steps are only modified for the Workflow UI and don't work on a regular console (no failure, there is just no popup / pause).
      Parameters:
      message - message to be displayed in the Workflow UI.
    • tgrPauseExecutionWithMessageAndErrorMessage

      @When("TGR pause test run execution with message {tigerResolvedString} and message in case of error {tigerResolvedString}") @Wenn("TGR pausiere Testausf\u00fchrung mit Nachricht {tigerResolvedString} und Meldung im Fehlerfall {tigerResolvedString}") public void tgrPauseExecutionWithMessageAndErrorMessage(String message, String errorMessage)
      Pauses the validation test suite with a message shown and the option to either continue or fail with the given error message. Please note, these steps are only modified for the Workflow UI and don't work on a regular console (no failure, there is just no popup / pause).
      Parameters:
      message - message to be displayed in the Workflow UI.
    • tgrShowHtmlNotification

      @When("TGR show HTML Notification:") @Wenn("TGR zeige HTML Notification:") public void tgrShowHtmlNotification(String message)
    • tgrAssertMatches

      @When("TGR assert {tigerResolvedString} matches {tigerResolvedString}") @Dann("TGR pr\u00fcfe das {tigerResolvedString} mit {tigerResolvedString} \u00fcberein stimmt") public void tgrAssertMatches(String value1, String value2)
    • printVariable

      @Dann("TGR gebe variable {tigerResolvedString} aus") @Then("TGR print variable {tigerResolvedString}") public void printVariable(String key)
      Prints the value of the given variable to the System-out
    • tgrStopServer

      @Given("TGR stop server {tigerResolvedString}") @Gegebensei("TGR stoppe Server {tigerResolvedString}") public void tgrStopServer(String servername)
      Stops the given server. If the server is not running or the server is not found, an exception is thrown.
      Parameters:
      servername - The server to be stopped.
    • tgrStartServer

      @Given("TGR start server {tigerResolvedString}") @Gegebensei("TGR starte Server {tigerResolvedString}") public void tgrStartServer(String servername)
      Starts the given server. If the server is already running or the server is not found, an exception is thrown.
      Parameters:
      servername - The server to be started.
    • tgrSaveTigerGlobalConfigurationToFile

      @Given("TGR save TigerGlobalConfiguration to file {tigerResolvedString}") @Gegebensei("TGR speichere TigerGlobalConfiguration in Datei {tigerResolvedString}") public void tgrSaveTigerGlobalConfigurationToFile(String filename) throws IOException
      Saves all the values of the Tiger Global Configuration in the given file formatted as yaml.

      ATTENTION: If the file already exists it will be overwritten!

      Parameters:
      filename - the file to save the configuration to
      Throws:
      IOException - if an I/ O error occurs writing to or creating the file
    • tgrLoadTigerGlobalConfigurationFromFile

      @Given("TGR load TigerGlobalConfiguration from file {tigerResolvedString}") @Gegebensei("TGR lade TigerGlobalConfiguration aus Datei {tigerResolvedString}") public void tgrLoadTigerGlobalConfigurationFromFile(String filename) throws IOException
      Loads the Tiger Global Configuration from the given file. The file must be formatted as yaml. All previous values in the configuration will be cleared and only the values from the file will end up in the configuration.
      Parameters:
      filename - the file to load the configuration from
      Throws:
      IOException - if an I/O error occurs reading the file