views:

21

answers:

1

In my opinion, once a working copy is checked out, the automated build & test should not need a network connection to do its job.

During development, a dependency on network services may sneak in - a unit test tries to call a webservice - an xml library tries to download a DTD. I'm trying to avoid this because it makes the build fragile and fail in difficult to reproduce ways.

I'd like to do the build in an offline environment. Is it possible to set up a sandbox for that, that can be taken offline at will?

I've considered simply calling "ifdown" and "ifup" at appropriate points in the build script, although that seems fragile as well, there is the risk that "ifup" never gets called.

Another solution I'm considering is using a virtual machine. Does anyone have experience with such a setup?

Our build server is running on linux (ubuntu 9.10).

+1  A: 

I have done this with a Virtual Machine before. I would have the host machine pull a working copy from source control and share that directory with the VM ( the mechanism for that depends on the VM solution you are using ). The VM can then run the tests without having to bring the network up and down.

Rob Goodwin