How to delete an Action Recording

Problem:

I need to delete an Action Recording from a test case in Microsoft Test Manager.

Solution:

Delete the test result where you created the Action Recording.

Explanation:

While preparing my talk for VS Live Austin where I will teach all the ways of creating a Coded UI Test I found myself needing to delete an Action Recording.  Once an Action Recording is created you are presented the option to “Overwrite existing action recording”.

Figure 1

This is all well and good but not the experience my attendees would have when they tried this on their own.  I wanted them to see the dialog presented to you the first time you run a test case that does not have an Action Recording on it.

Figure 2

To do this I needed to figure out how to delete an existing Action Recording.  My first thought was to simply add a step to my test case so the Action Recording would be invalid and have to be updated.  This resulted in a nasty error message that was even worse than the overwrite message.

Figure 3

After doing some research I found that the way you delete an Action Recording from a Shared Step is different than a normal Test Case.

The action recording of a Shared step is stored as a File Attachment.  To remove the Action Recording simply delete it.

Figure 4

However, for a normal test case the Action Recording is stored in the Test Run.  To remove the Action Recording you have to delete the Test Run where the recording was created. 

Figure 5

This is more of a work around than an actual solution due to the fact you will be deleting more than just the Action Recording but the actual Test Run as well.

But if you are ever in a bind and need to delete an Action Recording this will do the trick.

Comments (4) -

  • Kirti Kapoor

    6/8/2015 3:33:42 PM | Reply

    Attended your VSLive @ Austin presentation on CodedUI Tests on Steroid. Great presentation. I think you used VS2015 for the demo. Can everything be accomplished using VS2012 as well? Also, is it possible for you to email me the source code that you you used for demo? Thanks,

    • Donovan

      6/19/2015 2:22:44 AM | Reply

      I am glad you enjoyed.  To answer your question yes everything can be done with any version of CUIT.  I just emailed my final project to @VSLive today.

  • KC

    1/27/2018 1:00:08 AM | Reply

    Hi Donovan,
    Do you have an updated solution using VS2015 MTM?

    Kim

    • Donovan

      2/2/2018 6:17:23 PM | Reply

      What error did you get? It should be exactly the same.

Pingbacks and trackbacks (1)+

Add comment

Loading