Skip to content

Emcee 18 — Resurrecting the Clones and Pluggables

Compare
Choose a tag to compare
@ishutinvv ishutinvv released this 23 Jun 16:00
· 16 commits to master since this release

18th release is concentrated on fixing bugs, speeding up things, and separating the functionality between features which become available after purchasing a licence and always-free version.

Emcee now has paid version

Starting from version 17, Emcee is distributed as-is as a closed source project and available in a form of prebuilt binaries. Version 18 goes beyond this and introduces two distinct products: free Emcee and paid Emcee.

Free version (available as a download on Github) allows you to test the product with up to 3 workers, however, you'll need to buy licenses for some richer functionality like:

  • Allowing to use more than 3 workers
  • For a technical support
  • For EmceeAdmin GUI app
  • For getting things done that you want to see in Emcee sooner than later.

Main functionality remains available in free version:

  • For using plugins in your environment
  • For using analytics, such as grafana, statsd, and kibana
  • For a bit richer test discovery flows, such as discovering via runtime

Some notes about the current Github repository

The current source code has been frozen from April 2022, which was version 16. We will keep it available as is, and we're not planning on removing it. All made forks will still be present obviously as well, as we can't control them.

Version 17 is closed source, yet fully functional. You can use it without any limitations as well.

We haven't developed any plans on upstreaming changes from v17 into open source yet, however, we are considering it.

Automatic Job Deletion

This is huge one and helpful. Emcee now tracks if job is needed at all, and automatically deletes it if it is not needed to run anymore. This helps on CI: when you cancel the test run, job gets deleted automatically.
Tech note: previously Emcee client process issued a /jobDelete request which sometimes could get lost; now queue itself tracks all jobs.

Worker Resurrection

Emcee now attempts to restart its workers in case if they die. So if you decided to reboot your machine, or if it kernel panics, it will become a worker automatically.

Simulator Cloning

Emcee worker can now clone simulators instead of booting a new one. This speeds up creation quite a bit, and saves disk space. Emcee will clone any previously shut down simulator it booted. If Emcee never booted suitable simulator, it will create one instead. We advise to use smaller values of automaticSimulatorShutdown and automaticSimulatorDelete settings, like 120 seconds, to have better effect of simulator cloning.
As an example, booting a new simulator can take 1-2 minutes easily, but cloning and booting takes around 40 seconds.

Plugins are back!

You can use the new, a little simplified plugin SDK which is available here:
https://github.com/avito-tech/EmceePluginSupport

It's easier to wire up everything, as there are only two exposed targets now: EmceePlugin and EmceePluginModels.

Boilerplate code has been reduced just to:

let plugin = try Plugin { (event: PluginAppleTestEvent) in
    // process an event
}
plugin.join()

Bugs and small features and changes

  • Emcee now uses socket API to talk to graphite and statsd instead of state of the art OutputStream APIs. Users complained about crashes related to graphite, and this change should help.
  • You can query global queue state via /globalQueueState. Maybe this will be helpful for you to debug how queue is being formed when you submit your jobs.
  • Worker ID is exposed as capability now, allowing you to pin your tests to a specific machine. Capability name is emcee.workerid and the value is actually worker ID.
  • --device and --runtime arguments now accept only fully qualified Core Simulator IDs, e.g. com.apple.CoreSimulator.SimRuntime.iOS-16-4 and com.apple.CoreSimulator.SimDeviceType.iPhone-14. Please refer to xcrun simctl list for more examples.
  • If you want to set environment variables for a test or app while using runTests command, set them in the calling environment with a EMCEE_ prefix.
  • CPU architecture is now exposed as worker capability, allowing you to pin your tests to the machine with specific CPU arch. The key is emcee.cpu.architecture, the value is CPU arch returned by uname -a, e.g. arm64.
  • testFinished event is now correctly delivered to plugins when tests times out.
  • If plugin fails to start, error message will contain its standard output and error for debugging purposes.
  • Emcee now deletes its temporary xcresult storage after test run finishes.
  • You can now specify range of ports that workers can utilize. Queue server config has a new field workerPortRange which controls exactly that. You can also set queue port range via queuePortRange.
  • New command discoverAppleTests lets you run test discovery much easier than before, without composing a test arg file
  • Speaking of test arg files, they are gone from a free version of Emcee. We decided to keep them for paid release only, as they provide more flexibility.
  • We are happy to say Version 18 supports macOS Ventura. Version 17 does not support Ventura.

Join our Telegram channels!

A decent place to discuss knowledge about Emcee and obtain a licence!