by XDK
4. November 2014 07:26
Explanation:
All MTM objects information are stored in the TFS collection database table ‘tbl_AuditLog’.
Solution:
You can query the TFS collection database table ‘tbl_AuditLog’ as below
USE <TFS collection database>
SELECT tbl_AuditLog.AuditId, tbl_AuditLog.DateModified, tbl_AuditLog.Action, tbl_AuditLog.ObjectType, tbl_Project.ProjectName, tbl_AuditLog.AuditIdentity FROM tbl_AuditLog JOIN tbl_Project ON tbl_AuditLog.ProjectId = tbl_Project.ProjectId
List of Action code:
None = 0
Delete = 1
Reset = 2
List of Object Types:
None = 0
TestRun = 1
TestConfiguration = 2
TestPlan = 3
TestPoint = 5
TestResult = 6
TestVariable = 7
TestResolutionState = 8
TestSettings = 9
Attachment = 10
TestSuite = 11
TestSuiteEntry = 12
TeamProject = 13
TestVariableValue = 14
TestConfigurationVariable = 15
BugFieldMapping = 16
Session = 17
TestController = 18
DataCollector = 19
TestCase = 20
SharedSteps = 21
Other = 1000
You can query the TFS configuration database table ‘tbl_Identity’ for user details
SELECT [Sid],[Id],[DisplayName],[Domain],[AccountName],[MailAddress] FROM [Tfs_Configuration].[dbo].[tbl_Identity] where [Tfs_Configuration].[dbo].[tbl_Identity].[Id] = '<tbl_AuditLog.AuditIdentity value>'
f4bec958-72e4-4450-9fd5-5b47949096c7|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags: TFS 2013 TFS 2013
MTM
by XDK
30. September 2014 12:59
Solution:
1. Open the team project web portal
2. Goto Test tab --> select a test suite --> click on “View List” --> click on “Grid” to view the testcases for bulk edit.
948e9dbb-9220-4490-979b-743e31be501e|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags: TFS 2013 TFS 2013
MTM
by XDK
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:
- Do manual test runs and want to delete attachments without deleting the test runs
- 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:
- 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)
- 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>
by XDK
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
by XDK
3. December 2013 07:12
Explanation:
One of the QA Lead reported me that the test suite was lost after the migration from TFS 2010 to TFS 2012. Actually the test suite folder was renamed by the QA Lead and reported as deleted :(
How did I resolved it?
- Queried the TFS 2012 collection database to get the deleted suite id, But I was not able to identify any test suite delete for the reported project in the collection.
Select * from tbl_auditlog where ObjectType = 11
- To get the basic information of test suite like ProjectName, TestPlanId, ParentSuiteId, Title, SuiteType, Query, RequirementId, I queried the TFS 2012 collection database as below
Select p.ProjectName, s.* from tbl_suite s join tbl_Project p on s.ProjectId = p.ProjectId
- I was able to identify the suite information which was reported as deleted. With the suite id, I was able to identify who renamed the test suite and when
Select LastUpdated,LastUpdatedBy FROM tbl_Suite where [SuiteId] = 'XXXX'
Select * from tbl_Identity where Id = ' LastUpdatedBy '