Wednesday, February 3, 2010

Test case or script naming without version control

Some possibilities for identifying versions and retaining history:

  • All names have a numeric version attached to the name, e.g. BestestQTPScript-2.5
    • 2 would indicate that there was a major rewrite for whatever reason (i.e. starts at 1)
    • 5 would indicate that this is the 6th minor update since the last major update (i.e. starts at 0)
  • All names have the creation date attached to the name, e.g. BestestQTPScript-20100206
    • yyyymmdd appended to the script name (this format ensures ordering)
    • Date is the date of creation/maintenance
  • All names have the system version attached to the name, e.g. BestestQTPScript-2.121.45.09
    • Direct link between script and system version allowing for execution against the corresponding system version (obvious benefits)
    • Script maintenance fairly simple to gather
    • Unfortunately its not always simple to get the version number

Monday, January 4, 2010

Refactoring blues

Got stuck into a restructuring of a side line project. Scary stuff when you didn't write the code yourself and have to make modify or kill decisions.

Purpose for this rendering was to simply to dump the garbage and put a little structure into the base. Up to 4 copies of a single file within a project is a great way to introduce errors.

The next refactoring session will have to try deal with:

  • Bad files names
  • Mucky murky code
  • Standardization

Sunday, January 3, 2010

VBExpress to MonoDevelop

A little look at using Ubuntu for rewriting the QTP Framework into VB.Net.

Launching the project in MonoDevelop spat out a bunch of errors. Figured that this was a simple fix as Google let me know that there was an NUnit add-in for MonoDevelop. Not quite that simple as the versions for the referenced libraries were different. Being a quick look, the resolution to this was to downgrade the version to that offered by the Ubuntu installer. This sorted a few of the errors.

The next bunch all related to a single class file. This file was a barely updated version of the VBScript original. Since nothing was really modified in this file, it was simply trashed.

Added the strict option to the code validation which resulted in a few shouts about missing parameter types. Actual fixes done on the code for these.

Then a run of the unit tests. Quite nice to have the results dished up in the IDE but apparently there is a possible way to get the results in the Express version which I'll try when back in the Window world.

As far as experimentation goes, the only prime issues are those that relate to the direct referencing of the C: drive within the unit test for the file library.  Removing this, should make it possible to remove the platform dependency for completing the development.