Mono for Android:哪些测试框架有效 [英] Mono for Android: Which Testing Frameworks work

查看:19
本文介绍了Mono for Android:哪些测试框架有效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为 Android VS2010 项目创建了一个 Mono 并添加了 NUnit 测试.

I have created a Mono for Android VS2010 project and added NUnit tests.

根据 Xamarin 的这篇文章,Android Mono 似乎不支持 NUnit:https://bugzilla.novell.com/show_bug.cgi?id=644813

It seems Mono for Android does not support NUnit according to this post from Xamarin: https://bugzilla.novell.com/show_bug.cgi?id=644813

是否有任何测试框架可以在 Mono for Android 项目中运行?

Are there any testing frameworks that do run when in a Mono for Android project?

推荐答案

不,nunit 不起作用,任何其他框架也不起作用.monodroid 和 monotouch 的目的是提供一个 .net 开发环境,让您可以轻松地在不同环境之间移植业务逻辑.因此,您无法真正测试 android/ios 特定代码,但您可以测试通用 .net 业务逻辑代码.在我编写的 monodroid 项目中,我在解决方案中创建了 3 个项目,一个是 android 项目,另一个是 .net 库,其中包含我所有的非 android 特定逻辑,最后一个项目是针对 .网络图书馆.然后我将我的逻辑代码文件添加到带有链接文件的 android 项目中.无法测试 monodroid 项目文件,但可以使用您选择的任何框架测试链接到 monodroid 项目的 .net 代码文件.

no, nunit does not work nor do any other frameworks. the intent of monodroid and monotouch is to provide a .net development environment that allows you to easily port business logic between different environments. as a result you can't really test android/ios specific code, but you can test generic .net business logic code. in the monodroid projects that i write, i create 3 projects in the solution, one is the android project, another is a .net library that holds all of my non-android specific logic and the final project is a nUnit test library against the .net library. I then add my logic code files into the android project with linked files. monodroid project files can not be tested, but .net codes files linked into monodroid projects can be tested with what ever framework you choose.

这篇关于Mono for Android:哪些测试框架有效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