Skip to content

Organizing HTTP server

Vladislav Alekseev edited this page Jul 7, 2021 · 4 revisions

Since Emcee is a distributed test runner, it will need various artifacts (app bundle, test bundle, etc.) in order to run tests. These artifacts will be fetched as needed by worker machines. They should be available to be fetched after you schedule tests for execution.

In Avito, we use TeamCity as CI, and Artifactory as build artifacts storage. Below are our practices of organizing the storage.

  1. TeamCity firstly builds iOS app with all tests. Then it ZIPs these artifacts individually:
  • All test bundles in Avito.app/Plugins/ are zipped into individual archives, e.g. UnitTests.xctest.zip, ComponentTests.xctest.zip, Some-Module-Tests.xctest.zip, etc.

  • Avito.app is zipped into Avito.app.zip, but Plugins subfolder is cleaned.

  • UITests-Runner.app (XCT runner app) bundle is zipped into UITests-Runner.app.zip, with UITests.xctest bundle removed from Plugins folder and zipped into its individual ZIP file.

  1. Unique build id is generated using $ uuidgen, e.g. E8CED8E8-DE83-46FE-AEE2-0A503E1C90C8

  2. The artifacts above is uploaded to Artifactory server under build id folder: http://artifactory.example.com/ios-builds/E8CED8E8-DE83-46FE-AEE2-0A503E1C90C8/Avito.app.zip (and UnitTests.xctest.zip, ComponentTests.xctest.zip, UITests-Runner.app.zip, etc.)

  3. Then test arg file is generated in Python using the URLs that are unique to that particular build.

This flow allows to distinguish one build from others, avoid overwriting build artifacts from one build by artifacts from other build (Emcee caches URL contents on worker and it is important to not change URL contents). Zipping artifacts individually allows to speed up the download process: if you have multiple test targets, workers will only fetch artifacts that are required to run tests they are expected to run, and won't fetch artifacts that are not related to execution of a particular set of test.

Clone this wiki locally