bartlomiej.n
bartlomiej.n

Reputation: 510

Effectively sharing test doubles between separate test targets

I have a workspace for an iOS application, which consists of the main application project and a couple of separate projects that build frameworks included by the main target. Each of these projects has its own separate unit test suite.

I'm looking for an efficient way to share test doubles between these test suites. Any ideas how to do it without extracting a separate test double framework, shared between test targets?

Upvotes: 0

Views: 197

Answers (1)

Jon Reid
Jon Reid

Reputation: 20980

A) (As you point out) Extract a framework containing the doubles.

or

B) Simply add the files to each test bundle. That is, they would be the same files underneath.

The advantage of B is its simplicity. One disadvantage is that, if you build each test bundle, you will end up building these test doubles twice.

Upvotes: 1

Related Questions