Running unit tests from all dependencies
I have an OSX application consisting from two projects. Both of them have unit tests. I can configure schema for main application to run also unit tests from dependent target in XCode (Product -> Scheme -> Edit Scheme -> Test -> +)
Is it possible to run all tests also from AppCode? I did not find how to, all I am able to do is to pick testing target from either main application or depenency.
Please sign in to leave a comment.
Hi, Pavel.
You can create two run configurations for each target, and then in one of the configurations add "Before launch" action that invokes the other target.
Vyacheslav, thank you for your reply.
I created 2 test configurations, added "Run Another Configuration" to main one to run also tests from static library, but it does nothing. No tests are executed, even tests from main app. I have cleaned the app and tried again. It prints in status bar Running Scripts..., but tests are not executed.
I have also tried to move library tests before Build and also added building of library. No success. It executes them properly only when I remove that added configuration.
I have AppCode 3.0.6.
Pavel
Turns out, this funcionality is broken in the current release. I apologize for giving you an advice without testing it first.
I've created a new issue on our tracker, please follow it to get updates on the progress.
No problem. Thank you.
Can you give us an update on this issue ? At the moment I have to switch constantly between my test target and app target for running the tests, which is quite annoying to be honest. Besides that, shouldn't this feature be marked 'essential' in the set of Test-features of Appcode ? What's the point of building your app without running existing (unit) tests ?