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 6876493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:29:02+00:00 2026-05-27T04:29:02+00:00

today i set up a new ms build project in jenkins which contains unit

  • 0

today i set up a new ms build project in jenkins which contains unit tests and integration tests. Before i moved the project to jenkins, i used my local machine to run the tests (Nunit, Reshaper).

Some of my integration tests uses databases to test some logic and i configured the database file location as a static property that is used in my tests to establish a database connection.

As you can imagine this was a little problem when i moved the project to jenkins, because i did not have the database files at the same location.

To solve the problem right now i changed some SetUp() methods in my integration tests. They load a folder from a textfile and this folder points to a resource path where all my needed files are stored. Now i can run the tests on jenkins and my local machine.

I have a bad feeling about this, it feels not correct some how. What would you do to solve my problem? Mocking the files is no solution, i want to interact with the files.

Thank you!

  • 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-27T04:29:03+00:00Added an answer on May 27, 2026 at 4:29 am

    Generally, I think, it is not a good idea to take anything from files during running unit tests. Especially it is not a good idea to take anything from txt/xml/etc files which, as you suppose, will be copied to debug folder. Different unit test engines behave differently, some of them have shadow copy option and some of them might have this option switched on by default. Shadow copy will make it almost impossible to locate non-dll files in original Debug folder.

    I would recommend embedding all the data you need into the test assembly. Two ways to do it:

    1. Hardcode test data as a string in some class. Then write it to the file or consume it directly.
    2. Add files as resources which will be embedded into test assembly.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today I'm playing with localization. I have a winforms app where I've set localizable
I need to set up two machines later today for a domo of a
I set up my Hadoop clusters with Hadoop 2.0.2. Then, today I tried to
I was looking at a css file today and found the following rule set:
Consider the following: set.seed(1) RandData <- rnorm(100,sd=20) Locations <- rep(c('England','Wales'),each=50) today <- Sys.Date() dseq
This is boggling my mind today. I have a bash script to set a
Trying to learn about php's arrays today. I have a set of arrays like
I noticed when I set up my first FB app today (an iframe app
I'm new to anonymous classes, and today I think I ran into the first
I've got a .net button that has an href attribute value set to javascript:WebForm_DoPostBackWithOptions(new

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.