When did my test plan get deleted? Who deleted my test suitetest run?
If you are looking for answers to questions like above then read on.
It has been a frequent asks to have an easy way to figure out when a particular test artifact got deleted and by whom.
At present all this information goes in TFS collection database table ‘tbl_AuditLog’. But it’s not straightforward to interpret various columns available in this table. One has to take joins with various other tables present in different databases and still interpretation of some columns lies in code only. Thus it is very hard to get this information in human readable form.
To ease this effort, we have created a command line tool that makes this job a breeze.
Given a Team Project Collection Url, it will create a .csv file in which it will write complete audit log, replacing every entry with its corresponding interpretation.
1. Visual Studio 2012 compatible bits of the tool — Require Visual Studio 2012 or Team Foundation Server 2012 to be installed on the machine
2. Visual Studio 2010 compatible bits of the tool — Require Visual Studio 2010 or Team Foundation Server 2010 to be installed on the machine
3. Source code
Usage of the tool:
Run following command in Visual Studio command prompt:
TFSLogs.exe auditlog /c:<Team Project Collection URL> /l:<.csv output file path>
Sample output of the tool:
Permissions required to run the tool:
User should be a TFS admin and should be added on TFS Management Console – ‘Administration Console Users’ group.
Following are some important points to note:
1. This tool will not work against hosted TFS because Audit log is not available in case of TFS on Cloud.
2. With time as more and more operations are performed on the TFS, number of entries in Audit log table will keep on increasing. Thus depending upon the size of the Audit log table, this tool may take some time to get the complete log. Hence it is advisable to run the tool on the machine in which TFS is installed.
3. You need to know the object id of the artifact that got deleted – there is no way to get the name of that particular object since it no longer exists in the database post delete.
Please try out this tool and let us know your views regarding it.