{"id":5753,"date":"2012-01-16T01:28:54","date_gmt":"2012-01-16T01:28:54","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2012\/01\/16\/faq-why-are-my-tests-not-included-in-the-test-run\/"},"modified":"2022-07-27T02:01:04","modified_gmt":"2022-07-27T10:01:04","slug":"faq-why-are-my-tests-not-included-in-the-test-run","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/faq-why-are-my-tests-not-included-in-the-test-run\/","title":{"rendered":"FAQ: Why are my tests not included in the test run?"},"content":{"rendered":"<p>As an alternative to <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/bb385901.aspx\" target=\"_blank\" rel=\"noopener\">Microsoft Test Manager<\/a> (MTM), users can use <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ff942470.aspx\" target=\"_blank\" rel=\"noopener\">tcm.exe<\/a> command line to run and manage their test cases.\u00a0 The command line way is particularly useful in running tests in non-interactive way (say via scripts).<\/p>\n<p><strong>FAQ:<\/strong> While using \u201c<a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ff942469.aspx\" target=\"_blank\" rel=\"noopener\">tcm.exe run<\/a>\u201d command to run all the test cases in a test plansuite is &#8211;<\/p>\n<ul>\n<li><strong>Either<\/strong>, The \u201ctcm.exe run \/create\u201d command gives \u201cA test run must be created with at least one test case.\u201d error.\u00a0 Why? <\/li>\n<li><strong>Or<\/strong>, The \u201ctcm.exe run \/create\u201d command is not running all my test cases in the test suite. Why? <\/li>\n<\/ul>\n<p><strong>A<\/strong>: By default, \u201ctcm.exe run \/create\u201d command creates a test run for only tests (or rather test points for more knowledgeable ones) in active state and ignores tests not in active state. (Refer screenshot below to understand what I mean by active state here.) This is deliberate to ensure users can avoid rerunning tests that have already passed and can control what to run by moving it to active in MTM.<\/p>\n<p>You can however specify <strong>\/include<\/strong> option to tcm.exe run command to force include all the tests.<\/p>\n<p><img decoding=\"async\" style=\"border-right-width: 0px;padding-left: 0px;padding-right: 0px;border-top-width: 0px;border-bottom-width: 0px;border-left-width: 0px;padding-top: 0px\" title=\"clip_image002\" border=\"0\" alt=\"clip_image002\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2012\/01\/2275.clip_image002_thumb_2230A084.jpg\" width=\"644\" height=\"357\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>As an alternative to Microsoft Test Manager (MTM), users can use tcm.exe command line to run and manage their test cases.\u00a0 The command line way is particularly useful in running tests in non-interactive way (say via scripts). FAQ: While using \u201ctcm.exe run\u201d command to run all the test cases in a test plansuite is &#8211; [&hellip;]<\/p>\n","protected":false},"author":115,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[226,1,252],"tags":[],"class_list":["post-5753","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ci","category-devops","category-testing"],"acf":[],"blog_post_summary":"<p>As an alternative to Microsoft Test Manager (MTM), users can use tcm.exe command line to run and manage their test cases.\u00a0 The command line way is particularly useful in running tests in non-interactive way (say via scripts). FAQ: While using \u201ctcm.exe run\u201d command to run all the test cases in a test plansuite is &#8211; [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/5753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=5753"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/5753\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=5753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=5753"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=5753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}