Test Data File Location

0 views
Skip to first unread message

Andy Morris

unread,
Dec 17, 2009, 8:30:54 AM12/17/09
to NUnit-Discuss
I'm developing an application using TDD and NUnit that will walk thru
a folder tree, open files it finds there and manipulate them. The
files are the output from an external application. In order to test
the tree walking part I will need test folder trees with files in
them.

I would like to keep all paths in the tests relative to the test code
so that the whole folder tree of app, test and data can be kept
together, and moved to different places as it moves from dev to Uat
etc via source control..

Where should I put the test data? Can I put it in a folder under the
test code? If I do can I find the path at run time? Will that work if
the tests are run from outside the IDE? I am using the Testdriven.Net
test runner.

Charlie Poole

unread,
Dec 17, 2009, 10:29:50 AM12/17/09
to nunit-...@googlegroups.com
Hi Andy,

At run time, the current directory is set by NUnit to the
directory containing the executing test assembly. You should
be able to locate your data using a relative path.

Charlie
> --
>
> You received this message because you are subscribed to the
> Google Groups "NUnit-Discuss" group.
> To post to this group, send email to nunit-...@googlegroups.com.
> To unsubscribe from this group, send email to
> nunit-discus...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nunit-discuss?hl=en.
>
>
>

Reply all
Reply to author
Forward
0 new messages