views:

51

answers:

1

I've been asked to help out with a project which has made extensive use of VBScript to process a whole bunch of text files and generate certain outputs - sanitized files, SQL entries etc.. The script is going to be scheduled to run as a Scheduled Task with operation based on the parameters passed to the script. There's no user interface.

Are there any tools out there that I can use to automate the testing?

Can I write unit tests that target specific functions within the script without executing the script's start up code etc..?

+1  A: 

It sounds like you should be looking at tools at the acceptance/functional/system level rather than unit level.

A good match for what it sounds like you're trying to achieve might be (I've never used it in production) TextTest. It will allow you to run your scripts and analyse the text that being returned, the documentation is fairly thorough and there are decent tutorials.

It's impossible to answer whether or not you can run the scripts without the startup code, but it should be possible to refactor that code away into separate files/routines (either scripts or ini files or a combination of both) and get test specific versions returning canned answers which will allow you to isolate the methods under test. This is the same principle as with any test setup.

FinnNk