mardi 21 juin 2016

Quickly create an empty TFS repository

My team is doing some work where our product interacts with different source control systems. We started by supporting git and subversion, and now we have a requirement to support Microsoft Team Foundation Server (TFS). The product is a command line application, and we are doing testing using cucumber and aruba. When we did the git and svn implementations, I was able to write cucumber steps that would set up a git or svn repository very easily - the steps basically just extract a zip file into a directory, and then I can treat that directory as the svn server (in the svn tests) or as a git remote (in the git cases).

I would like to set up something similar for TFS, but so far it looks like I need to have a full TFS server running. "OK," I thought, "I'll just use Team Foundation Services and let Microsoft handle the back end." I was able to set up a project there and I have the TFS command line working with that in both Linux and Windows (yeah, forgot to mention, the command line tool and the cucumber tests run on both those platforms).

My next challenge is how to reset the TFS 'project' or 'workspace' or 'repository' or whatever they call it to a known state, and be able to do that fairly quickly (< 10 seconds or so would be ideal - I can't really spin up a VM for each scenario). Is there any way to use the command line to put a TFS repository back into a known state? Most of my tests start with an empty repository, so if I could get to there I'd be very happy.

Aucun commentaire:

Enregistrer un commentaire