How to specify test category when running tests on Mobile Center?

Hi,
When I run tests on XTC, through command line, I just add --include and that's how I categorize my tests.
Is it possible to do this when running tests on Mobile Center acording that Mobile Center uses XTC?

Best Answers

Answers

  • EmrahDautbegovicEmrahDautbegovic USMember ✭✭
    edited August 2017

    @Glenn.Wilson Can you please help?

    The way I run tests on mobile azure is like:

    mobile-center test run uitest
    --app "my_app_name"
    --devices "b2865a59"
    --app-path "pathToFile.apk"
    --test-series "master"
    --locale "en_US"
    --build-dir "pathToUITestBuildDir"
    --token "my_token"

    For run on XTC, I enter:

    mono "path_to_testcloud.exe"
    submit "path_to_apk_or_ipa"
    "id"
    --devices "fa737019"
    --series "outset"
    --locale "en_US"
    --app-name "my_app_name"
    --user "my_email"
    --assembly-dir "pathToUITestBuildDir"
    --include "category_name"

    Is there any way to do something like --include "category_name" when running tests on mobile.azzure??

  • AnthonyMehallelAnthonyMehallel USMember ✭✭✭

    Hi @Aquablue ,

    Can you specify the version of appcenter cli

    Can you specify where you specify the parameter : --include-category "category_name"

    Thank you

  • AnthonyMehallelAnthonyMehallel USMember ✭✭✭

    Hi @BlankSparrow ,

    I would like to specify the Nunit Category when we run Xamarin.UITest from TFS to App Center :

    the Task "app center test" uses 2 command line, the first : appcenter test prepare uitest (it will create a manifest.json)

    and the second command line "appcenter run manifest" (we can not specify the parameter --include-category with the command line "appcenter run from the manifest")

    So the question is : how to specify the parameter include-category (as well as all the other parameters available for uitest ) in the manifest in order to the command line “appcenter run manifest” can use/read it ?

  • @BlankSparrow Thank you, this really works. Also, I want to add that important thing is to create a build with just Android or just iOS tests. In AbstractSetup, I have this:

    #if !RUN_IOS_ONLY
    [TestFixture(Platform.Android)]
    #endif
    
    #if !RUN_DROID_ONLY
    [TestFixture(Platform.iOS)]
    #endif
    

    and, when I build test, I do it with the following command:

    msbuild my-tests /p:DefineConstants=RUN_DROID_ONLY (only for Android)
    msbuild my-tests /p:DefineConstants=RUN_IOS_ONLY (only for iOS)

    And then, I am able to execute tests on appcentar without any issues.
    I hope this will be helpful to someone.

    Cheers

  • BlankSparrowBlankSparrow NZMember ✭✭

    @EmrahDautbegovic Glad I could help :smiley:.

    @AnthonyMehallel I haven't had any experience using a manifest to execute test run so I wont be able to add any input into your scenario.

    Saying that, I am now curious about them so I've sent a message off to the appcenter support chat to find out if there is any documentation that they have available.

Sign In or Register to comment.