Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NCrunch cannot see Spring.net config file while running test
fdibartolo
#1 Posted : Tuesday, May 17, 2011 1:02:26 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 1
Location: Buenos Aires, Argentina

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!
san983
#2 Posted : Tuesday, May 17, 2011 3:10:34 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/17/2011(UTC)
Posts: 1

Hi there, I have the same issue.

Is there a way configure NCrunch to use my actual bin output folder ?

thanks!

Santiago
Remco
#3 Posted : Tuesday, May 17, 2011 7:02:13 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,143

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
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.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.039 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download