有什么方法可以对 xamarin.forms 应用程序进行单元测试并使用 c.i 的测试集。与应用中心?
Is there any way to unit test xamarin.forms app and use the test set for c.i. with app center?
我是 xamarin 表单测试和一般单元测试的新手。我已经为我的 xamarin.forms 应用程序创建了一个单元测试项目,我编写了一些基本的单元测试,我想知道我是否可以 运行 使用 appcenter 和 continuos 集成进行这些测试。
我只能在 windows 本地电脑上 运行 这些测试,但是我的 ci 服务器 运行 在 Mac 上,所以我想知道我可以使用什么方法来单元测试我的应用程序。
要在 AppCenter 中的 Xamarin 构建中 运行 进行单元测试,您可以使用 post-build 脚本。
您可以找到执行 NUnit 测试的示例 here, and more details on how to add a post-build script can be found here。
我们通过添加 Bash Shell 脚本并调用 nunit 控制台
设法 运行 单元测试
/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono ../../../../NUnit.Runners.2.6.3/tools/nunit-console.exe
APPName_Test/bin/Debug/APPName_Test.dll
稍后编辑:报告来自 vsts 的结果
我是 xamarin 表单测试和一般单元测试的新手。我已经为我的 xamarin.forms 应用程序创建了一个单元测试项目,我编写了一些基本的单元测试,我想知道我是否可以 运行 使用 appcenter 和 continuos 集成进行这些测试。 我只能在 windows 本地电脑上 运行 这些测试,但是我的 ci 服务器 运行 在 Mac 上,所以我想知道我可以使用什么方法来单元测试我的应用程序。
要在 AppCenter 中的 Xamarin 构建中 运行 进行单元测试,您可以使用 post-build 脚本。
您可以找到执行 NUnit 测试的示例 here, and more details on how to add a post-build script can be found here。
我们通过添加 Bash Shell 脚本并调用 nunit 控制台
设法 运行 单元测试/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono ../../../../NUnit.Runners.2.6.3/tools/nunit-console.exe
APPName_Test/bin/Debug/APPName_Test.dll
稍后编辑:报告来自 vsts 的结果