附加当前版本以进行测试 [英] Attach Current Build to Test

查看:94
本文介绍了附加当前版本以进行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在玩Microsoft Test Manager 2013(尽管它看起来只是MTM2012),试图更好地理解测试用例和测试套件,因为我想在工作中使用它.所以我希望我可以在包含在该测试套件中的版本上运行测试套件.那就是我想要要做的,但这很可能是错误的.因此,也许我在工作中做的更好的范围可能会带来更好的答案.

I'm playing around with Microsoft Test Manager 2013 (though it appears it is just MTM2012) to try and get a better understanding of test cases and test suites as I want to use this at work. So I was hoping that I could run a test suite on a build which gets included in this test suite. That is what I WANT to do, but it could very well be wrong. So maybe a better scope of what I'm doing at work might lend to a better answer.

我的公司生产平板电脑.我为那些平板电脑编写程序.为了争辩,我们只说有5台平板电脑,它们运行着一系列类似的OS. Tablet1,2,3和4可以运行WinXP,嵌入式WinXP,Win7和Win7 Embeded,而Tablet5可以运行Win7,Win7嵌入式和Win8嵌入式.可以说我正在制作一个Display测试程序.自然,此显示测试将在每台平板电脑上运行不同,但是它自己的程序应该能够处理该程序,而不必担心操作系统.所以我写了一个非常简单的测试.打开程序,尝试再次打开,仅验证1个实例,检查显示,然后关闭程序.

My company makes tablet PC's. I write programs for those tablets. For sake of argument lets just say there are 5 tablets, that run a similar array of OS's. Tablet1,2,3 and 4 can run WinXP, WinXP embedded, Win7, and Win7 Embeded, and Tablet5 can run Win7, Win7 Embedded, and Win8 embedded. Lets say i'm making a Display test program. Naturally this display test will run differently on each tablet, but the program it self is supposed to be able to handle that along with not being able to worry about OS. So I wrote out a very simple test. Open Program, try to open again, verify only 1 instance, check display, close program.

我认为最好制作一个名为完整显示程序测试"的测试套件,并为每个平板电脑添加5个子测试套件.然后将5个测试用例移动到单个测试套件中.我将所有测试用例都配置为仅具有正确的平板电脑/操作系统配置.对构建进行排队并等待其完成.然后,我将该版本附加到主测试套件.然后,我单击了运行平板电脑1的测试,但没有看到构建附加到测试运行程序.我环顾了一下,看看为什么还是怎么找到了什么.问题是我该怎么做?或者,如果您挠头并想知道为什么我在世界上以这种方式这样做,那么一定要提出另一种方式.这是我第二次研究MTM,因此我可能做得不好.

I figured it would be good to make a Test Suite called "Complete Display Program Test" and put 5 sub test suites to that for each tablet. Then moved the 5 test cases to a single test suite. I configured all test cases to only have the correct tablet/OS configuration. Queued a build and waited for it to finish. I then attached that build to the main test suite. I then clicked on run a test for tablet 1 but I didn't see the build attached to the test runner. I've looked around a little bit to see why or how and haven't found anything. Question is is how do I do that? Or if you are scratching your head and wondering why in the world I am doing it this way then by all means suggest another way. This is the second time I have ever looked into MTM so I might not be doing it right.

谢谢您的时间.

推荐答案

MTM 运行手动测试时,您不会在 Test Runner 中看到正在使用的内部版本.

When running manual tests from MTM you will not see the build you are using in Test Runner.

但是,如果您完成了测试并设置了测试结果,则可以检查运行测试的是哪个版本.

But if you complete the test and set the test outcome you will be able to check which build you've ran the test against.

只需双击测试或选择查看结果"即可显示测试结果:

Just double-click on the test or select "View Results" to display test results:

此列默认情况下不可见.您将必须在列行上单击鼠标右键,然后选择要显示的"Buld number"列.

This column is not visible by default. You will have to right-click on the column row and select the column "Buld number" to be displayed.

您还可以在分析测试运行"区域中查看内部版本号:

You will also be able to see the build number in "Analyse Test Runs" area:









如果您正在运行自动化测试,则情况会有所不同.
考虑以下方法:

The things are slightly different if you are running automated test.
Consider following approach:

  1. 自动化您的测试用例
    请参见如何:将自动测试与测试用例以获取详细信息.
  2. 创建一个构建定义,以在受测试的应用下构建应用程序 AND 包含测试的程序集.
    我强烈建议您使用相同的 Build Definition 来构建要测试和测试程序集的构建应用程序. (稍后会看到原因).
  3. 运行此构建定义,并将应用程序的最新版本部署到要运行测试的环境.
    这是非常重要的了解:如果您运行自动化测试,则仅测试程序集会自动部署到环境中.
    部署要测试的应用程序的正确版本是您的工作.
  4. 现在您可以从 MTM 运行测试.
    您可以按照@AndrewClear在此答案的注释中描述的方式进行操作:在开始测试运行时选择使用选项运行"" ,然后选择最新的版本.
    现在,包含用于自动化 Test Cases 的测试的测试程序集将自动部署到测试环境中,并且将执行测试.
    这就是您应该认识到为什么使用单个 Build Definition 构建应用程序和测试如此重要的原因:因为您在开始测试时刚刚选择的内部版本号将与测试一起存储在TFS上得到的结果,您以后将知道您正在测试的应用程序版本(当然,假设您部署了正确的版本).
  1. Automate your Test Cases
    See How to: Associate an Automated Test with a Test Case for details.
  2. Create a Build Definition building your application under test AND assemblies containing your tests.
    I strongly recommend build application you want to test and test assemblies using in the same Build Definition. (You will see why a little bit later).
  3. Run this build definition and deploy the latest version of the application to the environment where you want run the tests.
    This is very important to understand: if you run automated tests the tests assemblies only would be deployed automatically to the environment.
    It's your job to deploy the right version of the application you are going to test.
  4. Now you can run tests from MTM.
    You can do it the way described by @AndrewClear in the comment to this answer: "choose "Run with Options" when you're beginning a test run" and select the latest build.
    Now test assemblies containing tests which are using to automate Test Cases will be deployed automatically to the test environment and the tests will be executed.
    That is the point you should recognize why is it so important to build application and tests with a single Build Definition: since the build number you've just selected when starting the tests will be stored along with the test results on TFS you will later know what version of you application you were testing (assuming you deployed the right version, of course).

如果您想进一步自动化,可以走得更远(这是我目前正在运行自动化测试的方式)
使用Deploy-Build-Test模板(这是开始阅读有关设置自动化的构建-部署-测试工作流程).
使用这种方法,您将能够自动化要测试的应用程序的部署.

You could go a little bit further if you want even more automation (This is the way I'm currently running automated tests)
Use Deploy-Build-Test template (this is a good place to start reading about Setting Up Automated Build-Deploy-Test Workflows).
Using this approach you will be able to automate deployment of the application you want to test.

这篇关于附加当前版本以进行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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