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

  • SEARCH
  • Home
  • 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 5951035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:28:46+00:00 2026-05-22T17:28:46+00:00

I am trying to add the ability to run selenium tests that belong to

  • 0

I am trying to add the ability to run selenium tests that belong to a particular category. In our selenium test files I added a test category attribute. Since we have automated testing we use msbuild.exe to build the target application and then use mstest.exe with the category switch to run the tests.

Every time I run the tests the msbuild.exe says “MSBUILD : error MSB1001: Unknown switch. Switch: /category:cat1&cat2”

The version of msbuild is 4.0.30319. Any ideas/suggestions?

Thanks!

  • 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-05-22T17:28:46+00:00Added an answer on May 22, 2026 at 5:28 pm

    It sounds like you are trying to pass one of the mstest.exe specific command line arguments to msbuild.exe, right? Not sure how you would expect this to work, msbuild.exe doesn’t understand them. Presumably you are using msbuild to call to mstest in an Exec task, or are you getting the tests executed by some other means? Regardless, the /category:… switch needs to be passed into the call to mstest.exe. You can have your msbuild script accept a proper msbuild parameter and convert it to one recognized by mstest, for example:

    >msbuid My.proj /p:mstestcat=cat1%26cat2
    

    This passes in a new valid msbuild property named $(mstestcat). The %26 is msbuild’s way of escaping the ‘&’ character. When you call mstest.exe inside msbuild, do something like this,

    <Exec
      Command="mstest.exe ... /category:$(mstestcat)"
      ...
      />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to add tests to the gobject-introspection test suite to cover more of the
Trying to add the ability to delete a Folder using FTP and all subfolders
So I'm trying to add some ability to my project to allow user-defined properties
I'm trying add a tab to my web page that looks like this: Using
I am trying to add the ability for the camera to go up and
I am trying to add in the ability for users of my app to
Trying to run through a dictionary string and write the contents to file that
Using MS Visual C++ and Boost asio, I'm trying to add the ability to
I have a WinForms app and am trying to add the ability to start
I am trying to add some administration scripts to a Zend Framework project, that

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.