且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio 2017中的Xamarin(Android)单元测试

更新时间:2023-02-27 11:37:22

测试分为三个基本级别:

There are three basic levels of testing:


  • 这里没有什么新鲜的东西,这与.Net程序员长期以来所做的测试相同并且与Xamarin平台框架无关

注意:这些测试与完全不相关 Xamarin.Android | iOS | Mac

Note: These tests are totally independent of Xamarin.Android|iOS|Mac

注意: NUnit,XUnit等的设备测试包装器。Xamarin包含一个 NUnitLite 版本,该版本可在 Android 和 iOS 并提供设备特定的UI来运行这些测试。 Xamarin的模板可为Android或iOS创建 Unit Test App 项目。

Note: There are multiple on device testing wrappers for NUnit, XUnit, etc... Xamarin includes a NUnitLite version that runs on Android and iOS and that provide a device specific UI to run those tests. Xamarin has templates that create a Unit Test App project for Android or iOS.

注意:这些测试可以包含平台相关的功能(网络,蓝牙,GPS,SMS等...,但不包括与GUI相关的测试),还可以引用用PCL-编写的Nunit [Test] 基于程序集或平台特定的库。

Note: These tests can include platform dependent features (Networking, Bluetooth, GPS, SMS, etc... but no GUI related tests) and can also reference Nunit [Test]s written in PCL-based assemblies or platform-specific libraries.

  • Xamarin.iOS Unit Testing
  • Xamarin.Mac Unit Testing via GUIUnit
  • Xamarin.Android Setup and Automating
  • xUnit.net Runners for Devices
  • NUnit test runners for Xamarin and mobile devices

由Casabash / Appium / ...驱动的应用程序中UI元素测试及其对输入(触摸)事件的反应。

A Casabash/Appium/... driven tests of the UI elements in your application and their reaction to input (touch) events.


  • 测试云/ Mobile Center和/或其他本地,公共或私有移动测试云

  • Test Cloud/Mobile Center and/or other local, public or private mobile test clouds

Xamarin测试云