Toolboxcategory cloud |
ViewsPersonal toolsSCC File Diff Report UtilityFrom Seapine LabsWorks with TestTrack 2008
[edit] SituationYou are about to put a build or a release together, and you would like to know not only which files have changed, but what in the files has changed. You want a list of all issues addressed in this release, all source code files associated with them and what actually was changed in these files in order to address the issues. [edit] SolutionPreviously I had posted an example on this wiki on how to get files for a build. This example showed how you could use the TestTrack automation rules and a script to allow you to retrieve the Source Code Control versions of the files associated with defects and/or change request associated with that build. Building on that concept, this example builds the list of files and then runs a diff command and includes this in an HTML table. The result is a table that contains the defect number, the defect summary, the SCC file(s) included in that defect and the difference information between the version associated with the defect and the previous version. Figure 1 below shows a sample output of the report: While TestTrack's powerful reports are able to give you a list of defects and all source code files associated with them, it will not give you the difference information. This last piece of information I felt could be very powerful for anybody who needs to review what is about to be included in the next build/release. [edit] RequirementsFor this example to be useful, please note the following:
[edit] DisclaimersThis is provided as an example only. While this does work in my environment, it may not work in yours. While I made this a GUI application to allow you to enter all information that will be different, there may still be a need for some adjustments. This is not provided as an add-on to TestTrack or Surround SCM. You are welcomed to use it in your environment, but it is your responsibility to make any changes for this to work in your environment. If you use another Source Control tool you will have to make changes to use that tool's command line interface or API and may need to change the GUI to take the parameters needed by this interface. You probably will also have to change the code that parses the SCC file associated with the defect. [edit] The Application[edit] DownloadYou can download the Visual Studio Project from here. In the \bin\debug folder you will find the debug binary which you may be able to use. [edit] Use caseThe application will retrieve those defects that pass the filter you select. The idea is that you will select a filter that identifies those defects that are included in the next build/release. A suggestion for such filter could be one that looks at the version in the fix event dialog. When a user performs a "fix" in TestTrack, he or she would select a version from the fix event dialog. This would be the version of the build/release to included in. You could also add a custom field to the fix event, one for the release, and one for the build, since your next release may be a result of several builds. Also, you probably would need to ensure that users are attaching their check ins to defects and performing the "fix" event. Remember that the diff is using the "fixed revision" in TestTrack. If the files do not have a "fixed revision" then you will not get any diff information. [edit] How to use itThe application is a GUI app and the debug build executable is included. You may be able to simply run that executable if no changes are needed. Otherwise you will have to rebuild the executable after you make your changes. The application will need the following information:
Once all the relevant information has been entered, click on the "Run Report" button to generate the HTML report. Figure 2 below shows the application interface with data entered in each text box and items selected in each combo box: [edit] Known issuesThe application has not been tested so there aren't many known issues to report on. Here are some possible issues:
If you experience performance degradation with the use of this application, you may want to consider querying the actual database instead of using SOAP. TestTrack supports RDMBS databases and also provides a read-only ODBC driver to query the native database. If you would like to go this route I stronly suggest that you convert the database to an RDBMS format since that will allow you for more powerful querying ability.
[edit] Improvements/enhancements
[edit] Comments/SuggestionsFeel free to drop me an e-mail if you have any comments or suggestions. Just keep in mind the disclaimer. If you have any issues I may be able to help you, but only if it is something minor. If you would like to implement a similar application but require it to be customized or rewritten for your environment (maybe your are in Linux, or use a differnt SCC tool), feel free to contact our services department, which I am a member of. We have the knowledge and skills to deliver a solution that will meet your needs. |
|


