Все вопросы: [mstest]

151 вопросов

похожие теги:
0
голосов
1ответов
340 просмотров

Relative paths with NCover and MSTest.exe

I know this is stupid, but I can't figure it out. In our solution, we specify the relative paths to a file one of our tests needs as - ../../../TestSuite/IniTestFiles/LocalRedir1.xml Now, this works fine when running the testing out of VS with MSTest.exe. However, in NCover all of the tests fai...

0
голосов
1ответов
1009 просмотров

MSTest & Silverlight Unit Test Framework Tutorials

I'm sorry if this appears elsewhere, it may be that my Google-Fu is failing me. I'm in the process of reading Roy Osherove's The Art of Unit Testing and am thrilled to be able to start doing some Test-First work on my current project. Roy's book uses NUnit as the basis for it's training. I fin...

4
голосов
2ответов
1344 просмотров

Silverlight Unit Testing

I've searched for this info and see similar questions, but not one that matches very closely to this. If I missed one, I apologize. I was hoping that you'd be able to point me in a direction. I'm working on a Silverlight based project and my team is finally moving toward implementing unit test...

3
голосов
2ответов
1018 просмотров

Unit Testing a Customer's Installation (with NUnit and MSTest)

I've developed a large base of unit tests for my company's application, and dev would like to hand my unit tests over to our support department to help them debug customer installation problems. I wrote my unit tests using mstest, so support would have to install Visual Studio on a customer's ma...

0
голосов
1ответов
340 просмотров

MSBuild, VS2008 solution and CI - what are the best practices?

I am setting up a CI system for VS2008/C# desktop project, nothing fancy, just a build/test cycle. CI will be running under Hudson using MSBuild/MSTest, but I can't seem to decide on a how to do a few things, maybe you can help me out? My options for running the project in the CI are: Run the ...

0
голосов
2ответов
297 просмотров

VisualStudio.TestTools.WebTesting.TestDescriptionAttribute Syntax

What is the syntax to use the [TestDescriptionAttribute][1] of a test to populate the Description column in the Test Results window? Context: Visual Studio 2008 Team System I've read the documentation, but am not able to find a concrete example. Based, loosely, on Ngu's suggestion, I've tried...

2
голосов
1ответов
531 просмотров

MVC Unit Testing with Linq to Sql

I have a controller that is working in my site but failing during unit testing. It is pretty simple and depends on Linq to Sql to return a collection of JSON objects. The Test fails because the DataContext can't find the connection string when called from outside the MVC project. I had a look ...

8
голосов
4ответов
3545 просмотров

Merge several mstest trx files into a single trx file

We use Visual Studio 2008 and MSTest. We have a batch file that the developers use to get latest version, build solution, run database scripts and run all tests. The problem is that we have many test projects. So at the end the developer must open each trx file to check if anything failed. Is ...

6
голосов
2ответов
2413 просмотров

Testing ASP.NET MVC website

I'm working on an MVC site with an image upload capability and I want to write a test that will upload an image. I made an image called TestImage.jpg and set Copy to Output to be "Copy if Newer". In my test I try to load that with the following code: System.Drawing.Image testImage = System.Draw...

36
голосов
12ответов
7763 просмотров

Is there anything I can do in NUnit that I can't do in MSTest?

This question has been asked in various forms in a number of different forums, but, IMHO, I haven't been able to find a place where it's really answered clearly, so I'm going to reframe it and ask it again. I work in a basically Microsoft Shop. We use TFS, and all of our developers have MSDN sub...

5
голосов
1ответов
1135 просмотров

Change Default MsTest Unit Test Wizard Template

My team is using the unit test wizard, but has found the amount of cruft generated annoying. Is there anyway to modify this template? Thanks

27
голосов
2ответов
5116 просмотров

How do I verify that the expected array is the actual array in MSTest?

The following method fails: [TestMethod] public void VerifyArrays() { int[] actualArray = { 1, 3, 7 }; Assert.AreEqual(new int[] { 1, 3, 7 }, actualArray); } How do I make it pass without iterating over the collection?

1
голосов
1ответов
703 просмотров

Has anybody integrated NCover with TFS?

Over the past year my group (some 50 engineers) moved onto Team Foundation Server and are now using it for source control, bug tracking and building. We have tens of thousands of lines of existing NUnit code that we continue to rely on and which we will never convert to MSTest. We have our buil...

5
голосов
2ответов
2353 просмотров

How to deploy directories to test output folders in Visual Studio 2008 Team System?

When open my LocalTestRun.testrunconfig file Deployment section I can choose which files are deployed to the Test output folders, but I need that a specific file to be deployed in a given subfolder. How to do that?

0
голосов
2ответов
194 просмотров

Assembly context being changed in MStest- Possible to avoid?

