kzharkov
15 years agoNew Contributor
TestComplete crashes if ScriptHost crashed
Hi!
We have encountered the problem when used our ADSI provider inside TestComplete. After some investigations we have discovered the simple scriptlet that crashes Windows Script Host if runned via cscript.exe. This very scriptlet executed inside TestComplete crashes full application.
It would be nice if TestComplete was able to "catch" such problems and just restart script host to continue next tests execution.
Next is the problem script.
var strDN= "DC=domain,DC=com";
var OU = "OU=OU%1"; // here is the main trouble - the percent symbol
var s_ObjectClass = "organizationalUnit";
var strService = "myserver.domain.com";
var strUser = "domain\\Administrator";
var strPass = "password";
var adsPath = "EDMS://" + strService + "/" + strDN;
var intServerBind = 32768;
var openDS = GetObject("EDMS:"); // get ActiveRoles Server provider
var o_Container = openDS.OpenDSObject(adsPath, strUser, strPass, intServerBind)
try
{
var obj = o_Container.Create(s_ObjectClass, OU);
obj.SetInfo(); // here is the crash point
}
catch(ex)
{
WScript.Echo(ex.Message);
}
We have encountered the problem when used our ADSI provider inside TestComplete. After some investigations we have discovered the simple scriptlet that crashes Windows Script Host if runned via cscript.exe. This very scriptlet executed inside TestComplete crashes full application.
It would be nice if TestComplete was able to "catch" such problems and just restart script host to continue next tests execution.
Next is the problem script.
var strDN= "DC=domain,DC=com";
var OU = "OU=OU%1"; // here is the main trouble - the percent symbol
var s_ObjectClass = "organizationalUnit";
var strService = "myserver.domain.com";
var strUser = "domain\\Administrator";
var strPass = "password";
var adsPath = "EDMS://" + strService + "/" + strDN;
var intServerBind = 32768;
var openDS = GetObject("EDMS:"); // get ActiveRoles Server provider
var o_Container = openDS.OpenDSObject(adsPath, strUser, strPass, intServerBind)
try
{
var obj = o_Container.Create(s_ObjectClass, OU);
obj.SetInfo(); // here is the crash point
}
catch(ex)
{
WScript.Echo(ex.Message);
}