如何自动对微软Surface非交互式测试 [英] How to automate non-interactive tests on Microsoft Surface

查看:179
本文介绍了如何自动对微软Surface非交互式测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一套,我们要对微软Surface(ARM版本)运行测试(测试案例的本地库)。这是很容易用手从Visual Studio这样做。但是,我们希望这个过程中,我们可以编译,安装,运行和收集的命令行(例如,从詹金斯CI)输出的方式自动完成。

We have a suite of tests (test cases for a native library) that we want to run on Microsoft Surface (ARM version). It is easy to do it by hand from Visual Studio. However, we would like to automate the process in a way that we can compile, install, run and collect the output from command line (e.g. from Jenkins CI).

在iOS上有Fruitstrap,模拟X code到适用于iOS做类似的任务。是否有微软/第三方工具可以帮助我们对表面做呢?

On iOS there is Fruitstrap that emulates XCode to do similar task for iOS. Is there a Microsoft/third-party tool that could help us do this for Surface?

有关自动化GUI测试的问题(<一个href=\"http://stackoverflow.com/questions/5491714/best-way-to-test-a-microsoft-surface-application\">Best方法来测试微软Surface应用程序)是不是在这种情况下,相关的,因为我们没有任何GUI和问题是上传,并开始从主机非交互方式对地面应用。

The question about automating GUI testing (Best way to test a Microsoft Surface application) is not relevant in this case because we don't have any GUI and the problem is to upload and start the application on the Surface from the host non-interactively.

编辑:有一人将如何使用谷歌测试框架在VS2012 HTTP一个不错的视频:// WWW。 youtube.com/watch?v=o-Gi6REeGN0 但我们的问题是,我们要运行微软Surface而不是主机的测试。

There is a nice video of how one would use Google Test framework in VS2012 http://www.youtube.com/watch?v=o-Gi6REeGN0 but our problem is that we want to run the tests on Microsoft Surface instead of the host.

推荐答案

我使用PSEXEC运行之前特定的环境测试,似乎PSEXEC表面上运行:

I've used psexec to run tests on specific environments before and it appears that psexec runs on Surface:

http://technet.microsoft.com /en-us/library/ee692107(v=surface.10).aspx

我不知道,你可以在表面上运行mstest.exe或nunit.exe,所以如果不是我会做我自己的重量轻的测试框架,它会产生某种输出易于分析(可能是XML)的使用测试结果,并把它一起在一个.exe文件。

I'm not sure that you can run mstest.exe or nunit.exe on the surface, so if not I would have made my own light weight test framework that would produce some kind of easily parsed output (probably xml) with test results and put it together in an .exe file.

所以,你的詹金斯构建脚本会有这样的步骤:

So your jenkins build script would have steps like this:

[Copy SurfaceTests.exe to \\mySurfaceDevice\c$\testfolder]
psexec.exe \\mySurfaceDevice c:\testfolder\surfacetests.exe  > c:\testfolder\output.xml
[Copy \\mySurfaceDevice\c$\testfolder\output.xml to jenkins folder]

那么你就必须配置詹金斯来分析你的产出。如果你调查的NUnit的输出或MSTest的结果,你大概可以产生你的surfacetests.exe相似,设置詹金斯,就好像它是由其中的一个生产什么。我没有与任何詹金斯的经验,但在cruisecontrol.net它是很容易做出解析XML输出​​和$ P $在构建报告psented XSLT文件。

then you would have to configure jenkins to parse your output. If you investigate the output of nunit or mstest results you can probably produce something similar in your surfacetests.exe and set up jenkins as if it was produced by one of those. I don't have any experience with Jenkins, but in cruisecontrol.net it is quite easy to make xslt files that parsed xml output and presented in build reports.

如果PSEXEC方法是行不通的,我会作出一个在该设备上运行的永诺小WCF服务主机。该服务有一个方法(RunTests())的执行你的surfacetests.exe每当被调用。或者更好的是,也许只是运行存储在磁盘上的装配测试(你会做一些反思就实现这一目标),并返回在方法调用的结果。下面是说明如何创建将在Windows应用商店的应用程序运行服务的文章

If psexec approach does not work, I would have made a small wcf service host that was running allways on the device. This service has one method (RunTests()) that executed your surfacetests.exe whenever it was invoked. Or better still, maybe just run the tests from an assembly stored on disk (you would have to do some reflection do achieve this), and returned the results in the method call. Here's an article that explains how to create a service that will run on windows store apps

http://www.c-sharpcorner.com/uploadfile/7e39ca/simple-wcf-service-in-windows-store-apps/

祝你好运。听起来像一个有趣的任务。请你怎么弄成解决这一更新。

Good luck. Sounds like an interesting task. Please update on how you ended up solving this.

这篇关于如何自动对微软Surface非交互式测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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