Skip to content

Latest commit

 

History

History
 
 

201-dynamic-web-tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Dynamically Generate Web Tests

Deploy to Azure

This template will help you quickly spin up any number of Application Insights web tests and setup email alerts. The parameters file takes any number of test descriptor objects. These objects look like the following:

{
    "name": "test1",
    "url": "http://www.microsoft.com",
    "expected": 200,
    "frequency_secs": 300,
    "timeout_secs": 30,
    "failedLocationCount": 1,
    "description": "a description for test1",
    "guid": "cc1c4b95-0a39-48ce-9c7b-fa41f0fc0bee",
    "locations": [{
        "Id": "us-il-ch1-azr"
	 }]
}

The guid field is an arbitrary guid for the test. The locations field is a collection of locations to perform the test from. Here is a table of the valid locations, and their cooresponding Id code:

Name Id
US : IL-Chicago us-il-ch1-azr
US : CA-San Jose us-ca-sjc-azr
US : TX-San Antonio us-tx-sn1-azr
US : VA-Ashburn us-va-ash-azr
US : FL-Miami us-fl-mia-edge
SG : Singapore apac-sg-sin-azr
SE : Stockholm emea-se-sto-edge
RU : Moscow emea-ru-msa-edge
NL : Amsterdam emea-nl-ams-azr
JP : Kawaguchi apac-jp-kaw-edge
IE : Dublin apac-hk-hkn-azr
HK : Hong Kong apac-hk-hkn-azr
FR : Paris emea-fr-pra-edge
CH : Zurich emea-ch-zrh-edge
BR : Sao Paulo latam-br-gru-edge
AU : Sydney emea-au-syd-edge

You can create any number of these test descriptors and pass them in as the parameter for tests as shown in the parameters file.