About Test Attachment Cleaner

by Xavier Dilip Kumar 30. January 2014 11:37

Explanation:

A command line tool that only removes the attachments. It does not touch the test runs, which contain the pass/fail data. So, running Test Attachment Cleaner will not impact the record of the test runs.

You need to Test Attachment Cleaner if you:

  1. Do manual test runs and want to delete attachments without deleting the test runs
  2. Do automated test runs and want to delete attachment for builds which have been deleted already, but the build definition’s retention policy was not set to delete “test results” (because this is turned off by default)

You do not need the Test Attachment Cleaner if you:

  1. Have automated test runs triggered by a build, and you have configured the build definition’s retention policy to delete “test results” (which is not set by default)
  2. Delete the Test Runs manually (as this deletes the attachments)

 SQL Query to get the attachment type associated with the team project.

Select projects.ProjectName, SUBSTRING(attachments.filename,

len(attachments.filename)-CHARINDEX('.',REVERSE(attachments.filename))+2,999) as Extension, sum(f.compressedlength)/1024/1024 as SizeInMB
From tbl_Attachment as attachments
INNER JOIN tbl_File as f on attachments.TfsFileId=f.fileid
INNER JOIN tbl_TestRun as tr on attachments.TestRunId = tr.TestRunId
INNER JOIN tbl_Project as projects on tr.ProjectId = projects.ProjectId
Group by projects.ProjectName, SUBSTRING(attachments.filename,len(attachments.filename)-CHARINDEX('.',REVERSE(attachments.filename))+2,999)
Order by sum(f.compressedlength) desc


Download Attachment Cleaner

Command to preview the attachments before delete
tcmpt attachmentcleanup /collection:TfsUrl /teamproject:TeamProjectName /settingsfile:SettingsFile /outputfile
:<Output dir>/teamproject.log /mode:preview
Command to delete the attachments
tcmpt attachmentcleanup /collection:TfsUrl /teamproject:TeamProjectName /settingsfile:SettingsFile /outputfile:<Output dir>/teamproject.log

Sample settingsfile

<DeletionCriteria>
  <TestRun/>
  <Attachment>
    <SizeInMB GreaterThan="50"/>   
  </Attachment>
  <LinkedBugs>
    <Excludestate="New"/>
    <Excludestate="Committed"/>
    <Excludestate="Approved"/>
  </LinkedBugs>
</DeletionCriteria>

Tags:

MTM | TFS 2010 | TFS 2012 | TFS 2013

Unknown domain users displayed in the work items "assigned to" field

by Xavier Dilip Kumar 29. January 2014 16:57

Description:

IT administrators account get populated in the work item "assigned to" field.

By default, [TEAM FOUNDATION]\Valid Users include [TEAM FOUNDATION]\Team Foundation Administrators which holds [BUILT IN]\Administrators.

Workaround:

In the TFS Server Administration Console

1. Select Application Tier and clicked Group Membership. I

2. Double-click on [TEAM FOUNDATION]\Team Foundation Administrators 

3. Remove [BUILT IN]\Administrator

Tags:

TFS 2010 | TFS 2012 | TFS 2013

After a Gated check-in Build, reconcile or ignore pop up dialog\message is missing

by Xavier Dilip Kumar 29. January 2014 09:04

Explanation:

This issue may occur If you have multiple Visual Studio version instances installed in your box

Solution 1:

Make sure the BuildNotification.exe version loaded in your box matches the Visual Studio version you used for development

BuildNotification.exe for Visaul Studio 2012 will be located at <drive>:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE

Solution 2:

1. Exit out of the BuildNotification tool from taskbar. (right click and Exit).

2. Navigate to <drive>:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE

3. Open BuildNotification.exe.config

4. Edit the trace in there to uncomment to capture the trace. 

Original from:

  <!-- enable soap tracing by uncommenting the following  

  <appSettings>

    <add key="TFTrace.Writer" value="true" />

    <add key="TFTrace.DirectoryName" value="%TEMP%\\TFLogFiles" />

    <add key="TeamFoundationSoapProxy.EnableSoapTracing" value="true" />

  </appSettings>

   <system.diagnostics>

    <switches>

      <add name="TeamFoundationSoapProxy" value="4" />

      <add name="General" value="4" />

    </switches>

    <trace autoflush="true" indentsize="3"/>

  </system.diagnostics>

-->

