Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7879637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:56:36+00:00 2026-06-03T03:56:36+00:00

is there a way to use categories and ordered tests in MSTest together? [TestMethod,

  • 0

is there a way to use categories and ordered tests in MSTest together?

[TestMethod, TestCategory("UITest")]
public void TestMethod()
{
}

and add a new ordered test to my test project.

well .. calling this method from the command line like:

MSTest.exe /testcontainer:MyOrderedTest.orderedtest

it will execute the testmethod.

but when calling MSTest like the following:

MSTest.exe /testcontainer:MyOrderedTest.orderedtest /category:UITest

it can’t find the testmethod..

strange behavior ..

is there a way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T03:56:37+00:00Added an answer on June 3, 2026 at 3:56 am

    When you use the /testcontainer:[file name] option you tell MSTest to run the tests that are specified in this file. So, your unit test with the attribute [TestMethod, TestCategory("UITest")] will not run because it not contained inside the MyOrderedTest.orderedtest.

    You could create a TestList to achieve this behavior which will contain all of your Tests that belong to the UITest category and also the OrderedTest and then run the following command:

    MSTest.exe /testmetadata:$(ProjectDir)\TestProject.vsmdi /testlist:ListName
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to use PowerShell to view the contents of the GAC?
Is there a way to use the CompiledQuery.Compile method to compile the Expression associated
Is there any way to use server controls in ASP.NET MVC? Specifically I need
Is there a way to use ASP.NET in browsers that javascript is not enabled?
Is there any way to use ActiveRecord calculations while also acquiring relevant field names?
Is there a way to use simple sql queries on ASP MVC without using
Is there a way to use a Cocoa IBOutlet in Python? Or do I
Is there a way to use data from the current context to filter nodes
Is there some way to use schtasks to create a task with multiple schedules
Is there a way to use the RSA keys I've generated with the Crypto++

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.