zoukankan      html  css  js  c++  java
  • enable parallel unit test running in visual studio 2010

    If you have started TDD, if you have written a lot of unit tests, i believe that you do love this feature in visual studio 2010.

    Running tons of unit test in sequencial needs quite a lot of time. (for sure we should minimize the duration of each unit test as much as possible, i.e., less than 1/10 seconds). In visual studio 2010 you can change the settings in the test run configuration file to enable the unit test parallem running.

    But before you start enable this feature, you need to make sure:

    1. Ensure you have a multi-core/CPU machine (see above requirement).
    2. Ensure you are running only unit tests (see above decisions)
    3. Ensure your tests are thread-safe (see above requirement)
    4. Ensure you do not have any data adapters on (see above decisions)
    5. Ensure you are running locally (see above decisions)

    Right-click the test configuration and select "Open with", then "XML Editor". Add the parallelTestCount attribute in the Execution node. Now enjoy the speed!

    <TestSettings
    id="2d06aeb5-c93c-42e8-a0cd-1ef329bcc737"
    name
    ="TestSettings1"
    enableDefaultDataCollectors
    ="false"
    xmlns
    ="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
    <Description><!--_locID_text="Description1"-->These are default test settings for a local test run.</Description>
    <Deployment enabled="false"/>
    <Execution parallelTestCount ="8">
    </Execution>
    </TestSettings>
  • 相关阅读:
    aspx页面,中文乱码解决方案
    使用JSP体验微信公众平台开发模式
    使用微信公众平台“编辑模式”的过程记录
    JAVA刷新网站IP访问量的技术探讨
    301. Remove Invalid Parentheses
    Dungeon Game
    刷题关键点总结-动态规划
    刷题关键点总结-单调栈、单调队列
    coin change
    常用vim命令
  • 原文地址:https://www.cnblogs.com/xiaxi/p/2235863.html
Copyright © 2011-2022 走看看