I am trying to use MSTest on our code base. Now I am running into different problems during this. We implicitly use _getDefaultName from Microsoft.Practices.EnterpriseLibrary.Data and it gets the default connection string in the current Assembly's App.config. Since this test project would be a ...

3
голосов
2ответов
1728 просмотров

What is the MSTest Attribute for including a test resource?

I want to have a test resource that is available during my test and I know there is an attribute that deploys the item. What is the attribute?

61
голосов
3ответов
19643 просмотров

Global test initialize method for MSTest

Quick question, how do I create a method that is run only once before all tests in the solution are run.

6
голосов
1ответов
7417 просмотров

app.config for unit test assembly: how to make the appsettings 'file' attribute work?

I need to read a setting from the appsettings section (defined in app.config) in a unit test. We're using mstest in this project. Say this is the app.config: <configuration> <appSettings> <add key="MyAppSetting" value="MyAppSettingValue"/> </appSettings> </config...

17
голосов
8ответов
7556 просмотров

Is summary necessary in unit test method

Since the naming of a unit test method makes its purpose more meaningful, is it necessary to add a summary to a unit test method? Example: /// <summary> /// Check the FormatException should be thrown when a give country data line contains a invalid number. /// </summary> [TestMethod...

3
голосов
2ответов
1259 просмотров

Switching from MSTest to another unit test framework in VS 2010

Visual Studio 2010 offers a lot of comfortable tools for unit testing via its built in test runner. Unfortunately we can't use MSTest for our unmanaged c++ codebase. Is it possible to switch from MSTest to e.g. Google.Test and have it integrated with the built in Visual Studio test runner? Than...

2
голосов
1ответов
342 просмотров

Are there MSTest collection constraints that are similar to NUnits

I am working on a project utilizing MSTest and I need similar constraints for testing arrays/lists that NUnit provides (http://www.nunit.org/index.php?p=collectionConstraints&r=2.4.8) Is there anything similar built-in or as an add-on to the MSTest framework?

2
голосов
3ответов
1528 просмотров

MSTest for huge legacy codebase

we have a huge codebase with about 1000k lines of native/unmanaged legacy c++ - code and we are going to provide the code with unit tests and MSTest would fit perfectly in our current development environment (TFS, VS 2010, ...). I know that MSTest is orginally meant to test managed code but its a...

8
голосов
3ответов
3095 просмотров

Resharper problem with unit tests

I'm having a little annoying problem with resharper trying to run my unit tests, using mstest. I can select an individual unit test and run/debug it fine but when I select the parent node to run a bunch of tests, the tests don't run; it just displays pending for a few seconds and then the test go...

1
голосов
1ответов
317 просмотров

MSTest doesn't find tests when switching from MbUnit to MSTest

We had a test project that started out as MbUnit v3 / Gallio but decided to go to MSTest. We took out the Gallio/MbUnit tests and added the reference to the MSTest stuff (Microsoft.VisualStudio.QualityTools.UnitTestFramework) and swapped out the C# attributes to use MSTest verbiage ([TestMethod],...

17
голосов
4ответов
9175 просмотров

Equivalent of assert.warning in mstest?

is there a MsTest Equivalent of Assert.Warning in MbUnit ?

0
голосов
4ответов
3007 просмотров

XML data for Unit testing

We are looking to run a large amount of data through some unit tests. We would like to define this in some sort of excel spreadsheet or XML document. Is there away to get the unit testing framework to load this data as input and expectations. I can foresee this having issues with exception cat...

0
голосов
3ответов
214 просмотров

In migrating from Java to C# what should I know about accessor classes

I am a Java programming now also writing in C#. I have seen Accessor classes generated by the VS test generating software (to give access from Tests to private members or functions). Should I be creating Accessors deliberately and if so why

0
голосов
2ответов
320 просмотров

MSTest crash during a build in TFS 2008 SP1

I've never managed to make MsTest works during the build of my solution on TFS. When I look the build log, I see this that TFS want to execute MsTest : "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe" /nologo /searchpathroot:"C:\BinaryRoot\TFSBuild" /resultsfileroot:"C:\Test...

5
голосов
4ответов
3650 просмотров

Organization of Unit Tests in Visual Studio

I'm currently creating a paired unit test assembly for every assembly in my project, both are in the same folder. MyProject/MyProject.csproj MyProject.Test/MyProject.Test.csproj Looking at open source projects, I've seen some smaller project put all tests in one assembly, and other split it o...

1
голосов
2ответов
674 просмотров

Running mstest *without* it using a ThreadPool

I'm writing some managed code to wrap a the native calls for IntervalZero's RTX product. RTX basically enables real time coding under Windows by setting up a kernel proxy. What's important here is that RTX generates the proxy when DllMain gets called with DLL_THREAD_ATTACH (and tears it down on...