Skip to content

Run End-to-End Tests

Our End-to-End test is testing the workflow of the data transaction.

Run local E2E test

  • Provide the following environment variables to the test, e.g. by editing the Run/Debug configuration of IntelliJ:
    CONSUMER_URL=https://localhost:12345;
    PROVIDER_URL=https://localhost:12346; TEST_MODE=tilt;

Run E2E test against a remote cluster

  • Open Git Bash in the cluster/scripts folder of the trustee-platform repository
  • Set the context of the external cluster as the kubectl default context
./kubeconfig.sh <cloud_provider> <cluster_name>
  • Set up the port forward and certificate. The context name of the external cluster is required, for example eurodat-dev-ext.
./port_forward_e2e.sh -c <context>
  • Provide the following environment variables to the test, e.g. by editing the Run/Debug configuration of IntelliJ:
    CONSUMER_URL=https://localhost:12347;
    PROVIDER_URL=https://localhost:12348;

An abstract Illustration of our E2E test

sequenceDiagram
    participant WC as Workflows Controller
    participant TS as Transaction Store
    participant APS as EuroDaT AppStore
    participant EC as EuroDaT Controller
    participant KC as Keycloak
    participant CB as Consumer Backend

    activate CB
    CB->>+EC: register as client (done before start of test)
    EC-->>-CB: 
    CB->>+KC: use own secret to obtain access token
    KC-->>-CB: 
    CB->>+EC: startTransaction(AppRequest)
    EC->>+APS: find app
    alt app does not exists
    APS-->>EC: null
    EC-->>CB: 404 Not found
    else app found 
    APS-->>EC: app
    deactivate APS
    EC->>+TS: create new transaction
    TS-->>-EC: transaction
    EC-->>-CB: transaction id
    end
    CB->>+EC: startWorkflow(transactionId, workflowDefinitionId)
    EC->>+TS: find transaction
    TS-->>-EC: transaction
    EC->>+APS: find app to transaction id
    APS-->>-EC: app (contains workflow)
    opt transaction or app not found<br>or workflow not part of app
    EC-->>CB: 404 Not found
    end
    EC->>+WC: submit workflow
    WC-->>EC: 
    EC-->>CB: WorkflowStartResponse
    CB->>+EC: Credential Request 
    EC->>-CB: Credentials from Vault
    CB-->+EC: endTransaction(transactionId)
    EC->>+APS: find app
    alt app does not exists
    APS-->>EC: null
    EC-->>CB: 404 Not found
    else app found
    APS-->>EC: app
    deactivate APS
    EC->>+TS: end transaction
    TS-->>-EC: transaction with endtime
    EC-->>-CB: transaction
    end
    deactivate EC
    deactivate WC
    deactivate CB