Skip to content

Instantly share code, notes, and snippets.

@denyszet
denyszet / TestRailObservation.swift
Created June 1, 2022 17:18 — forked from billylam/TestRailObservation.swift
Sample for pushing XCTest/XCUITest results to TestRail
//
// TestRailObservation.swift
//
import Foundation
import XCTest
class TestRailObservation: NSObject, XCTestObservation {
// Add a user / pass or key for testrail generation
var testrailUsername: String = ""
public class CustomMatchers {
public static Matcher<View> withBackground(final int resourceId) {
return new TypeSafeMatcher<View>() {
@Override
public boolean matchesSafely(View view) {
return sameBitmap(view.getContext(), view.getBackground(), resourceId);
}
@Override