0

I have 1 project for my automation in testcomplete. This project contains all the scripts which are organised according to our need like 1 folder contains 10 scripts , another folder contains 15 scripts and so on.

We are facing the problem where in when we want to check specific pre conditions before running the set of scripts. For Ex: 1st folder having 10 scripts , they should only run when the machine has Win7 OS , MS Office 2007 & IE version 10.

It is kind of parameterization of a “set of scripts”. It is not keyword word based automation. It is completely scripting based. We are using Jscript as the scripting language.

vinu
  • 191
  • 2
  • 7
  • 22

1 Answers1

0

The only way I see is to create a special "runner" script for every bunch of scripts. This script will check the required conditions and if they are met, subsequently run tests from the corresponding group. You will need to run all these runner scripts (e.g. using test items), but only those that satisfy current environment conditions will actually work and the rest will exist immediately.

Update:

For example:

function testSet1()
{
  // If environment does not suit for the test set, just exit
  if (false == UtilityScripts.CheckEnvironmentForTestSet1())
    return;

  test1();
  test2();
  test3();
}

The code of the CheckEnvironmentForTestSet1 routine should perform check for OS, installed software and whatever you need.

Dmitry Nikolaev
  • 3,803
  • 2
  • 19
  • 23