Skip to content

About

Appium 2.0, CSharp and MSTest framework.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

41 Commits

Folders and files

Repository files navigation


Logo

Mobile testing using Appium 2.0 and CSharp

Mobile (real devices and emulators) testing using Appium 2.0+, VS Code, CSharp and MSTest framework.
Explore the docs »
· Report Bug · Request Feature

GitHub issues GitHub pull requests GitHub stars
Table of Contents
  1. About The Project
  2. Getting Started
  3. Quick start
  4. How to generate allure report
  5. License
  6. Contact

About The Project

The tests are created in Visual Studio Code using MSTest (test framework for .NET applications).

appium-2.0 sharp net vscode mstest

AUT #1 is a native Huawei calculator (com.android.calculator2). Tested on real android device ( "locale":"de_DE", "manufacturer":"HUAWEI", "model":"ANE-LX1", "platformVersion":"9", ).

AUT #2 is a com.android.settings. Tested on emulator-5554 ( "locale":"en_EN", "platformName": "Android", "platformVersion":"13", ).

AUT #3 is a com.android.chrome. Tested on emulator-5554 ( "locale":"en_EN", "platformName": "Android", ).

Built With

(back to top)

Getting Started

Prerequisites

Necessary tools and packages:

  • Visual Studio Code with C# Dev Kit extension
  • node
  • npm
  • jdk
  • Appium 2.0+ with uiautomator2 and chromedriver
  • Appium-Inspector
  • appium-doctor (optional)
  • Android Studio (AVD)
  • allure-commandline 2.34.1+
  • net 8.0

Used packages:

  • Appium.WebDriver (e.g., 8.0.0)
  • Newtonsoft.Json (e.g., 13.0.3)

(back to top)

Quick start

  1. Open the project and build it.
  2. Create the AVD - an emulator with Android 13 (using Android Studio).
  3. Go to section "Testing" and run "EmulatorUnitTests" module.

How to generate allure report

  1. Build the project.
  2. Generate .trx report using Microsoft.Testing.Extensions.TrxReport: (!) Make sure the path and framework version (net8.0) match your build output. Run this command from the root of your workspace.
// to run only the Settings test from MSTestProject.dll with the trx-logger:
dotnet test MSTestProject/bin/Debug/net8.0/MSTestProject.dll --filter "Name=Settings" --logger:trx

trx-file is created at "your\path\to\appium2-CSharp\TestResults"

(!) There is no NuGet package to add for MSTest Allure integration. The only way is to use the allure-commandline to generate report from trx-file.

  1. To generate an Allure report from the .trx file (the test result format from MSTest), follow these steps: A1) Install allure-commandline:
npm install -g allure-commandline

A2) Then generate the report:

// allure generate <allure-results_folder>
allure generate "D:\git\appium2-CSharp\TestResults\"

A3) Open the report:

// allure open <output_folder>
allure open "D:\git\appium2-CSharp\TestResults\allure-report\"

(back to top)

License

License Distributed under the Apache 2.0 License. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: link

(back to top)

About

Appium 2.0, CSharp and MSTest framework.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages