Questions tagged [deploymentitem]

27 questions
2
votes
1 answer

MSTest with WatiN using DeploymentItem - files not getting copied

I've been browsing through stackoverflow reading other questions about MSTest and DeploymentItem; I've followed all the advice, but nothing has worked for me. I have a folder called "ImportFiles" in my test project with a file called…
Silkster
  • 2,190
  • 15
  • 28
2
votes
2 answers

DeploymentItem fails copying directories when there are multiple test projects per solution

I have a number of test classes and methods that copy a particular directory like so: [TestClass, DeploymentItem("LanguageData", "LanguageData")] public class OcrTests { [TestMethod] public void Can_Capture_Field() { // some code…
Dave D
  • 8,472
  • 4
  • 33
  • 45
2
votes
2 answers

MSTest: A sensible way to deploy items from a common directory?

I have lost a few hairs when trying to deal with DeploymentItem recently. We have a few common directories for native dll's, and many tests depends on these. For C++ projects, we use propertypages, where these paths are defined. These can even be…
Oyvind
  • 568
  • 2
  • 6
  • 22
1
vote
2 answers

DeploymentItem(Path, outputDirectory) not working in new Unit-Test project

i'm currently working on a task in a project. We have many Test-Projects in the solution reprository, which are using the DeploymentItem() attribute(all of the Tests are working). My Problem: I created a new Directory in the root of the reprository…
1
vote
1 answer

VSTest - Test data files for SpecFlow tests do not get deployed to TestResults

I have some SpecFlow tests in a "SpecFlowTests" project in VS to run and they need some test data files. I was using a .testsettings file to deploy the files and it worked. However, the new MsTest agent does not support .testsettings anymore so I…
cris
  • 171
  • 3
  • 14
1
vote
1 answer

How to set relative path for DeploymentItem in MSTest?

A lot of people struggle with relative path in DeploymentItem. The relative path is from Solution Folder. This can only apply when run from Visual Studio, because mstest.exe is launched with compiled project (and not sln file) as dll and thus it…
Tomas Kubes
  • 23,880
  • 18
  • 111
  • 148
1
vote
1 answer

DeploymentItem Attribute causes all tests in test class to fail with error "Unable to create instance of class [TestClass]"

I'm getting a strange error when I try to run a set of unit tests where the class has a DeploymentItem attribute. The unit testing solution has 2 test classes, one to test business logic which I'll refer to as 'class a' (this one works fine…
1
vote
3 answers

MSTest - DeploymentItem attribute unavailable on windows store test project

As the title says - I can't find a way of including a file with a windows store test project. (A standard .NET test project works fine) Right click on the solution and execute : Add new project -> C# -> Windows Store -> Unit test library (Windows…
MarcE
  • 3,586
  • 1
  • 23
  • 27
1
vote
2 answers

Changing the name of a DeploymentItem

I am using DeploymentItems to deploy test files. I was wondering if it was possible to change the name of the deployed file in the deployed location instead of just doing a copy. For example: [DeploymentItem("path/to/my/file/test.txt",…
sohum
  • 3,207
  • 2
  • 39
  • 63
1
vote
3 answers

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",…
f4x
  • 126
  • 1
  • 4
  • 14
1
vote
2 answers

Is it Possible to have Dynamic - On-The-Fly DeploymentItems?

I want to write tests to check the existance (and other stuff) of certain files that will be shipped with our project. This is what I have right now: [DeploymentItem("1.pdf")] [DeploymentItem("2.pdf")] public class DoFilesExist { …
Jeremiah
  • 5,386
  • 9
  • 38
  • 45
0
votes
1 answer

Linqpad Query Needs Unmanaged Deployment Item

How do I include an unmanaged assembly with the running of a Linqpad query? I am running the latest beta (v4.42.06). I have added a reference to a working managed assembly via the f4 Query properties. I put in code to access classes and methods from…
ΩmegaMan
  • 29,542
  • 12
  • 100
  • 122
1
2