Forum Xamarin Test Cloud (Read Only)

How can i run my entire uitest suite for only one platform from the IDE?

PeterSimonsPeterSimons GBMember ✭✭

When i build my UITests the unit test pad in the IDE looks like this:

but I have no way of running all the tests that appear in the pad but for a specific platform is Android or iOS. does anyone know how to achieve this?

I thought I could achieve it with the "Run with custom parameters" but there is no documentation for it anywhere and I don't know what I'm doing in there


  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    Easiest way is to comment out the [TestFixture] attribute at the beginning for the one that you don't want to run.

    Alternately you can create Playlists separately for Android and iOS. Unfortunately the TestExplorer doesn't provide any clue on which test is Android one or iOS one. So I follow the following procedure to create the two playlists:

    1. First comment out one of the [TestFixture] attribute.
    2. Then Build the solution. That will show the list of tests for one platform only.
    3. Now do "Run All". It will be better if you run all of them successfully.
    4. Then select all of the tests listed.
    5. Then right click on the selection and go to Add to Playlist -> New Playlist. Name the playlist with the solution name and the platform name.
    6. Now remove the comment on the [TestFixture].
    7. Again Build the solution.
    8. Now all those new platform tests will be listed under "Not Run Tests".
    9. Select all those 'Not Run Tests' and add them to another new playlist.

    But one thing I noticed is that these playlists little buggy. Many times I had to recreate these lists.

  • PeterSimonsPeterSimons GBMember ✭✭
    edited October 2017

    Hi, thanks for your response but i dont have an option to add to playlist on VS for Mac.

    I only have the following right click options:

    I also don't have separate tests for each platform, all my tests are cross platform test. I have moved the app Initializer code to a separate class and all my test classes inherit from that in order to know that the test should run on both platforms without needing lots of boiler plate at the top of every test file.

    So there isn't separate [TestFixture] to be removed from each test/test group

  • PeterSimonsPeterSimons GBMember ✭✭


    anyone else have any ideas on how i could achieve this?

Sign In or Register to comment.