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

4

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?

Observation answered 15/7, 2017 at 8:57 Comment(0)
F
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.

Fragmentation answered 17/7, 2017 at 1:30 Comment(3)
Thanks for your answer. It was Not what i was expecting to read. But Now i know what to do. Thx.Observation
What things you know how to do? A way to test the extension?Fragmentation
Now i know how to develop an Extension. This is very well documented.Observation
W
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/

Willardwillcox answered 30/8, 2017 at 8:12 Comment(1)
For UI extensions this is the way to go.Cosmopolite
C
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.

Cockneyism answered 7/2, 2020 at 5:14 Comment(0)
F
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.

Fragmentation answered 17/7, 2017 at 1:30 Comment(3)
Thanks for your answer. It was Not what i was expecting to read. But Now i know what to do. Thx.Observation
What things you know how to do? A way to test the extension?Fragmentation
Now i know how to develop an Extension. This is very well documented.Observation
S
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.

Spongy answered 6/9, 2018 at 15:15 Comment(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.Cosmopolite

© 2022 - 2024 — McMap. All rights reserved.