7

i want to develop a vsts extension.

the describes process of a development cycle is:

  1. develop
  2. package
  3. publish
  4. upload
  5. test

this sound a litte cumbersome to me as it takes a lot of time to test the development.

is there any way to speed up a development cycle?

is there any way to mock a TFS?

Daniel
  • 9,491
  • 12
  • 50
  • 66

4 Answers4

9

To speed up development, you can set the baseURI property in your extensions manifest to localhost.

You need to deploy your "localhost-extension" only once, because it allways refers to the instance running on your machine locally.

The whole procedure is desribed in the following blog-post: https://realalm.com/2016/03/11/debugging-your-vsts-extension/

1

In one word, the answer is webpack.

Making VSTS Extensions Development Easier

This is a very well written article. It explains all the steps and tools required for

  1. CI/CD
  2. Automated Testing
  3. Development Cycle Time
  4. Dependencies & Dependency Management

The feature is called Hot Reload and Debug.

Still Clueless about the how-to steps: Follow this devblogs link and its example code in this GitHub repo.

Shubhjot
  • 73
  • 1
  • 8
0

No, you can’t, the extension need to be deployed to VSTS, then you can test it.

There is a VSTS Extension Tasks extension that can package and publish easily.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
starian chen-MSFT
  • 33,174
  • 2
  • 29
  • 53
0

Well.. there is hacky way to do that, at least in case of testing extension on Self-hosted Agents which you can manage.

Every Agent stores Extensions data in _work/_tasks/<extension_name><Extension_GUID>/<version> inside of Agent Home directory - eg. C:\VSTSagents\Agent01\_work\_tasks\OctopusCreateRelease_4e131b60-5532-4362-95b6-7c67d9841b4f\3.0.168.

Nothing can stop you from playing with internals of extension there, so you can easily replace any content or even all files to test you newest changes.

But still, take under consideration that those changes can still affect other users using this Agent, so if you decide to do that having special Agent outside of production Agent sounds like a good idea.

  • 1
    That's true for build tasks, but not for UI extensions.I do this all the tie, as long as your task UI remains the same you can tweak the scripts all you want. For Build tasks using the VSTS task SDK you can simply run them locally though. – jessehouwing Sep 06 '18 at 15:25