Hi, all my tests are running ok but the ones n my dao layer, which is the only one accessing a test database, as the other layers are mocked accordingly.
While running those tests, looks like the spring config file cannot be found, but if I navigate to that folder, I can see the file there; in this case: test-db-connection.xml
Here is a piece of the stack:
SetUp : Spring.Objects.Factory.ObjectDefinitionStoreException : IOException parsing XML document from file [C:\Users\fernando.di.bartolo\AppData\Local\NCrunch\5744\32\x\OneGlobal.Test\config\test-db-connection.xml]
----> System.IO.FileNotFoundException : file [C:\Users\fernando.di.bartolo\AppData\Local\NCrunch\5744\32\x\OneGlobal.Test\config\test-db-connection.xml] cannot be resolved to local file path - resource does not use 'file:' protocol.
Any suggestion?
Thanks a lot!
Build/Test Issues
NCrunch cannot see Spring.net config file while running test
Started by fdibartolo on 8,992 views
Hi there, I have the same issue.
Is there a way configure NCrunch to use my actual bin output folder ?
thanks!
Santiago
Is there a way configure NCrunch to use my actual bin output folder ?
thanks!
Santiago
Remco NCrunch Developer
#60
17 May 2011 19:02 UTC
Are you guys using any interesting build steps, such as config substitution? I've seen this happen quite often with people that use pre/post build events to manipulate configuration, but then leave these events turned off in the NCrunch configuration.
Another one to check is whether the file is properly included in the project file so that NCrunch knows it exists.
Have you had a look through the troubleshooting sections? (for tests and builds). Skimming through this and the related documentation can help to give a detailed description of how the workspacing needs to be considered.
It's always possible to get this working without needing to reference your normal bin directory - which would be impossible to do reliably as the engine can't guarantee the state of the files in this location.
Another one to check is whether the file is properly included in the project file so that NCrunch knows it exists.
Have you had a look through the troubleshooting sections? (for tests and builds). Skimming through this and the related documentation can help to give a detailed description of how the workspacing needs to be considered.
It's always possible to get this working without needing to reference your normal bin directory - which would be impossible to do reliably as the engine can't guarantee the state of the files in this location.
Post a reply
Log in to reply.