diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 0092b49..7be5365 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -151,6 +151,8 @@ steps: - label: ":swift: Swift: XCTest (test-collector-swift)" command: "cd swift-xctest && bin/test" soft_fail: true + env: + BUILDKITE_ANALYTICS_TAGS: '{"test.framework.name":"xctest","language.name":"swift","custom.tag.from":"upload"}' plugins: - cluster-secrets#v1.0.0: variables: @@ -160,6 +162,7 @@ steps: propagate-environment: true environment: - BUILDKITE_ANALYTICS_TOKEN + - BUILDKITE_ANALYTICS_TAGS - BUILDKITE_ANALYTICS_DEBUG_ENABLED - label: ":android: Android" diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts index e4b68ab..06bea96 100644 --- a/android/app/build.gradle.kts +++ b/android/app/build.gradle.kts @@ -1,7 +1,7 @@ plugins { id("com.android.application") id("org.jetbrains.kotlin.android") - id("com.buildkite.test-collector-android.unit-test-collector-plugin") version "0.3.0" + id("com.buildkite.test-collector-android.unit-test-collector-plugin") version "0.4.0" } android { @@ -26,6 +26,12 @@ android { } } +buildkiteTestAnalytics { + tags["test.framework.name"] = "junit" + tags["language.name"] = "kotlin" + tags["custom.tag.from"] = "upload" +} + dependencies { testImplementation("junit:junit:4.13.2") } diff --git a/swift-xctest/Package.resolved b/swift-xctest/Package.resolved index a3016fb..5aba5dd 100644 --- a/swift-xctest/Package.resolved +++ b/swift-xctest/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/buildkite/test-collector-swift", "state" : { - "revision" : "261b2feaafd601e5b35edb68f402d34ad8210967", - "version" : "0.5.0" + "revision" : "dbb0f13987c3f9f54611aaf0ac0dc1085ebb5ea6", + "version" : "0.6.0" } } ], diff --git a/swift-xctest/Package.swift b/swift-xctest/Package.swift index fe1740f..bd3cf9c 100644 --- a/swift-xctest/Package.swift +++ b/swift-xctest/Package.swift @@ -10,7 +10,7 @@ let package = Package( .library(name: "ExampleLib", targets: ["ExampleLib"]) ], dependencies: [ - .package(url: "https://github.com/buildkite/test-collector-swift", from: "0.5.0") + .package(url: "https://github.com/buildkite/test-collector-swift", from: "0.6.0") ], targets: [ .target( diff --git a/swift-xctest/Tests/ExampleLibTests/PassingTests.swift b/swift-xctest/Tests/ExampleLibTests/PassingTests.swift index 3a81fc0..c111e93 100644 --- a/swift-xctest/Tests/ExampleLibTests/PassingTests.swift +++ b/swift-xctest/Tests/ExampleLibTests/PassingTests.swift @@ -1,8 +1,10 @@ +import Core import XCTest @testable import ExampleLib final class PassingTests: XCTestCase { func testAdd() throws { + self.tagExecution("custom.tag.from", "execution") XCTAssertEqual(ExampleLib().add(1, 2), 3) }