Wednesday, 3 December 2014

Test Script Management

The problem

Many organisations need to create test scripts as proof that the software system testing has met the requirements. For regression testing to be done you are likely to want to re-use test scripts from a library too.

The solution for many organisations is to maintain a library of tests organised into excel spreadsheets that detail the steps required. I've used them myself, and they are invariably tedious and clunky.

A Better way?

So surely there is a software solution we can use instead? Something to maintain a library of test scripts, and allow us to associate them with test plans? Yes, yes there is!

If you search for Test Script Management software you'll find quite a few options, both free and commercial. I decided to give TestLink a try - because its free, and seems to have all the required features. The documentation is also a lot better than most open source projects!

Set up

I work in a Microsoft shop, so I wanted to get this running under IIS, and ideally using a SQL Server database. Theres no reason this shouldn't work, as PHP is well supported on windows, and Testlink has the ability to work with SQL Server databases. However I didn't yet have PHP installed, and there were a few gotchas. The complete set of steps to install Testlink under IIS with SQL Server 2012 are below (also posted onto the TestLink forums)

  1. Use Web Platform installer in IIS to install php 5.5.11 (php 5.6 doesnt have an official SQL SERVER driver yet)
  2. Download Microsoft Drivers 3.1 CTP for MS SQL on php from ... x?id=20098
  3. After extracting, copy Non-thread safe versions: php_sqlsrv_55_nts.dll & php_pdo_sqlsrv_55_nts.dll to C:\Program Files (x86)\PHP\v5.5\ext
  4. Use the php manager in IIS to enable an extension for php 5.5 and enable the 2 dlls above
  5. PHP drivers above require Microsoft ODBC Driver 11 for SQL Server - get from ... x?id=36434
  6. Download testlink 1.9 (latest) from ... ink%201.9/
  7. Extract to a directory, and set up a new site in IIS pointing to directory
  8. Set Network service to have modify permissions on the \logs directory and \upload_area directory.
  9. Edit and set $g_repositoryPath to physical disk location of upload_area directory without a trailing slash - eg: D:\IISroot\TestLink\upload_area
  10. Do the same for logs directory and save file.
  11. Fix MSSQL Scripts:
    - Open file: D:\IISroot\TestLink\install\sql\mssql\testlink_create_tables.sql on Line 982 fix PK constraint name (from PK_req_relations to PK_testcase_relations )
    - Open (mySql) file: D:\IISroot\TestLink\install\sql\mysql\testlink_create_default_data.sql and copy lines 81-87 & 129-135 into (MS SQL) D:\IISroot\TestLink\install\sql\mssql\testlink_create_default_data.sql
  12. Open site in browser - follow the setup.
    - You need to use a SQL Server login (not windows) for setup.
    - for the testlink database user pick a complex password or it will fail to setup the user (not a big deal as can do manually later)

With these steps all completed you are ready to log in and start using Testlink to manage your scripts!
I'll post a follow up later detailing the how to use, but for now I'll just say I'm very much liking it. The UI isn't the world's prettiest, but it works well once you've worked it out. Look in the documentation dropdown in the left most panel for starters!

Tuesday, 2 December 2014


Hello world!

As a software developer who's been cutting code as a means of income for over 8 years, I figured its high time I started my own blog. I'm hoping to update this blog with useful stuff whenever I discover a cool new technology/method, or solve a particularly interesting problem. You can also expect to find other random musings.

A bit about me

My name is James, and I've been a software developer in the .NET world since 2006.  Over the years I've worked on projects in everything from classic ASP/COM+ to the latest ASP.NET MVC versions, with a lot of variation along the way. Much of the stuff I work on uses Microsoft SQL Server databases.

I'm originally from Australia, but now live in Manchester, UK - a city famed for its football and ... being rainy?