私はしばらくの間、Nhibernate と Sqlite と共に MbUnit を単体テストに使用してきました。
現在、Jenkins を使用して CI サーバーをセットアップしようとしています。Jenkins を構成して、github からコードをプルし、誰かが github にプッシュするたびに MSBuild を使用してコンパイルすることに成功しました。最後に、ビルドが成功するたびにコードのテストを実行したいと思います。
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 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 ---
SOで言及されているいくつかの解決策を試しましたが、解決できませんでした。唯一の近いことはこの回答でしたが、構成ファイルに追加することでユーザーが何を意味するのかわかりません。
テストがコマンドラインから失敗する理由は誰にも分かりますが、VS 内から実行しても問題ありませんか?
ありがとう。