Original article published on
We are doing this todayData-drivenOfUnit TestEncountered a problem during the experiment.
I have created an Access database and an Excel table as an experimental data source for data-driven testing.
After a long time in the app. config file, I took a sigh of relief and finally began to write and test.
Compared with the twoDatabaseAfter the unit test, I opened the test view with confidence to run two tests.
As I expected to pass the unit test on Excel, the next one encountered a problem and an error occurred:
Unit Test Adapter exception: system. Data. oledb. oledbexception: Unrecognized
Database Format: 'C: \ Documents and Settings \ wanghuahau \ Desktop \ testdatasource. mdb '..
I changed the suffix of the Access database to accdb.
Confirm the suffix) and run it again. The same error is reported. I read the Excel file, but the suffix is not changed. I also use 2007.
The default suffix (XLSX) in is odd. Looked at the error. The format is incorrect. Is it system. Data. oledb?
I am not sure where the access data driver ODBC is mentioned.
Change to system. Data. ODBC and run ...... The prompt is not in another data format. Finally, I asked the boss, and he reminded me that he would
It won't be a problem between 2007 and 2003 (MDB is used in 2003 and accdb is used in 2007). I will change it to testdatasource. MDB
Save as access 2002-2003 database and run it again!