Unit Test App (Android) Tests are not shown in Test Explorer

teoman-shipahiteoman-shipahi USMember ✭✭
edited May 2017 in Xamarin.Android

Hello,

For my existing Xamarin.Android project, I wanted add Unit Tests.

I created new project from template as below;

I also installed required packages;

Here is my sample test class;

After I successfully build my test project, "LoadNewsCategoriesTest" method does not appear in Test Explorer.
But if I build entire solution, then only test methods from MsTest projects appear, but no tests shown from Xamarin.Android.Test projects.

Am I missing something here?

Posts

  • SuedevSuedev USMember

    I see there is no answer here. I am having the same issue 6 months later.

  • ImRichardBosImRichardBos NLMember ✭✭

    If you want to run you're unit tests from the test explorer, you need a .Net Framework unit test project, which looks like the top item in you're screenshot.
    What I have in my current project 3 test projects:

    • An Android test project
    • A .Net test project
    • A Shared project
      Then create your unit tests in the shared project and build the .Net project. Your test explorer should now see the unit tests.
      And if you need to test something platform specific to android, you run the tests from the android test project.

    -Richard

  • AyhamNasserAyhamNasser LBMember ✭✭

    @teoman-shipahi Hi, I have vs2017 andi android UI test not appear how you solve this issue

Sign In or Register to comment.