Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests with csv datasource for platform x64 failing with error "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine." #325

Closed
smadala opened this issue Dec 5, 2017 · 4 comments

Comments

@smadala
Copy link
Contributor

smadala commented Dec 5, 2017

Description

CSV datasource tests for /platform:x64 fails with error "The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine."

Steps to reproduce

  1. Create MSTest v1/v2 test project

  2. Add CSV datasource tests, example below:
    [TestClass]
    public class UnitTest1
    {
    public TestContext TestContext
    {
    get;
    set;
    }

     [TestMethod, DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "DatacenterForestEnvironment.csv", "DatacenterForestEnvironment#csv", DataAccessMethod.Sequential)]
     public void TestMethod2()
     {
         foreach (var item in this.TestContext.DataRow.ItemArray)
         {
             Console.WriteLine("item: " + item);
         }
     }
    

    }
    3 Run tests with /platform:x64

Expected behavior

Tests should pass.

Actual behavior

The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (https://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.
Error details: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

@jayaranigarg
Copy link
Member

jayaranigarg commented Dec 7, 2017

User needs to install AccessDatabaseEngine_64.exe along with the fix to make this scenario work, Otherwise following error message will appears.

Error Message:
The unit test adapter failed to connect to the data source or to read the data.
 For more information on troubleshooting this error, see “Troubleshooting Data-Driven Unit Tests” (https://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.
Error details: The ‘Microsoft.Ace.OLEDB.12.0’ provider is not registered on the local machine.

@gkm2021
Copy link

gkm2021 commented Jan 11, 2018

I am using the Visual Studio 2017 with the latest update and installed AccessDatabaseEngine_X64.exe. My csv data driven tests are still failing with "Microsoft.VisualStudio.TestTools.DataSource.CSV" when I use x64 in my test settings file. It seems work just fine with x86. Now how do i get this fix that you are talking about in my visual studio.

@smadala
Copy link
Contributor Author

smadala commented Jan 11, 2018

What is the test adapter version you are using, Please share sample repro. The fix is not yet release in stable nuget package. You can update your MSTest.TestAdapter package to 1.3.0-build-20180110-01 with nuget feed https://dotnet.myget.org/F/mstestv2/api/v3/index.json . https://dotnet.myget.org/feed/mstestv2/package/nuget/MSTest.TestAdapter

@gkm2021
Copy link

gkm2021 commented Jan 11, 2018

I thought I was using MSTest adapter but it looks like I was wrong. I am using CodedUI tests and whatever default adapter Visual Studio 2017 comes with for Coded UI tests. I have a mix of API tests which are written as pure Unit Tests and UI tests which are Coded UI tests. The repro steps are exactly the same as described by you in this issue.

singhsarab pushed a commit to singhsarab/testfx that referenced this issue Apr 8, 2019
Also moves the tasks dll to netstandard.library to improve our ability to merge dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants