I have some tests that use NHibernate and SQLite to test in-memory my database components. The tests run fine in visual studio, however the MSTest.exe console runner refuse to run all my tests. The console runner is used by the Build Server that uses TeamCity to run all the tests, and I use the MSTest.exe on my machine to see that the local console runner also fails.
I have this inner exception :
NHibernate.HibernateException: Could not create the driver fromNHibernate.Driver.SQLite20Driver, NHibernate, Version=3.3.1.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed
Most answsers to this include adding to App.config the correct reference assembly to sqlite, however the test project is a class library.
On my test project I have referenced the following assemblies :
ClassInitialize has wrong signature. Parameter 1 should be of type Microsoft.VisualStudio.TestTools.UnitTesting.TestContext
I use the following tools :
Any idea how to proceed on this? Thanks !
Ok so finally I use the vstest.console.exe console runner to execute tests, and it works. (No idea what went wrong in there) If you're interested in coupling this runner with Teamcity, there's a good read : http://blog.dontpaniclabs.com/post/2013/06/13/TeamCity-Builds-with-the-Visual-Studio-2012-Test-Runner
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.