How to test Visual Studio Team Services (vsts) extension without uploading

Viewed 1606

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?

4 Answers

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.

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.

Related