• Call Microsoft TestManager’s mtm.exe to open Test Plans, Test Cases or Test Runs and their Results


    http://tfs-extended.joergbattermann.com/post/16761068484/call-microsoft-testmanagers-mtm-exe-to-open-test

    Call Microsoft TestManager’s mtm.exe to open Test Plans, Test Cases or Test Runs and their Results

    If you happen to be in the situation where you do want to open TFS based Test Plans, Test Cases, Test Results and their individual Runs in your own application, you can either write a custom user interface or open Microsoft’s Test Manager mtm.exe with a specific set of command line arguments to directly jump to the aforementioned artefacts.

    This information isn’t all too wide-spread so I thought it would help if I posted this information here as well.

    Once you have the Microsoft Test Manager component installed, either if you have a Visual Studio Ultimate license or by purchasing a separe Visual Studio Test Professional one, it registers two new Uri handlers on your system, namely:

    • mtms:// - which is meant to be used if you connect to your TFS server via a SSL-secured http connection or
    • mtm:// - for plain, non-ssl http connections

    Now to open the mentioned artifact types, use the following Uris (as mentioned, use mtms:// if your TFS server uses https):

    Test Cases (or any other Work Item)

    mtm://<TfsServerHostName>:<Port (optional)>/tfs/<TeamProjectCollection>/p:<ProjectName>/testing/testcase/open?id=<TestCase WorkItem Id>

    Test Plans

    mtm://<TfsServerHostName>:<Port (optional)>/tfs/<TeamProjectCollection>/p:<ProjectName>/testing/testplan/open?id=<TestPlan Id>

    or (connects to the specified plan, making it the active test plan, the aforementioned only opens it):

    mtm://<TfsServerHostName>:<Port (optional)>/tfs/<TeamProjectCollection>/p:<ProjectName>/testing/testplan/connect?id=<TestPlan Id>

    Test Runs

    mtm://<TfsServerHostName>:<Port (optional)>/tfs/<TeamProjectCollection>/p:<ProjectName>/testing/testrun/open?id=<TestRun Id>

    Test Results

    mtm://<TfsServerHostName>:<Port (optional)>/tfs/<TeamProjectCollection>/p:<ProjectName>/testing/testresult/open?id=<TestRun Relative Id>?runid=<TestRun Id>

    The < .. > variables should be self-explanatory & you can get (read: see) almost all of the required Id’s manually in MTM, but the <TestRun Relative Id> is only used under the hoods and can only be retrieved via the TFS API (see Keith’s answer in the MSDN forums for sample code). 

    Hope this helps!

  • 相关阅读:
    WPF 调用WINForm中的ColorDialog
    WPF 获取ControlTemplate 中的控件方法
    <转> 8个超棒的免费高质量图标搜索引擎
    WPF 右键菜单动画
    WPF 创建超级连接
    WPF 数据模板的切换简单事例
    WPF 关于ShowDialog后主窗体依然能响应键盘输入法的解决方案。
    <转>强制类型转换总结
    WPF 中的MessageBox返回值获取并判断
    WPF数据绑定实现自定义数据源
  • 原文地址:https://www.cnblogs.com/vivianlou/p/3955766.html
Copyright © 2020-2023  润新知