Are there "Dynamic Playlists" of unit tests in Visual Studio?

elnigno

When working with unit tests in Visual Studio, it's possible to compile playlists that group the tests. This is useful, for instance, when developing a new feature for which we want to run only the related tests and not all the existing ones.

However, it seems to me the playlists can only be maintained "manually", by explicitly adding/removing unit tests.

It's better than nothing, but it would be great if I could some how "tag" my unit tests depending on some criterion (e.g. feature, test duration, etc.) and generate the playlists dynamically.

Is there any way to do something similar in Visual Studio with the default testing framework?

GazTheDestroyer

You can run certain tests contextually in relation to the current cursor position by right clicking and then "Run Tests", or hitting CTRL+R then T.

  • If the cursor is within the body of a test, only that test will be run.
  • If the cursor is within the body of a test class, only the tests in that class will be run.
  • If the cursor is within a namespace, all tests in that namespace will be run.

See MSDN documentation on the subject.

Alternatively you can filter the test explorer in various ways. I often use the Project flag to exclude certain projects for instance.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Are there "Dynamic Playlists" of unit tests in Visual Studio?

From Java

Visual Studio 15.8.1 not running MS unit tests

From Java

Controlling execution order of unit tests in Visual Studio

From Dev

Unit tests not showing in Visual Studio 2013, and 2012

From Dev

Visual Studio C# Unit Tests

From Dev

Parameterized Unit Tests with Visual Studio 2015 Intellitest

From Dev

Visual Studio 2012 Not Recognizing Existing Unit Tests

From Dev

attaching unit test data to unit tests in visual studio

From Java

Does Visual Studio have code coverage for unit tests?

From Java

Visual Studio 2015 or 2017 does not discover unit tests

From Dev

organizing unit tests in groups in visual studio test explorer

From Dev

Protection Levels and Visual Studio unit tests with C#

From Dev

Run other project when running unit tests in Visual Studio 2013

From Dev

Debugging unit tests in Node Tools Visual Studio (NTVS)

From Dev

SQL unit tests with Visual Studio Ultimate trial and Express editions

From Dev

Inheriting and running Unit Tests in sub classes in Visual studio

From Dev

Cannot run any unit tests in Visual Studio 2015

From Dev

How do I do unit tests in Visual Studio 2015

From Dev

Visual Studio 2015 not running C++ unit tests

From Dev

N Unit Visual Studio 2017 Test Explorer not finding Tests

From Dev

Unit tests in Android Studio 0.8

From Dev

Unit tests with Android Studio and Gradle?

From Dev

Create unit tests in android studio

From Dev

Unit tests with Android Studio and Gradle?

From Dev

Create unit tests in android studio

From Java

Error when running unit tests in visual studio: Test-case objects missing

From Dev

Code Contracts - Visual Studio Team Service Scripted Build Server Unit Tests Fail

From Dev

How do I generate "Smart Unit Tests" with Visual Studio 2015 Preview?

From Dev

JavaScript unit tests in a separate project when using Chutzpah testrunner and requirejs in Visual Studio

Related Related

  1. 1

    Are there "Dynamic Playlists" of unit tests in Visual Studio?

  2. 2

    Visual Studio 15.8.1 not running MS unit tests

  3. 3

    Controlling execution order of unit tests in Visual Studio

  4. 4

    Unit tests not showing in Visual Studio 2013, and 2012

  5. 5

    Visual Studio C# Unit Tests

  6. 6

    Parameterized Unit Tests with Visual Studio 2015 Intellitest

  7. 7

    Visual Studio 2012 Not Recognizing Existing Unit Tests

  8. 8

    attaching unit test data to unit tests in visual studio

  9. 9

    Does Visual Studio have code coverage for unit tests?

  10. 10

    Visual Studio 2015 or 2017 does not discover unit tests

  11. 11

    organizing unit tests in groups in visual studio test explorer

  12. 12

    Protection Levels and Visual Studio unit tests with C#

  13. 13

    Run other project when running unit tests in Visual Studio 2013

  14. 14

    Debugging unit tests in Node Tools Visual Studio (NTVS)

  15. 15

    SQL unit tests with Visual Studio Ultimate trial and Express editions

  16. 16

    Inheriting and running Unit Tests in sub classes in Visual studio

  17. 17

    Cannot run any unit tests in Visual Studio 2015

  18. 18

    How do I do unit tests in Visual Studio 2015

  19. 19

    Visual Studio 2015 not running C++ unit tests

  20. 20

    N Unit Visual Studio 2017 Test Explorer not finding Tests

  21. 21

    Unit tests in Android Studio 0.8

  22. 22

    Unit tests with Android Studio and Gradle?

  23. 23

    Create unit tests in android studio

  24. 24

    Unit tests with Android Studio and Gradle?

  25. 25

    Create unit tests in android studio

  26. 26

    Error when running unit tests in visual studio: Test-case objects missing

  27. 27

    Code Contracts - Visual Studio Team Service Scripted Build Server Unit Tests Fail

  28. 28

    How do I generate "Smart Unit Tests" with Visual Studio 2015 Preview?

  29. 29

    JavaScript unit tests in a separate project when using Chutzpah testrunner and requirejs in Visual Studio

HotTag

Archive