Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

A simple scenario:

  • 2 projects are in version control
    • The application
    • The test(s)
  • A significant number of checkins are made to the application daily.
  • CI builds and runs all of the automation nightly.

In order to write and/or run tests you need to have built the application (to reference/load instrumented assemblies). Now, consider the application to be massive, such that building it is prohibitive in time (an entire day to compile). The obvious side effect here, is that once you've performed a build locally, it is immediately inconsistent with latest.

For instance:

If I were to sync with latest, and open up one of the test projects, it would not locally build until I built the application. This is the same when syncing to another branch/build/tag. So, in order to even start working, I need to wait a day to build the application locally, so that the assemblies could be loaded - and then those assemblies wouldn't be latest.

How do you organize the repository or (ideally) your development environment such that you can continually develop tests against whatever the current build is, or a given specific build, while minimizing building the application as much as possible?

share|improve this question
    
What technology stack is it? Most stacks have their own deps managers. For node.js, npm allows you to maintain private repositories. I guess there may be the same tool for your stack. –  Florian Margaine Mar 12 '13 at 7:34
    
@FlorianMargaine: In this case, I'm working with the .NET stack –  Steve Evers Mar 12 '13 at 17:43
add comment

2 Answers 2

Package repositories like Artifactory and package management systems like Ivy and NuGet are good answers to this sort of problem. Build the packages you want to build, download the rest through a local-hard-drive cache of current versions, and you're good to go.

share|improve this answer
add comment

On a side, FIX YOUR BUILDTIME!! This is fighting symptoms not the core problem!

Your tests should come together with your code, as in the same repository. Whenever you build the tests are build also. When you run the tests it of the same generation as the code it runs against.

You check out code to build, this checkout includes the tests. These tests you run.

Again don't waste spending time trying to build less often. If it hurts do it more often! Break up the monolith, get a handle on dependencies. Use your build system to help you not touch/rebuild unchanged stuff. You need to modularize for this. Dependency inversion helps a lot here.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.