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

MSTest: why is TestOutcome = InProgress after ExpectedCondition?
parallel execution of tests in same class in mstest
Running dotCover Console Runner with MsTest
How to get a test result output file attachment from remote test agent for mstest
MS Test TestResult Deployment Folders
All test methods in a package/solution in MSTest
MSTest occasionally hangs with VSTTExecution sourced error: ControllerExecution.ReleaseAllAgents: timed out waiting on m_agentsReleased
How to get NCover from TestDriven.NET to generate code coverage via the command line
Specflow running with MSTest
MS Test hangs when tried to execute the tests without installing visual studio
How to list all test categories from Mstest dll?
How to set dll search path of MSTest used with opencover?
Get a List on TestInitialize and use it on Data driven test case
mstest, how to run all tests automatically?
Listen for MsTest Events in Visual Studio Addin
Execute Test using updated .feature file without compilation

Categories

HOME
grok
google-cloud-platform
wakanda
jax-rs
mysql-workbench
oracle-apex-5
carousel
square
categorical-data
opengl-es-3.0
openbugs
magnetic-cards
http-post
oledb
topology
selinux
symbols
r-mice
onload
datastax-enterprise-graph
magento-1.8
scrollview
userdefaults
event-flow
anki
glib
github3.py
getpixel
hunspell
protege4
reason
sessionstorage
release
password-protection
c9.io
apache-stanbol
azure-arm
attributeerror
logback-groovy
knime
show-hide
facebook-social-plugins
optimizely
phpdbg
magento-2.0.7
clarifai
reportservice2010
facebook-pixel
remedy
java-6
jqchart
pdf-conversion
swingworker
donations
gets
usart
hadoop-2.7.2
myspace
mta
jboss-tools
hclust
delta
vorpal.js
lua-telegram-bot
kiosk
cortex-m
cycle2
qbxml
qt5.2
lasso
avahi
telepat
typeconverter
j-security-check
nodelist
execve
crowd
deform
contrast
sql-scripts
personalization
xml-dsig
paste
vsx
multitasking
spring-3
hibernate-entitymanager
http-patch
gpars
ui-select2
time.h
wp7test
apache-abdera
idn
dajaxice
fusefabric
josql
window-decoration
ilasm
gobject-introspection
user-tracking
matlab-load
fsevents
w3c-geolocation
inline-formset
cdonts
django-paypal
drupal-fivestar
alsb
netbeans6.1

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