-
Notifications
You must be signed in to change notification settings - Fork 27
Organizing HTTP server
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.
- 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 intoAvito.app.zip
, butPlugins
subfolder is cleaned. -
UITests-Runner.app
(XCT runner app) bundle is zipped intoUITests-Runner.app.zip
, withUITests.xctest
bundle removed fromPlugins
folder and zipped into its individual ZIP file.
-
Unique build id is generated using
$ uuidgen
, e.g.E8CED8E8-DE83-46FE-AEE2-0A503E1C90C8
-
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
(andUnitTests.xctest.zip
,ComponentTests.xctest.zip
,UITests-Runner.app.zip
, etc.) -
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.