01-10-2012 01:12 PM
I want my TestStand reports to contain information about which version of the sequence file generated the report. For now, I've created a FileGlobals.CodeVersion string variable, and I append it to the report header in the ModifyReportHeader callback. This is less than ideal, because it relies on the developer to manually change the value in the sequence file for each deployment. In the future I think I will have it pull the revision from a text file that is managed by Subversion, but right now, the code base is backed up with zip files instead of an RCS.
I have two related questions:
1. Is there anything built into TestStand that can be put into an XML result file, which helps to discern whether two result files were created by the same version of the sequence? Perhaps some flag that gets incremented every time the sequence is changed, or a checksum?
2. Does anyone else have a better method than what I described above for tracking code revisions in TestStand results?
-Arthur
Solved! Go to Solution.
01-11-2012 01:32 AM
You could try SequenceFile.AsPropertyObjectFile and then PropertyObjectFile.Version
01-11-2012 02:50 AM
01-11-2012 09:58 PM
Thank you both for your responses. The Version property is half of what I'm looking for. I'm able to access it in a TestStand statement with the API code SequenceFile.AsPropertyObjectFile.Version, and I added that to my ModifyReportHeader callback. In the TestStand interface, I learned that you can manually read/modify the value in the "Edit>Sequence File Properties" menu.
Unfortunately, it restricts the value to the x.x.x.x format, not only in the UI, but in the API, so it produces an error if I try to set SequenceFile.AsPropertyObjectFile.Version = "String". Why would I want to do that?
Ideally, the sequence file would be in XML format (also an option in the sequence file properties dialog), and the Version value would be set to the string $Revision$, so that subversion will automatically update the value when the file is committed to the repository.
It's cool that TestStand has a built-in variable that allows some concept of versioning. Perhaps when TestStand is setup with a source control system, that variable gets populated automatically. If that's true, I am very interested to hear. (?)
For now, my preferred method is to use the FileGlobal string that I mentioned in my original post. I set it's value to "$Revision$" and I set its 'Not Editable' flag, so that it can't be changed from within TestStand, and I set the sequence file format to be XML. Of course, the XML can be edited by subversion on commit, and the keyword gets updated. Perhaps I will update the sequence file program to set SequenceFile.AsPropertyObjectFile.Version = FileGlobals.CodeVersion on each run, just to make sure they're in sync, even though I don't use the built-in Version property. This solution allows me to let subversion do the work of keeping the revision number up to date, and then the XML reports get the correct revision number embedded within.
-Arthur