3
votes
2answers
551 views

How do you get the iteration / line number from TestContext in data driven tests?

I've implemented a data driven test using MsTest framework. I was wondering if there was a way to get the iteration / line number of the current test code from the TestContext object? As far as I ...
1
vote
1answer
46 views

Data Driven Test Removes Whitespace

I am writing a unit test to test the following method. public void MyMethod(string parm1) { // Validate parm1. string[] invalidTokens = new string[] { "/", "{", "}", ".", "--", ";", " ", ",", ...
0
votes
1answer
145 views

Data driven tests using nested xml data file

I need to write a unit test driven by a data file that contains collections of data. For obvious reasons a csv file isn't appropriate, but XML suggests itself. However I can't seem to get it to work. ...
0
votes
0answers
154 views

Data Driven ms-test unable to find xlsx file

I'm pulling my hair out with this one! I've tried everything I could and just cant get it to run the unit tests! can anyone see whats wrong? [DataSource( "System.Data.OleDb", ...
0
votes
0answers
33 views

Data Driven MsTest unable to find xlsx file [duplicate]

Possible Duplicate: Data Driven ms-test unable to find xlsx file I'm pulling my hair out with this one! I've tried everything I could and just cant get it to run the unit tests! can anyone ...
0
votes
0answers
53 views

DataSource attribute missing from WinRT testing framework?

I'm writing an app for Windows 8. I need to do some data-driven testing but I can't find DataSource attribute in WinRT version of MsTest. Does someone have a solution to write data-driven tests using ...
0
votes
0answers
137 views

ODBC Error in configuring excel file with mstest

In my data driven MSTEST application am trying to configure Excel file in app.config as follows <configSections> <section name="microsoft.visualstudio.testtools" ...
0
votes
0answers
269 views

Data driven database unit test in VS 2010

I wrote a simple data driven unit test that calls a stored procedure passing it a parameter contained in a separate table. For each row in that test data table, the stored procedure gets called. This ...
3
votes
1answer
3k views

Problems with data driven testing in MSTest

I am trying to get data driven testing to work in C# with MSTest/Selenium. Here is a sample of some of my code trying to set it up: [TestClass] public class NewTest { private ISelenium selenium; ...
0
votes
1answer
304 views

Concatenating strings in DataSource for data-driven unit test

I am experiencing a strange problem with a data driven unit test. The data is stored in an xls-file. When I use the following connection string, everything works fine. [TestMethod()] ...
1
vote
1answer
200 views

Test Driven unit testing with stored procedure in VS 2010

I have a class (Not (DAL)) that get's data from DB and give it to me in required format(in specific class format). Now i need to write a unit test case, but TestContext Data row always return me ...
5
votes
5answers
400 views

Is there a way to use data that's already in memory to drive unit tests?

I know I can use data in files to drive unit test, for example data inside a csv or xml file. For example: [TestMethod] [DataSource( "Microsoft.VisualStudio.TestTools.DataSource.CSV", ...
1
vote
1answer
560 views

Duplicate the behaviour of a data driven test

Right now, if you have a test that looks like this: [TestMethod] [DeploymentItem("DataSource.csv")] [DataSource( Microsoft.VisualStudio.TestTools.DataSource.CSV, "DataSource.csv", ...
0
votes
1answer
591 views

TeamCity MSTest Not Reporting All Tests: Failed to read testDuration

I am pretty new to Team City and Jet Brains products in general. I'm using MSTest for running some tests (VS Unit Tests). I was able to configure Team City to run the tests using a metadata file and ...
3
votes
1answer
3k views

Data driven testing in MSTest - problem with TestContext.DataRow

I'm having essentially the same problem as the question linked below, but I cannot seem to get it to work. I'm getting "cannot apply indexing [] to an expression of type System.Data.DataRow". As far ...

1 2
15 30 50 per page