Draft
Conversation
Switch both collector dependencies to their respective pda/add-tagging-support branches so we can test unreleased tagging support: - Android: clone test-collector-android PR branch and publishToMavenLocal, use 0.3.0-SNAPSHOT with mavenLocal() repositories - Swift: use branch dependency instead of version-pinned dependency, remove Package.resolved to allow fresh resolution This commit can be reverted independently once the collector PRs are merged and new versions are released. Refs: - buildkite/test-collector-android#28 - buildkite/test-collector-swift#69 Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c5691-d421-721c-adb4-df2a4b312a32
Android (unit tests):
- Upload-level tags via Gradle DSL: buildkiteTestAnalytics { tags[...] }
Sets test.framework.name=junit and custom.tag.from=upload
Swift (XCTest):
- Upload-level tags via BUILDKITE_ANALYTICS_TAGS env var in pipeline
Sets test.framework.name=xctest and custom.tag.from=upload
- Execution-level tag via self.tagExecution() XCTestCase extension
Sets custom.tag.from=execution on testAdd
Follows the same tagging patterns used by the ruby, python, and JS examples.
Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c5691-d421-721c-adb4-df2a4b312a32
Amp-Thread-ID: https://ampcode.com/threads/T-019c5691-d421-721c-adb4-df2a4b312a32 Co-authored-by: Amp <amp@ampcode.com>
Demonstrate execution-level tagging via self.tagExecution() on testAdd. Requires import Core since the XCTestCase tagging extension lives in the Core module of test-collector-swift (not re-exported by BuildkiteTestCollector). Android unit tests don't support execution-level tagging yet — the UnitTestListener doesn't bind the observer to BuildkiteExecutionTags, and BuildkiteExecutionTags is in the instrumented-test-collector module which is separate from the unit-test-collector.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Demonstrate upload-level and execution-level tagging in the Android and Swift examples.
Changes
buildkiteTestAnalytics { tags[…] }) fortest.framework.name,language.name, andcustom.tag.fromBUILDKITE_ANALYTICS_TAGSenv var in pipeline, and execution-level tagging viaself.tagExecution()XCTestCase extension ontestAddBoth collector dependencies currently point at unreleased tagging branches rather than published versions. This will be reverted before merge, once the following PRs are merged and released:
Android additionally clones and publishes the collector to Maven Local at build time (
android/bin/test).