Skip to content

Basic

Basic configuration #

In order to run tests using Emcee you have to define configurations for every test package in emceeplan. Each configuration must be populated at least with artifacts and devices.

tests:
  configurations:
    - platform: ios
      xcTestBundle: derivedData/Build/Products/Debug-iphonesimulator/EmceeSample.app/PlugIns/EmceeSampleHostedTests.xctest
      appBundle: derivedData/Build/Products/Debug-iphonesimulator/EmceeSample.app
      device:
        #...
tests:
  configurations:
    - platform: android
      appApk: /path/to/app-debug.apk
      testApk: /path/to/app-debug-androidTest.apk
      devices:
        #...

There are different build artifacts depending on platform. Proceed to platform specific doc to learn more:

You may have as many configurations as you want, e.g. exclusively for unit testing, smoke testing etc. As well as multiple emceeplan files, e.g. for every platform, product in monorepsitory.

Overriding defaults in specific configuration #

There are two places where you specify parameters for tests. First you define root defaults for all configurations and then override defaults in configurations if necessary. Emcee provides its own defaults that will be used if root defaults and configution parameters are not set.

That is argument selection flow is as following:

  • configuration specific value will be taken if set
  • root level default will be taken if set
  • Emcee defaults will be taken

Info

Keep in mind that dictionaries and arrays in root defaults get extended by values from specific configuration.

tests:
  environment:
    key1: value1
  retryConfiguration:
    retries: 1

  configurations:
    - platform: ios
      xcTestBundle: derivedData/Build/Products/Debug-iphonesimulator/EmceeSample.app/PlugIns/EmceeSampleHostedTests.xctest
      appBundle: derivedData/Build/Products/Debug-iphonesimulator/EmceeSample.app
    - platform: ios
      xcTestBundle: derivedData/Build/Products/Debug-iphonesimulator/EmceeSampleUITests-Runner.app/PlugIns/EmceeSampleUITests.xctest
      appBundle: derivedData/Build/Products/Debug-iphonesimulator/EmceeSample.app
      runnerBundle: derivedData/Build/Products/Debug-iphonesimulator/EmceeSampleUITests-Runner.app
      retryConfiguration:
        retries: 2
    - platform: android
      appApk: /path/to/app-debug.apk
      testApk: /path/to/app-debug-androidTest.apk
      environment:
        key2: value2

In example above we set root defaults for enviromnent and retries. Then we increased retries for ios ui tests and extended android environment with key2: value2 variable.

Test parameters#

All test parameters and their default values you can find on dedicated pages: