MobileNativeFoundation / bluepill

Bluepill is a reliable iOS testing tool that runs UI tests using multiple simulators on a single machine
BSD 2-Clause "Simplified" License
3.18k stars 231 forks source link

`BPTestCase` doesn't keep track of which tests are Objective-C and which are Swift #492

Closed ob closed 2 years ago

ob commented 3 years ago

As part of #488 we need to know which tests are Objective-C and which tests are Swift. Unfortunately, at the point where we know we don't record that information, we only save an NSString: TestClass/TestName. The two BPConfiguration fields testCasesToRun and testCasesToSkip here only save NSStrings as well.

I see two options for tackling this:

  1. We can change the string that we save. E.g. for Objective-C we can still save TestClass/TestName but for Swift we could save TestClass/TestName(), which I think is fairly conventional.
  2. We could add an isSwift field to BPTestCase and weave the change in type from NSString to BPTestCase throughout all the use cases of BPConfiguration's testCasesToSkip and testCasesToRun

I think No 1 is relatively easy but it might break consumers of Bluepill's output.

It might also be worth thinking how we want to change the tracing profile and JUnit test results to incorporate this information.

ob commented 2 years ago

We went with #1.