# Disable uitests for ios, do unittests only

**URL:** <https://discuss.bitrise.io/t/disable-uitests-for-ios-do-unittests-only/1817>\
**Category:** Question & Answer\
**Tags:** ios, testing\
**Created:** [May 23, 2017, 3:50pm UTC](https://discuss.bitrise.io/t/disable-uitests-for-ios-do-unittests-only/1817 "2017-05-23T15:50:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![finekost](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@finekost](https://discuss.bitrise.io/u/finekost)\
**Post date:** [May 23, 2017, 3:50pm UTC](https://discuss.bitrise.io/t/disable-uitests-for-ios-do-unittests-only/1817/1 "2017-05-23T15:50:26Z")

</div>

Hi  
i cant find a way to run unittests only. i know its possible via xcode commandline.

can anybody point me into the right direction?

thanks  
alex

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 23, 2017, 4:13pm UTC](https://discuss.bitrise.io/t/disable-uitests-for-ios-do-unittests-only/1817/2 "2017-05-23T16:13:17Z")

</div>

Hi @finekost,

Thanks for asking this here!

> [@finekost](#):
>
> i know its possible via xcode commandline.

Can you share the related `xcodebuild` parameter? As far as I know there is no parameter for this; whether the UI tests are executed depends on your Scheme’s configuration. You can enable and disable tests for schemes, so you can e.g. have a Scheme with only UI and another one with only Unit tests enabled, or you can also run just parts of the test suite. And of course you can set the Scheme on [bitrise.io](http://bitrise.io), for every Xcode step separately if you want to.

If there’s a command line option to disable UI/unit tests please let us know, we’d be definitely interested in adding it to the Xcode Test step as an option!

---

<div class="post-metadata">

**Author:** ![finekost](https://avatars.discourse-cdn.com/v4/letter/f/edb3f5/32.png) [@finekost](https://discuss.bitrise.io/u/finekost)\
**Post date:** [May 24, 2017, 8:59am UTC](https://discuss.bitrise.io/t/disable-uitests-for-ios-do-unittests-only/1817/3 "2017-05-24T08:59:31Z")

</div>

hi there,  
i suppose you are right / this was bad worded by me. sorry!  
thanks for pointing out “scheme” this should do.

there is a way for running individual test, but you need a script to loop / split them up.  
we did this + fastlane for a rather large project where uitests got flaky.

thanks again.  
alex

> <https://stackoverflow.com/questions/35166214/running-individual-xctest-ui-unit-test-cases-for-ios-apps-from-the-command-li>

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 24, 2017, 9:08am UTC](https://discuss.bitrise.io/t/disable-uitests-for-ios-do-unittests-only/1817/4 "2017-05-24T09:08:52Z")

</div>

You’re right and thanks for the link! It also includes screenshots about what I mentioned, enabling and disabling tests for a specific scheme ([https://stackoverflow.com/a/35184012/974381](https://stackoverflow.com/a/35184012/974381))

---

<div class="post-metadata">

**Author:** ![wristbands](https://avatars.discourse-cdn.com/v4/letter/w/41988e/32.png) [@wristbands](https://discuss.bitrise.io/u/wristbands)\
**Post date:** [August 30, 2021, 10:26pm UTC](https://discuss.bitrise.io/t/disable-uitests-for-ios-do-unittests-only/1817/5 "2021-08-30T22:26:00Z")

</div>

Nowadays, it appears the best way to do this is to set up **Test Plans** , as explained [here](https://www.raywenderlich.com/10212963-xcode-test-plans-for-ios-getting-started). Then, to run just the Test Plan containing your unit tests via the command line, see [this article](https://medium.com/trendyol-tech/get-the-most-out-of-ui-tests-with-xcode-test-plans-d089a2252ba2).
