Software Configuration Management, also called SCM, is the first bottleneck encountered in quality improvement of software organizations, because the core of SCM is progress control and risk management, these two items are the biggest weakness of all software organizations that urgently need quality improvement.
Cruel reality of SCM
However, during the improvement process, we will encounter too many obstacles. One of the most important obstacles is the execution of the configuration management process. Developers think that configuration management restricts their free creation, and the configuration Administrator does not know how to perform configuration management activities. These situations are common in Small and Medium-sized Software Enterprises.
The management layer cannot make up its mind to control the progress and risks in combination with configuration management. The configuration management process and system name are saved. In such an environment, the configuration Administrator, it may be hard to imagine what you have to do in addition to writing boring configuration management plans and reports.
On the other hand, because the configuration management process is not really established, testers are also complaining, because they never know when the developers have modified a line of code, as a result, they missed the test, or the developer was on the rise and changed the names of most of the controls to a better name. As a result, the tester's automated script needs to be rerecorded.
VSS is a configuration management tool used by most small and medium-sized software enterprises. Calling it a configuration management tool is a bit stubborn because it lacks building management, process management, and other functions. At best, it is just a source code control tool. However, this is a small tool that most of us use in configuration management activities.
In such a "cruel" environment, I can only complain to each other and be forced to accept the reality? No, based on VSS, we can actively get a lot of information to really help us.
VSS Programming Interface
VSS provides two types of programming interfaces: command line interface and automation interface. Vss.exe is called through the command line and supports most of the VSS interface operations. For example, you can use the Checkin and Checkout commands to check in and out files.
VSS also provides an automated programming interface (IVSS), which is a set of COM-based automated interfaces that are exposed to users through the Microsoft. VisualStudio. SourceSafe. Interop namespace. It provides an interface to operate the VSS database. For example, access and log on to the VSS database through the IVSSDatabase interface.
Daily configuration management briefing
Since VSS provides a convenient programming interface, can we use it to help us with configuration management activities? The answer is yes. One simple activity is the automatic generation of configuration management records.
We can run a small program every night after work, and automatically log on to VSS to obtain any modifications made by developers on the day. It is recorded in the file as a configuration management record and sent to the mailboxes of members of the project team. In this way, the tester can know what changes the developer made yesterday when he went to work every morning, whether to take the version for regression testing. The regression testing policy can also be easily designed based on the configuration management records.
Surveillant
I call such a small program Surveillant, that is, the meaning of the monitor, and of course the meaning of the supervisor and the spying. I think the configuration administrator and tester will like this name. However, I have no other attempts. I just use such a small program to help people who need it easily and automatically obtain the information they need.
Using C # To write such a small program, we can have two options: one is to call the command line, and the other is to use the VSS automated programming interface.
The command line method is relatively simple. You can use the History command of SS, for example:
History $/vss_test-R-Yusername, password-Vd2007-10-18; 23:59:59 ~ ; 00:00:00-O @ C: \ report.txt;
In the C # code, you only need to replace the project path, user account, date, and so on, and then start a command line process to execute it. The premise of using this command line method is to set the SSDIR environment variable, that is, to set the path of the srcsafe. ini file of the VSS database to be connected to the environment variable.
To use the automatic programming interface of VSS, you must first Add a reference to Microsoft. VisualStudio. SourceSafe. Interop. dll. Create a reference to the vss database instance and log on using the Open method:
VSSDatabase vssDatabase = new VSSDatabase ();
VssDatabase. Open (SSDIR, userName, passWord );
Then, use the get_VSSItem method to specify the source code project path for obtaining the change history, and return an IVSSItem object:
IVSSItem vssFolder = vssDatabase. get_VSSItem (projectPath, false );