Forum Discussion
North-E
16 years agoOccasional Contributor
Hi, Jared!
No, it doesn't. According to Windows Script Host reference not full title is acceptable if it begins or ends by this string:
http://msdn.microsoft.com/en-us/library/wzcddbek%28VS.85%29.aspx
...and the script really executes the following commands and logs this caption to TC's log but only after human's actions.
By the way, returning to handling exceptions in different units...
My tests are data-driven and, in general, have the following view:
function SCM0025()
{
Application.Run(); // starts the application using "Application" unit function
var R;
var DataDrivenTest = new CDataDrivenTest("testcase0025.csv");
while (!DataDrivenTest.EOR())
{
R = DataDrivenTest.GetRow();
try
{
// iteration commands called from different units
}
catch (e)
{
Log.Error(e.description);
}
}
DataDrivenTest.Finish();
}
CDataDrivenTest is my own class that uses DDT object to read CSV-files. Due to we can't handle exceptions in different units by general "try...catch" construction I have to put this one to most functions in other units, for example:
// Another unit
function DoSomething()
{
try
{
// we are doing something here
}
catch (e)
{
Application.Terminate(e);
}
}
If an exception occurs Terminate() function from "Application" unit will be called. I close/terminate the application there if it's still alive, and then stop current test execution by Runner.Stop(true) call. It is good to continue project's testing with next test item. But I would execute the failed test with next data rows from CSV-file. Probably, we could add some project's variables to store test's last iteration number. But how could we re-run the failed test again saving project's test items order?
No, it doesn't. According to Windows Script Host reference not full title is acceptable if it begins or ends by this string:
http://msdn.microsoft.com/en-us/library/wzcddbek%28VS.85%29.aspx
...and the script really executes the following commands and logs this caption to TC's log but only after human's actions.
By the way, returning to handling exceptions in different units...
My tests are data-driven and, in general, have the following view:
function SCM0025()
{
Application.Run(); // starts the application using "Application" unit function
var R;
var DataDrivenTest = new CDataDrivenTest("testcase0025.csv");
while (!DataDrivenTest.EOR())
{
R = DataDrivenTest.GetRow();
try
{
// iteration commands called from different units
}
catch (e)
{
Log.Error(e.description);
}
}
DataDrivenTest.Finish();
}
CDataDrivenTest is my own class that uses DDT object to read CSV-files. Due to we can't handle exceptions in different units by general "try...catch" construction I have to put this one to most functions in other units, for example:
// Another unit
function DoSomething()
{
try
{
// we are doing something here
}
catch (e)
{
Application.Terminate(e);
}
}
If an exception occurs Terminate() function from "Application" unit will be called. I close/terminate the application there if it's still alive, and then stop current test execution by Runner.Stop(true) call. It is good to continue project's testing with next test item. But I would execute the failed test with next data rows from CSV-file. Probably, we could add some project's variables to store test's last iteration number. But how could we re-run the failed test again saving project's test items order?