DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. Databases
  4. New Unit Test functionality in VS2012 Update 2: Test Playlist

New Unit Test functionality in VS2012 Update 2: Test Playlist

Ricci Gian Maria user avatar by
Ricci Gian Maria
·
Mar. 15, 13 · Interview
Like (0)
Save
Tweet
Share
5.47K Views

Join the DZone community and get the full member experience.

Join For Free

in vs2012 we have support for basically any unit test framework, because the new test runner is plugin based, and everyone can write plugin to make it compatible with the framework of choice. from the original version that was released with visual studio 2012 rtm, in update 1 and update 2 the test runner gained a lot of new feature, really useful for everyday work.

update 2 introduced the concept of “test playlist” : basically a simple tool to create a subset of unit tests that are meant to be managed together. since update 1 already introduced the concept of traits to group tests, this feature can be seen as a duplicate, but traits and playlist have different meaning. let’s see how to create a playlist.

to create a list simply choose one or how many tests you like in test explorer, right click on one of them and choose add to playlist ; if there is no playlist already loaded, the only option is “new playlist”, just give the playlist a name and a location and create a new one.

image

figure 1: create a playlist from a test in test explorer

now you can continue to add other test to the playlist if you want; once you are done you can select the playlist from the top menu of the test explorer.

image

figure 2: you can now choose the playlist to use.

a playlist is just an xml file that contains the list of all the test you added to the playlist. to continue adding test to the playlist you should use the top menu to select “all tests”, find tests you want to add to the playlist, and simple right click and choose to “add to playlist”; now you should see all the testlist of the project and not only the “new playlist” option.

once you select a playlist, the test runner works exactly as before, but it consider only the tests included in current playlist, you can filter, group by traits, etc etc . to remove a test from a playlist, simply choose that playlist, right click on the test (or the tests) you want to remove and choose: remove from current playlist.

as i told at the beginning of the post: the use of playlist is an alternative to use traits to group test and run only a subset, but the main difference is that a trait expresses a real property of the test, (ex the logical area of the software that got tested, or other attribute such database to indicate that it needs a test database), while playlist are primarily meant to group together heterogeneous tests to simplify management, both for running test and manage them.

image

figure 3: group by traits.

this feature is also needed by all old mstest users, that are used to create list of test to run with the old test runner.




unit test Database

Published at DZone with permission of Ricci Gian Maria, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Custom Validators in Quarkus
  • What Is API-First?
  • Best Navicat Alternative for Windows
  • Spring Boot vs Eclipse MicroProfile: Resident Set Size (RSS) and Time to First Request (TFR) Comparative

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: