mstest


MSTest DeploymentItem doesn't copy files to output dir


nice day!
I have following project structure:
Solution
-My.Project
-My.Project.Test
--Resources
---mytest.file
In my test file following method:
[TestMethod]
[DeploymentItem("My.Project.Test\\Resources\\mytest.file", #"Resources")]
TestMethod()
{
....
string path = "Resources\\mytest.file"; ....
}
In according to http://msdn.microsoft.com/en-us/library/ms182475%28v=vs.100%29.aspx I want use only DeployItemAttribute without "Deployment Items property".
But when I debugged it method, I catch "File not found exception".
What can I do?
PS: also posted this question in http://social.msdn.microsoft.com/Forums/en-US/vststest/thread/474d51ee-7ab9-4311-b7b0-b21266eb01d5
Best regards!
Check the properties of the file to deploy (mytest.file).
"Copy to Output Directory" should be set to "Copy Always" (it is set to "Do not copy" by default).
Heads up that the path in [DeploymentItem("path")] is case sensitive.
For example: [DeploymentItem("MyTest.file")] is different than [DeploymentItem("mytest.file")] and will cause your deployment item to not be copied over to the TestResults Out folder.
Yes, marking my "App.config" file as "copy always" fixed it for me.

Related Links

Usage of moles.runner.exe with MSTest.exe as the test runner
Tools to view code coverage results of MSTest in Jenkins
Teamcity MSTest 10.0 no suitable build agents error
Only one TestResult folder with MSTest?
TFS build cannot publish test results if TFS server is in domain different from drop location
NLog not working with MSTest, where should the config go?
Can you invoke a control rather than launch an app for coded ui tests?
Watin accessing localhost
In MSTest's Test View, how can I get a list of all Tests with no category?
run tests from msbuild script
cruisecontrol mstest problem wenn tests fail
MSTest /noisolation fails tests
Perform Visual Studio Data Compare automatically prior to running MSTest tests
Setting up MS Tests 2010 on TeamCity?
How to run a single test case from MSTEST
Is it possible to execute code once before all tests run?

Categories

HOME
batch-file
uml
grok
facebook-oauth
fuelux
dns
github-for-windows
amp-html
css3
powerpoint
hessian
mstest
requirements
database-normalization
permissions
special-characters
qpython
watson-conversation
jsonpath
automatic-ref-counting
nancy
plink
firefox-addon
template-engine
identity-management
gmm
symbols
named-entity-recognition
inno-download-plugin
angular-routing
epsilon
xcode-ui-testing
syntax-highlighting
shared
nstimer
bioinformatics
nsurl
gitlab-api
livelink
kudu
cart
deltaspike
wacom
reactjs.net
roblox
salesforce-communities
flatmap
node-mssql
opensmpp
p4merge
tasm
odoo-website
vmware-fusion
bindingnavigator
wc
clang++
oim
puredata
dbcontext
wpas
opengl-4
boo
monkey
cd-burning
javafx-css
testrail
vcloud-director-rest-api
taocp
smartfoxserver
chromium-os
pytables
mapinfo
delta
udpclient
embedding
qiime
phpwebsocket
ellucian-scribe
aspen
realsense
exim4
relativelayout
toran-proxy
grgit
dllimport
wiredep
coda
cgi-bin
sapscript
wso2greg
jsvc
packet-sniffers
boost-program-options
viewer
formview
ray
ios8-extension
multiautocompletetextview
ora-06550
gd-graph
octal
onload-event
stacky
http-status-code-410
asplinkbutton
iboutlet
matlab-load
google-ajax-api
tournament
timthumb
xui
codebase
objective-j
dot-emacs
echo3
build-environment
google-wave
complex-event-processing
java1.4

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App