wmontwe / hc-sdk-kmp-integration

HC SDK KMP integration test suite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HC SDK Integration Test Suite

Build Status

This is an integration of the D4L SDK for testing purposes.

A suite of UI tests to identify breaking changes and regressions by SDK version changes.

Requirements

  • Android 6.0 (API 23) to Android 12L (API 32)

  • Kotlin 1.6.21

  • Java 11

Dependencies

Usage

Before you start you need to add d4l-client-config-android.json and d4l-test-config-android.json files in the project root folder and add following content.

d4l-client-config-android.json needs to contain a config for every environment LOCAL, DEVELOPMENT, STAGING, SANDBOX, PRODUCTION.

Note
The CI expects this configuration from environment variables stored in GitHub secrets: D4L_CLIENT_CONFIG_ANDROID and D4L_CLIENT_CONFIG_IOS
// d4l-client-config-android.json
{
  "configs": {
    "LOCAL": {
      "id": "{CLIENT_ID}",
      "secret": "{CLIENT_SECRET}",
      "redirectScheme": "{CLIENT_REDIRECT_SCHEME}"
    },
    "DEVELOPMENT": {
      "id": "{CLIENT_ID}",
      "secret": "{CLIENT_SECRET}",
      "redirectScheme": "{CLIENT_REDIRECT_SCHEME}"
    }
  }
}
// d4l-test-config-android.json
{
  "user": {
    "email": "{USER_EMAIL}",
    "password": "{USER_PASSWORD}",
    "phoneCountryCode": "{USER_PHONE_COUNTRY_CODE}",
    "phoneLocalNumber": "{USER_PHONE_LOCAL_NUMBER}"
  },
   "sinch": {
      "servicePlanId": "{SERVICE_PLAN_ID}",
      "authToken": "{AUTH_TOKEN}"
    }
}

Run gradle wrapper task for connected tests:

./gradlew provideTestConfig
./gradlew connectedAndroidTest

Test suit

  • ✓ Login

  • ✓ Logout

  • ✓ AppData CRUD + count

  • ✓ FHIR 3 and FHIR 4 Document CRUD + count

About

HC SDK KMP integration test suite


Languages

Language:Kotlin 99.8%Language:Shell 0.2%