</configuration>

 to:

  <!-- enable soap tracing by uncommenting the following  -->

  <appSettings>

    <add key="TFTrace.Writer" value="true" />

    <add key="TFTrace.DirectoryName" value="%TEMP%\\TFLogFiles" />

    <add key="TeamFoundationSoapProxy.EnableSoapTracing" value="true" />

  </appSettings>

   <system.diagnostics>

    <switches>

      <add name="TeamFoundationSoapProxy" value="4" />

      <add name="General" value="4" />

    </switches>

    <trace autoflush="true" indentsize="3"/>

  </system.diagnostics>

 </configuration>

 5. Save the trace.

** You might have to open notepad.exe as Administrator if it does not allow you to save it.

** Don't close notepad, because you will need to undo this tracing later.

6. Run "Build Notification" from TFS2012.

7. Trigger a Gated Build. Once the build complete, wait for a few minutes to confirm the dialog appears.

If it works, you can undo the steps from 1-6 again to undo the steps.

 

Tags:

How to change build notification polling interval

by Xavier Dilip Kumar 29. January 2014 08:39

Solution:

You can override the polling interval by modifying the value in the windows registry. 

[HKCU\Software\Microsoft\VisualStudio\10.0\TeamFoundation\Build\BuildNotification\Subscriptions]

(REG_SZ) PollingInterval = "00:02:00"

By default, polling interval is set to "00:02:30" or 2.5 minutes. Modifying this value will result in increased load on your TFS server

Tags:

Team Build

How to uninstall Visual Studio 2012?

by Xavier Dilip Kumar 29. January 2014 06:28

Solution:

vs_ultimate.exe /uninstall /force

Tags:

Visual Studio 2012

How to trigger multiple build definition from a master build definition?

by Xavier Dilip Kumar 21. January 2014 17:48

Solution:

The attached TFS build workflow (.XAML) can be used to trigger multiple build definition from a master build definition. Basically you can sequence multiple build definitions in one master build definition

TFSChainBuildTemplate.11.xaml (14.00 kb)

Reference

Tags:

Team Build

Clearing the default credentials cache for connecting to a Team Foundation Server

by Xavier Dilip Kumar 8. January 2014 12:08

Explanation:

Visual Studio/Team Explorer/MTM remembers your last credentials, So that you need not enter the login credentials everytime you connect to TFS. This will be a problem when you try to login as a different user.

Solution:

Perform the following steps to clear the credentials cache

  • Goto windows control panel --> "User Accounts" --> "Manage your credentials" 
  • Search for your TFS url in the list --> Expand the TFS url credentials in the list
  • click "Remove from vault" button 

  

Tags:

TFS

Test Plan/Suite Management through TFS 2013 web access

by Xavier Dilip Kumar 8. January 2014 10:14

Explanation:

You can now add Test Plan and Suite Management to the list of testing features available in Web Access.

Following are the tasks that can be done using web access

  • Create a test plan
  • Add/Create a test suite,static test suite and query-based test suite  
  • Add/Create test cases and Shared steps
  • test case execution
  • Status check after test case execution
  • Change the steps during execution

The differences between the local MTM and Web access is in the collection of diagnostic data (video, screenshots, IntelliTraace, code coverage). The collection of this data is only supported on a locally installed MTM

Tags:

MTM | TFS 2013 | Visual Studio 2013

How to query build controller and agent details in a collection database

by Xavier Dilip Kumar 2. January 2014 08:51

Solution:

SELECT a.ControllerId "Controller ID", a.DisplayName "Controller Name" , a.Status "Controller Status(1 - Active)",

b.AgentId "Agent ID", b.DisplayName "Agent Name", b.Status  "Agent Status(1 - Active)" FROM tbl_BuildController a , tbl_BuildAgent b where a.ControllerId = b.ControllerId

Tags:

TFS | TFS 2010 | TFS 2012 | TFS 2013

About the author

My name is Xavier Dilip Kumar Jayaraj and I am a Software Configuration Management Engineer with a background in application development, Build & packaging using Install Shield.

Profile in LinkedIn

  

Quotes I Like

"Failure will never overtake me if my determination to succeed is strong enough."  - Dr. APJ. Abdul Kalam

"Always be yourself, express yourself, have faith in yourself, do not go out and look for a successful personality and duplicate it." - Bruce Lee

"Technology is just a tool. In terms of getting the kids working together and motivating them, the teacher is the most important." - Bill Gates

"Innovation distinguishes between a leader and a follower." - Steve Jobs

Disclaimer

The information provided here is based on my expreriences, troubleshooting and online/offline findings. It can be used as is on your own risk without any warranties and I impose no rights.

Month List