Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6472899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:24:03+00:00 2026-05-25T06:24:03+00:00

Background: In our project, we have a bunch of xml files that define tests

  • 0

Background: In our project, we have a bunch of xml files that define tests that are loaded into a report generator. Since we want to make sure our tests stay accurate, we have data driven unit tests set up to test that the xml input produces the same output. This is currently held in a large excel spreadsheet, and works great with Visual Studio’s data driven unit tests. But, this leads to problems because often more than one developer will be working on tests, and they will need to get the spreadsheet to add the unit tests. If another developer has the spreadsheet, then they are stalled waiting on it to get checked back in since VS can’t merge the excel file. In addition, we are wanting to switch to git, and this approach won’t work well there either due to the lack of locking on checkouts and inability to merge binary files.

So, we are trying to switch to having a separate file for each individual test’s set of unit tests in a folder. Then, when the unit tests are run, we load up all the files in the folder and run the test data in each of the files. This way, when a developer makes a new test, they just have to add a new file for the unit tests, instead of having to add an entry to a central file.

The data format is going to be the same across all the files, so really, even concatenating them together should work. But, I’m trying to do this and retain the data driven behavior where each row in the test data is equivalent to one test in the output; they all pass or fail/produce output messages separately.

Is it possible to run a data driven unit test off of multiple files? If so, can we still retain the ‘one row == one test’ style output in the results?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:24:04+00:00Added an answer on May 25, 2026 at 6:24 am

    I wound up having a ClassInitialize method for the unit test class and made the class include the folder of files I needed as a deployment item. Then, the ClassInitialize method took all of the data files in the folder and concatenated them together. The other tests in the class then referenced this file in their DataSource attribute. This allowed me to use the multiple file layout and still retain the output style we wanted.

    Main lesson out of this: The data source file for a data driven unit test does not have to exist at compile time, apparently.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an application that downloads some files in the background. Our application pops
Background A project installs some files that contain all the elements to define a
Background: We have a TFS server setup where me manage our source code and
Background: At my company we are developing a bunch applications that are using the
Some Background I have been using Git for a while now. The projects that
I have a single server that hosts our production and development databases. It's running
Background: I work in a suite of ASP.NET applications that have several different modules.
First some background information: We have three environments for our EJB3 application: test, development
Background: We use github for our project and I work on my own fork
Background: We have a ClickOnce-deployed WPF app, that talks to WCF Services, which in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.