Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.65 KB

testing.md

File metadata and controls

52 lines (41 loc) · 1.65 KB

Install development depencencies

To run the tests or type checks, you'd first have to install the development dependencies. This can be done with pipenv:

pipenv install -d

Tests

Tests are invoked using pytest framework:

pytest

Note that for the tests to run successfully, you'd have to define the following environment variables:

  • For App Store Connect:
    export TEST_APPLE_KEY_IDENTIFIER=...  # Key ID
    export TEST_APPLE_ISSUER_ID=...  # Issued ID
    And one of eithert
    export TEST_APPLE_PRIVATE_KEY_PATH=...  # Path to private key in .p8 format
    export TEST_APPLE_PRIVATE_KEY_CONTENT=...  # Content of .p8 private key
  • For Google Play:
    export TEST_GCLOUD_PACKAGE_NAME=... # Package name (Ex: com.google.example)'
    And one of either
    export TEST_GCLOUD_SERVICE_ACCOUNT_CREDENTIALS_PATH=... # Path to gcloud service account creedentials with `JSON` key type
    export TEST_GCLOUD_SERVICE_ACCOUNT_CREDENTIALS_CONTENT=... # Content of gcloud service account creedentials with `JSON` key type

Those can be obtained from App Store Connect -> Users and Access -> Keys. For more information follow Apple's official documentation: Creating API Keys for App Store Connect API.

Type checks

Static type checks are done using mypy:

MYPYPATH=stubs mypy src/codemagic