Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set up Team Foundation Server Build service to do automatic builds and testing

Our plan is to use Team Foundation Build service to do automatic builds, then use the testing facility to automatically perform testing on the build server then release that build onto the application server.

So far we have

Team Foundation Server with TF Build Controller configured

Build server with win2012, Visual Studio 2013 and Build agent configured.

SQL Server with SQL 2013 installed

Application Server with Win2012 and .netframework installed

My question is what do I need to do to set up automatic builds, and to execute the unit test harness once compilation is successful.

Also the deployment target machine will initially be DEV, however we would like to quickly build for test env and prod etc.

This is what I got so far.

  • Build Controller (Already set up I believe)
  • Build Agent (Already installed on build server)
  • Build Process Template (Do I need to do anything with this. Is this what controls the whole lot)
  • Team Build Definition (I had a look at this, and it seems to use the build process template)
  • Drop Folder (I am assuming this is where the executables will be dropped into).

At the moment I have bits and pieces of info, what I would like to know is how this whole thing is hanging together. From the moment the developer wants to do the build to the moment that exe is placed into the DEVAPPSERV (Development application server).

Is anyone able to point me in the right direction or give a summary of what I need to make this happen?

Many thanks,

Dalibor

like image 694
Dalibor Avatar asked Sep 02 '14 23:09

Dalibor


People also ask

What is Team Foundation Server in testing?

Team Foundation Server (TFS) is an ALM product from Microsoft which provides the capabilities for an end-to-end development and testing using Work Item Management, Project Planning (Waterfall or Scrum), Version Control, Build/Release (Deploy) and Testing capabilities.

How do I create a build and release in TFS?

In the TFS web portal, open the desired project. Select Build and Release and then Builds in the Navigation bar. Click the +New button to create a build definition. On the Select your repository page, select the preferred repository type and Continue.


1 Answers

  1. Install TFS Server (TFS Disk) Create a Team Project Collection and any desired Projects
  2. Install TFS Controller + Agents onto a dedicated machine (TFS Disk) Configure only the build options if on a different machine to the TFS Server
  3. Configure Build Controller to connect to a Specific Team Collection on your TFS Server
  4. Install VS Premium or higher on build machine, if you want code coverage results for your tests
  5. Add some code to TFS Source Control
  6. Create a Build Definition using the default template.
  7. Configure the build definition.
  8. Set the working folder for the build, include only what you need as this will speed up the process
  9. Point the definition to your .sln or proj file.
  10. Ensure testing is enabled and that your test assembly names will match the regex used to identify test dll's i.e. name your test assemblies with the word test.
  11. Set the trigger to be CI or what ever flavour of build you require i.e. gated build
  12. Save the build definition
  13. Trigger a manual build and debug any issues
  14. you should have the basics done and a repeatable build created.

That should cover the basics, you may want to customise the build template (see Ewald Hoffman's guide for tips), you may want to narrow down your code coverage (look for runsettings file info). If you follow these steps you should be able to get a basic build created and running from these, if you hit any issues you can come back and ask specific questions about a particular area

like image 121
Just TFS Avatar answered Nov 15 '22 07:11

Just TFS