Condividi tramite


Link to virtual environment

Note: Cross posted from aseemb's blog.

Permalink

In Lab Management RC release, you might be using the “share snapshot” feature which essentially provides a shareable link for the snapshots. This feature is very useful when you want to share snapshots with others and expect them to connect to that particular snapshot. On the same line, you might want to have a shareable environment link as well with which users can connect to an environment very quickly.

If such a link existed, you could have done the following: -

1. You could have just shared the link to your environment instead of looking up/specifying machine names to connect. 

2. You could have avoided launching of Microsoft Test Manager (MTM) if all you want to do is connect to your environment.  (This could have saved you anytime between few seconds to few minutes depending upon how the network bandwidth/latency.  For me (I am based out of IDC, Hyderabad, India), it saves around 1-2 minutes as our dogfood server is deployed in Redmond and there is a significant network latency.)

The good news is that it is possible to create such sharable environment links and in this post, I will talk about how you can do that.

1. Find the environment Id of your virtual environment. To do that, you should do the following.

a.  Open MTM and go to the lab center under Lab tab. 

b. Right click on the table header and enable “Id” if it is not already enabled.

enableEnvironmentId

c. Now slide the scrollbar at the bottom of the table to the right and you will see the Id of your environment(s). Note down the Id of your environment. For example:- The id of the selected environment (the one in blue) is 10.

EnvironmentIds

2. Now create an internet shortcut file on your desktop.

shortcutfile

3. Specify the location of the item with the environment url which looks like this: -

lvr://ConnectToEnvironment/?CollectionURI= <CollectionUrl> &EnvironmentId=<EnvironmentId>

The <collectionUrl> and <EnvironmentId> are parameters in the above url and with values filled for my environment it looks something like this: - 

lvr://ConnectToEnvironment/?CollectionURI=https://aseemb-tfs10:8080/tfs/Collection0&EnvironmentId=10

 

image

4. Click Next and specify the name of the shortcut file.

5. Click on the shortcut file and you should be able to see your environment in the virtual environment viewer.

EnvironmentLaunched

 

There is not much difference between the steps needed to email the environment link and to create a desktop shortcut file but since most of the email servers block the shortcut attachments, so it is better to use environment hyperlink in your emails. The url which you used in the internet shortcut file above should be used in the environment hyperlinks as well and for the same example (with id =10), the link in the email looks like this: -

EmailLink

Note: – In addition to the shortcut url and link in emails, the same url can be used from the “run” window of the operating system or IE address bar.

Enjoy!!