Question

I've been using MbUnit for unit testing for a while, along with Nhibernate and Sqlite.

I am now trying to setup a CI server with Jenkins - I have successfully managed to configure Jenkins to pull the code from github and compile it using MSBuild everytime anyone pushes to github. Finally I want to run tests on the code on each successful build.

The tests all run successfully when run from within Visual Studio without any problem whatsoever, I can run each test individually or the whole project and they all run OK. However when I call Gallio.Echo.exe from command line all the tests that have to do with Sqlite fails.

This is what I've been doing to run the test from command line:

"C:\Program Files\Gallio\bin\Gallio.Echo.exe" /report-type:Html /verbosity:quiet "D:\MyProject\MyProject.Tests\bin\Debug\*.Tests.dll"

(ps: There seems to be absolutely no documentation about gallio tools - have I been looking in all the wrong palces? I want to find more about the command line arguments that I can pass)

The tests fail with this:

   Gallio Echo - Version 3.3 build 454
   Get the latest version at http://www.gallio.org/

   Initializing the runtime and loading plugins.
   Verifying test files.
   Initializing the test runner.
   Running the tests.
   [failed] Fixture MyProject.Tests/VerificationTests
   Set Up
   FluentNHibernate.Cfg.FluentConfigurationException: An invalid or incomplete configuration was used while creating a SessionFactory. Check PotentialReasons collection, and InnerException for more detail.

    ---> NHibernate.HibernateException: Could not create the driver from NHibernate.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.
   HResult: -2147024809
      at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
      at NHibernate.Driver.ReflectionBasedDriver..ctor(String providerInvariantName, String driverAssemblyName, String connectionTypeName, String commandTypeName)
      at NHibernate.Driver.SQLite20Driver..ctor()
      --- End of inner exception stack trace ---  

I've tried a few solutions mentioned around on SO but haven't been able to solve it. The only close thing was this answer but I am not sure what the user means by adding to config files.

Anyone has any idea why the tests fail from command line but are okay when run from within VS please?

Thanks.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top