MbUnit测试直接从visual studio运行时传递,但在通过命令行运行时失败

时间:2013-10-21 11:28:11

标签: sqlite nhibernate testing mbunit gallio

我一直在使用MbUnit进行单元测试,还有Nhibernate和Sqlite。

我现在正在尝试使用Jenkins设置CI服务器 - 我已成功设法配置Jenkins从github获取代码并使用MSBuild在每次有人推送到github时编译它。最后,我想对每个成功构建的代码运行测试。

在Visual Studio 中运行时,所有测试成功运行没有任何问题,我可以单独运行每个测试或整个项目,它们都运行正常。但是当我从命令行调用Gallio.Echo.exe时,所有与Sqlite有关的测试都失败了。

这是我从命令行运行测试时所做的事情:

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

(ps:似乎绝对没有关于gallio工具的文档 - 我是否一直在寻找所有错误的方法?我想找到更多关于我可以通过的命令行参数) < / p>

测试失败了:

   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 ---  

tried a很少solutions mentioned左右,但是还没有能够解决它。唯一接近的是this answer,但我不确定用户通过添加配置文件意味着什么。

任何人都知道为什么测试从命令行失败但是从VS内部运行时可以吗?

感谢。

0 个答案:

没有答案