How to register capabilities on your build and release management agents

To run Selenium test against different browsers using our new build and release systems the browser must be installed on the agent machine.  The question is how can we identify which agents have which browsers.  Our new build and release systems use the same agents and the agents let you identify agent capabilities.

You can add a user capability but you have to do this for each agent.  If you installed 8 agents on the same machine you would have to add the same capability to each of the 8 agents.  However, there is a way to register a capability to the machine that all the agents will automatically pick up.  For example if you wanted to identify that you had version 44 of Chrome installed on a machine you can simply define a System Variable.

After doing so, restarting your agents will have each of them automatically pick up new capability.

Now you can define Chrome as a demand on your build or release and only agents that have the Chrome capability will be selected to execute the build or release.

Comments (10) -

  • Great Post Donovan, I was at Build 2015 when you demonstrated some of these features.  This Environment variable setting is very helpful.  One thing I am curious about.  I noticed that some of the demands are coming from a location other than Environment variables.  If I were to say install software on the machine, is there another location I could use to add the "demand" to the system?  I would prefer not to have some persnickety sys admin decided to clean up the Environment Variables one day and screw my demands up.

    Thanks again, great work on the new TFS
    • Sorry for the delay. You can use the User capabilities section on the Agent pools page from the Administration pages of your VSO account.  That way only VSO administrators can control the capabilities.
  • Thanks for a great post.

    Sorry for being late to the party, but I have a question regarding User Capabilities. According to this page: (see the description of User Capabilities), it's possible to use User Capabilities to specify paths for tools on a specific agent. I can't find any other documentation about this and I can't get it to work, so I'm wondering how I do this?
    • Trying to track down an answer.
      • I'm also struggling with this: I have user capabilities specifying the local path of a specific tool, which can vary per agent. Now all I need is a way to get that path exposed but I haven't found the solution yet.
      • I believe there is a bug here, unless i'm missing something.  on-prem tfs 2015 update 2.  if you create user capability for a agent then I cannot use that value in the builds.  for example, under hosts > agent I created a user capability called "PathtoXYZ" and when I tried to use this in by build $(PathtoXYZ) it would not be found.  even tried restarting the agent. no luck. Frown
  • Hi Donovan,
    We updated java home path in a Linux agent but the Agent is not picking that change - it is still referencing the old version.  The agent was re-started but this did not solve it.  Any thoughts?
    • Stop the agent
      cd to agent folder
      delete .env

      You should get a new .env

      start agent.
  • I have specified an agent-specific value as a User Capability which I want to retrieve during a build as a variable. The VS documentation ( implies that this is possible, but no variable or value exists when the build is running. (I'm using TFS 2015 Update 3) Am I missing something here? How do I access the User Capability name/value pairs from within steps in my build? Thanks.
    • I think they are in env vars.

Pingbacks and trackbacks (4)+

Add comment