Click here to Skip to main content
Click here to Skip to main content

Bug Fix Tracking in C# Executable Files

, 1 Mar 2004
Rate this:
Please Sign up or sign in to vote.
Enter bug fix comments in C# source code and explore it from binary files.

Sample image

Introduction

Bug Fixing is one of the major tasks in Software Development Lifecycle. At testing stage, responsibility of the software developer is not only to fix bugs, but also to do the proper documentation for the fixes. Companies will purchase any popular Defect Tracking Products available in the market to manage Entering, Fixing and Reviewing of the defects. The testers will record the defects found by them, into those Defect Tracking Systems and the developers will fix it and update the Defect Tracking Database with ample Fix details. There are lots of benefits through using a Defect Tracking System. One important factor is that we can implement certain workflow into the system. Also, the bugs can be listed in a specific-centralized place that can be accessed by any members in the project team, and the defects taken care of.

But, think about tracking a bug in a later stage? Consider a situation that, your team had developed an application, tested it, fixed defects reported, and finally released to the customer. What will you do in a later stage, when any of the bugs fixed were not in the right way or created some troubles. The history of the fixed bugs can be taken from the Defect Tracking System but it will give you difficulty in searching those issues in the Source Code or you have to take the history of the check-ins of the source codes from the Source Control System to trace or track the problems. This will make it more time consuming and may give more troubles if you are in a hurry to detach the issues.

How will it be useful for you if you are able to find the bug descriptions within the delivered binary files? I hope it will make your work easier to track the bug fixes you have done in the earlier period, in the delivered binary files.

A solution to track bugs in binary files

Here is a solution to track such bugs within the assembly files, of a project that is developed using C#. Normally for the bug fixes, we will add comments in the code regarding the fix done for that. Instead of giving comments or in addition to giving comments, you can exercise a specific methodology for bug fixes, to quick-track at a later stage in the binary files.

Microsoft .NET provides two functionalities in C# – Attributes and Reflection.

Attributes provide a powerful method to associate declarative information with C# code (types, methods, properties, and so forth). Once associated with a program entity, the attribute can be queried at run time and used in any number of ways.

Reflection is runtime type discovery. That is, using reflection services you are able to load an assembly at runtime and find the classes, methods, properties etc. In addition to finding the types in the assembly, you can also dynamically invoke (late binding) those types.

If you are a beginner to C#, please have an idea about attributes and reflection in C#, before going through the applications provided with this article.

Overview of the applications

Download the application from the link provided.

The download will contain 3 projects:

  • Solution1 – BugFixAttribute: A Class Library application, which defines the BugFixAttribute. This solution contains a class BugFixAttribute, which is inherited from Attribute. The attribute contains members BugNumber, FixedBy, FixedDate, FixDescription. Using properties the values of these members are exposed.
  • Solution2 – TrackBugChanges: A Windows Application, to display the bug details (as attributes) available in a C# assembly file. In this application, you have to give an assembly name (for example, the executable file of Solution3). This application will explore the binary and will show all the bug fixes done on that assembly with class name and method name.
  • Solution3 – DoBugFix: A sample console application, that has bug fix attributes implemented in it. This application will give you an idea about how to use the BugFixAttribute.

In Solution2 and Solution3, the Class Library BugFixAttribute is referred.

Conclusion

Since it is a small application provided with this article, there is no need of explanation of code here. Required comments are added into the class files accordingly.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Jayababu
Program Manager
India India
No Biography provided

Comments and Discussions

 
GeneralA Brilliant Idea Pinmemberjabailo22-Jul-04 12:43 
GeneralRe: A Brilliant Idea Pinmemberrcardare12-Mar-05 7:40 
GeneralSorry, but no... PinmemberAurelian Georgescu2-Mar-04 19:51 
GeneralRe: Sorry, but no... PinmemberSimon Segal28-Mar-04 17:21 
GeneralImprovements PinsussAnonymous2-Mar-04 4:39 
GeneralRe: Improvements PinmemberJayababu2-Mar-04 5:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140827.1 | Last Updated 2 Mar 2004
Article Copyright 2004 by Jayababu
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid