ios - Xcode does not run test targets in the order specified in Target Dependencies -
my ios project has 3 targets, main app target x, , 2 test targets t1 , t2. have specified following target dependencies in build phases: t1 depends on x, , t2 depends on x , t1. when run tests however, t2 runs before t1, resulting in test failures. in test navigator, t2 appear before t1, shouldn't tests run in order specified in target dependencies, instead of order listed in navigator? apart target dependencies, there other settings necessary might have missed?
also, have tried turning off "parallelize build" in edit schemes, didn't make differences.
i using xcode 7.2.
target dependencies specified in build phases determine order in xcode builds targets.
to change order in xcode runs test bundles in test action, you'll need change scheme settings. choose product > scheme > edit scheme... , select test action:
in there you'll find list of test bundles built separate test targets ("mac_calc_tests" , "samplecalctests" in screenshot). change order tests run in, drag bundles , down reorder list.
Comments
Post a Comment