【发布时间】:2014-04-29 16:46:27
【问题描述】:
我已将一些测试用例与项目中的单元测试相关联。该项目被构建并复制到共享上的放置位置。当我去运行这些测试时,由于 System.DllNotFoundExceptions 来自作为这些测试的一部分包含的非托管 DLL,我遇到了很多失败?
有人知道为什么会这样吗?我有一个实验室环境设置,并且测试(据说)在那台机器上运行。这些测试运行时的工作流程是什么? TestController 是将单元测试 DLL 复制到实验室环境中机器的本地某处,还是尝试直接从构建文件夹运行?
这是错误的堆栈跟踪。请注意,c:\Builds\ 不在测试机器上,这对我来说似乎很可疑。
Test method OutputProcessing.Integration.PanaceaOutputG1.ReactorCoreSimulationResults threw exception:
System.DllNotFoundException: Unable to load DLL 'ge.gnf.cedar06.c.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Gnf.Cedar.NativeMethods.ATACHF(Int32& fileCode, String fileName, Int32& openMode, Int32[] stat)
Gnf.Cedar.ManagedMethods.Atachf(String fileName, FileAccess access, Int32[] stat)
Gnf.Cedar.Cypress.CedarFile.OpenCedarFile(String path, FileAccess access, FileSizeHint hint, AuditMode auditMode, ChainingOrderOption chainingOrder, Boolean createIfMissing)
Gnf.Cedar.Cypress.CedarFile..ctor(String path, FileMode mode, FileAccess access, FileSizeHint hint, AuditMode auditMode, ChainingOrderOption chainingOrder)
Gnf.Cedar.Cypress.CedarFile..ctor(String path, FileMode mode, FileAccess access)
GE.GNF.Acumen.Cedar.DataAccess.CedarRepository.GetCedarFile() in c:\Builds\11\ACUMEN\DEV Test Build\src\Acumen\Cedar\Cedar.DataAccess\CedarRepository.cs: line 67
GE.GNF.Acumen.Cedar.DataAccess.CedarRepository..ctor(String fullFilePath) in c:\Builds\11\ACUMEN\DEV Test Build\src\Acumen\Cedar\Cedar.DataAccess\CedarRepository.cs: line 40
GE.GNF.Acumen.Cedar.DataAccess.CedarRepository..ctor(String fullFilePath, String qualifier) in c:\Builds\11\ACUMEN\DEV Test Build\src\Acumen\Cedar\Cedar.DataAccess\CedarRepository.cs: line 43
OutputProcessing.Integration.PanaceaOutputG1.ReactorCoreSimulationResults() in c:\Builds\11\ACUMEN\DEV Test Build\src\Acumen\Auto Integration Tests\OutputProcessing.Integration\PanaceaOutputG1.cs: line 58
【问题讨论】: