Xamarin UI Test: Can I run tests without AppCenter?

Lukas Bajus 46 Reputation points
2021-06-28T08:47:50.51+00:00

Hi,
I have some tests written in Xamarin UI Test. I want to run them as a part of our build. Is it possible to run tests automatically and not using AppCenter? Like for example run emulator on server and then somehow execute tests on that emulator, using command line?

Thank you

Developer technologies .NET Xamarin
0 comments No comments
{count} votes

Accepted answer
  1. John Hair 371 Reputation points
    2021-07-02T06:56:17.39+00:00

    Yes we have UI tests running on a CI pipeline without using AppCenter.

    But no not with Octopus, but the process should be similar.

    I found a blog post on how to do this with Android and Azure DevOps, I'll see if I can dig it out and post the link here. You will then need to modify the process to work for your CI setup.

    EDIT: Here is the link https://medium.com/genetec-tech/android-ui-testing-in-azure-devops-81bbe7cea9fd

    Ignore the setup caching until the end (its optional), but using that post you should be able to download and install an AVD of your choice, run the UI tests and publish the results with screenshots, if required.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-06-29T01:55:07.057+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    You can use Xamarin.UITest to achieve test without AppCenter.

    Xamarin.UITest is a C# testing framework using NUnit for UI Acceptance Tests on iOS and Android apps. It integrates tightly with Xamarin.iOS and Xamarin.Android projects, but it can also be used with native iOS and Android projects. Xamarin.UITest is the Automation Library that allows the NUnit tests to execute on Android and iOS devices. The tests interact with the user interface as a user would: entering text, tapping buttons, and gestures - such as swipes.

    If you want to need a step by step blog or demo about it, you can Google following key words: Perform automated UI test xamarin forms FOO

    Best Regards,

    Leon Lu


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.