Unit test never runs

I am using Xcode 14.3.1 to develop and I have this unit test:

@testable import bimb_authenticate_ios
import XCTest
import RxSwift
import RxBlocking

final class BindingApiClientTests: XCTestCase {
    private var disposeBag = DisposeBag()

    override func setUpWithError() throws {
        // Put setup code here. This method is called before the invocation of each test method in the class.
        disposeBag = DisposeBag()
    }

    override func tearDownWithError() throws {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
    }

    func testPostInternetBankingCredentials_WhenSuccess() throws {
        XCTAssertEqual(1, 1)
//        let expectedParams = getExpectedIBCredsParams()
//        let expectedResponseModel = getExpectedIBCredentialsResponseModel()
//        let expectedData = try expectedResponseModel.jsonData() // Encodable to Data from JSON string
//        let expectedOutput = Single.just(expectedData)
//        let apiDataSource = MockDataSource(postOutputEvent: expectedOutput)
//        let sut = BindingApiClient(apiDataSource: apiDataSource)
//
//        let expectation = expectation(description: "Expect Success!")
//        var actualResponseModel: IBCredentialsResponseModel? = try sut
//            .postInternetBankingCredentials(with: expectedParams)
//            .debug()
//            .toBlocking()
//            .first()
//
////        sut.postInternetBankingCredentials(with: expectedParams)
////            .subscribe(onSuccess: {
////                actualResponseModel = $0
////                expectation.fulfill()
////            })
////            .disposed(by: disposeBag)
////
////        wait(for: [expectation], timeout: 0.1)
//        XCTAssertEqual(expectedResponseModel,
//                       actualResponseModel)
//        XCTAssertEqual(expectedParams.toJSONString(),
//                       apiDataSource.postParamsInput?.toJSONString())
//        XCTAssertTrue(apiDataSource.isPostCalled)
    }
}`

But it never run even though it only had one simple line, XCTAssertEqual(1, 1). It just started and will be processing ad infinitum. There is no log whatsoever except for the logs for successful compilations of pods and some swiftlint warnings. Can anybody help me?

Thanks.

Replies

BTW, this is my Podfile, if it has anything to do with it:

use_frameworks!
platform :ios, '11.0'

target 'bimb-authenticate-ios' do

  # Pods for bimb-authenticate-ios
  pod 'Rudder', '~> 1.15.1'
  pod 'RxSwift', '6.6.0'
  pod 'RxCocoa', '6.6.0'
  pod 'KeychainAccess'
  pod 'Swinject'
  pod 'SwiftOTP', :git => 'https://github.com/lachlanbell/SwiftOTP.git', :branch => 'swift-5.0-cryptoswift'
  pod "RecaptchaEnterprise", "18.3.0"
  pod 'RealmSwift', '~>10'
  pod "RxRealm"
  pod 'SwiftLint'
end

target 'bimb-authenticate-iosTests' do
  inherit! :complete
  # Pods for testing
  pod 'RxBlocking', '6.6.0'
  pod 'RxTest', '6.6.0'
end

target 'bimb-authenticate-iosUITests' do
  inherit! :complete
  # Pods for testing
  pod 'RxBlocking', '6.6.0'
  pod 'RxTest', '6.6.0'
end

# FORCE SET DEPLOYMENT TARGET TO 11.0 SINCE platform :ios, '11.0' DIDN'T SEEM TO DO ANYTHING!
post_install do |pi|
    pi.pods_project.targets.each do |t|
        t.build_configurations.each do |config|
            config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
        end
    end
end

It's okay now. I've fixed it by changing the simulator from iPhone 12 to iPhone 14. Weird.