cancel
Showing results for 
Search instead for 
Did you mean: 

Can't access DB Table when trying to schedule automated test

SOLVED
New Contributor

Can't access DB Table when trying to schedule automated test

Hi my test keeps failing because it can't access the accessdatabase engine even if it's already installed on my computer.

 

when i'm running manually the script runs smoothly but when i'm trying to use the task scheduler it can't access the Database.

 

here is the .js script that im using

var objShell = new ActiveXObject("shell.application");
var objShell = objShell.ShellExecute("C:\\Program Files (x86)\\SmartBear\\TestExecute 12\\Bin\\TestExecute.exe", "\"C:\\Users\\primatester1_svc\\Documents\\Primaforalltraining Script 311\\Test New\\Test Automation_PRIMA for ALL.pjs\" /r", "", "open", 1);

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Can't access DB Table when trying to schedule automated test

STarting with TC/TE 12.4, there are two versions of the tool installed: a 32-bit version and a 64-bit version.  By default, all icons in Windows created on installation point to the 64-bit version. 

 

This is important when working with database drivers and such because they are installed, also, as 32-bit or 64-bit.  Theoretically, I'd be willing to bet that your manual runs are using the 64-bit version of TestComplete and that you're using the 64-bit database driver.

To test this theory, change your ShellExecute like so

 

var objShell = objShell.ShellExecute("C:\\Program Files (x86)\\SmartBear\\TestExecute 12\\x64\\Bin\\TestExecute.exe", "\"C:\\Users\\primatester1_svc\\Documents\\Primaforalltraining Script 311\\Test New\\Test Automation_PRIMA for ALL.pjs\" /r", "", "open", 1);


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

3 REPLIES 3
Highlighted
Community Hero

Re: Can't access DB Table when trying to schedule automated test

STarting with TC/TE 12.4, there are two versions of the tool installed: a 32-bit version and a 64-bit version.  By default, all icons in Windows created on installation point to the 64-bit version. 

 

This is important when working with database drivers and such because they are installed, also, as 32-bit or 64-bit.  Theoretically, I'd be willing to bet that your manual runs are using the 64-bit version of TestComplete and that you're using the 64-bit database driver.

To test this theory, change your ShellExecute like so

 

var objShell = objShell.ShellExecute("C:\\Program Files (x86)\\SmartBear\\TestExecute 12\\x64\\Bin\\TestExecute.exe", "\"C:\\Users\\primatester1_svc\\Documents\\Primaforalltraining Script 311\\Test New\\Test Automation_PRIMA for ALL.pjs\" /r", "", "open", 1);


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

Highlighted
New Contributor

Re: Can't access DB Table when trying to schedule automated test

Hi, Thank you it actually worked!!

Highlighted
Community Hero

Re: Can't access DB Table when trying to schedule automated test

Glad to know! Happy testing!

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
A new challenge is here!

Create a function to drag one element to another for the TechCorner tag!

Will you dare to take the challenge?


Scripts created in July:
- Passing custom command-line arguments as a test parameter
Top Kudoed Authors