cancel
Showing results for 
Search instead for 
Did you mean: 

Pro-Tip: DDT and Bitness

Highlighted
Community Hero

Pro-Tip: DDT and Bitness

As some of you are aware, Microsoft did a "wonderful" thing to anyone using the JET database driver in a recent update.  The result is that, if you're using the DDT.ExcelDriver object in TestComplete, you may come up with errors and such about needing to install a provider (see https://smartbear-cc.force.com/portal/KbArticleViewer?name=Unexpected-Driver-Error-2017&sp=TestCompl...).

 

Additionally, TestComplete/TestExecute version 12.4x actually has a 64-bit version that can be used.  So, there is now a difficulty in determining, when using DDT.ExcelDriver, whether or not to use the ACE option.  I recently ran into this difficulty.  I have the proper driver installed as per the KB article, but if I'm using the ACE option but opt to run my tests in 32-bit, things don't always work so well.  

 

So... I needed to add some code to determine a) what bitness I'm running TestComplete/TestExecute in and b) depending upon that which Excel driver to use.  This is what I came up with:

//First, check to see if I'm running within TestExecute or TestComplete

        if (Sys.WaitProcess('TestExecute').Exists) {
            process = Sys.Process('TestExecute')
        }
        else {
            process = Sys.Process('TestComplete');
        }
//Once I determine which tool I'm using, I check the ProcessType property of the process
//If it's 64 bit, use the ACE driver
        if (process.ProcessType === 'x64') {        
            myData = DDT.ExcelDriver(Project.ConfigPath + '\\Script\\mySpreadSheet.xls', 'Data', true);
        }
//If it's 32 bit, don't
        else {
            myData = DDT.ExcelDriver(Project.ConfigPath + ''\\Script\\mySpreadSheet.xls', 'Data', false);            
        }

I can now run the same set of tests using either the 32-bit or the 64-bit version of TestComplete/TestExecute without trouble.

 

Hope this helps someone else!


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
4 REPLIES 4
Highlighted
Community Hero

Re: Pro-Tip: DDT and Bitness

I still think it's funny that the term is Bitness Smiley Very Happy

Highlighted
Valued Contributor

Re: Pro-Tip: DDT and Bitness

Hi,

I recently updated TC12.6 to 14.

Found that I have to transfer some setup (my own envirenment) to run TC14.

so desided to run 12.6 untill 14 envirenment is ready.

But erorr keep comming...

The needed data source driver is not installed or is not configured properly.
To read data, install the 32-bit version of Microsoft Office 12.0 Access Database Engine OLE DB Provider. It is part of Microsoft Access Database Engine 2010 Redistributable. You can find it on the Microsoft website

 

tried this and that and at the end...

uninstall Access database install 32-bit and even as last resort uninsatall TC14

It start working.

 

My project suite has sevaral projects in one project at the end of run stop working saying...

 

The needed data source driver is not installed or is not configured properly.
To read data, install the 64-bit version of Microsoft Office 12.0 Access Database Engine OLE DB Provider. It is part of Microsoft Access Database Engine 2010 Redistributable. You can find it on the Microsoft website. Alternatively, you can try using the 32-bit version of TestComplete

 

whent inside code and compare....

other than variables nothing deference both are true for ACE drive

 

DDT.ExcelDriver(Project.Variables.DataXL,'Pre_Data',true);

DDT.ExcelDriver(dtaFile,"Batch_update",true); 

What is the problem? both places were working fine early before TC14 installation.

Highlighted
Valued Contributor

Re: Pro-Tip: DDT and Bitness

...never mind found the error.

I 'm running projects separately from command prompt.

one is directed to TC12.6 exe in Bin folder(version x86) other x64/Bin exe.

Highlighted
Community Hero

Re: Pro-Tip: DDT and Bitness

process = Sys.WaitProcess('Test*te');

is a one-liner for

        if (Sys.WaitProcess('TestExecute').Exists) {
            process = Sys.Process('TestExecute')
        }
        else {
            process = Sys.Process('TestComplete');
        }

Smiley Embarassed

 

Just my $0.02... 🙂

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors