Azure/azure-sdk-tools-xplat — pull request #1335 by amarzavery (2014-08-20 17:54:13+00:00)
Title: Storing test output in a log file

Logs would be stored in a time stamped log file "test_log_1408556504184.log" for every test run at
\azure-sdk-tools-xplat\test\output\ .

A sample content of the test log file

```
'>>>>>>>>>> getTemplateDownloadUrl should get correct url if case of key matches: >>>>>>>>>>'
'########## getTemplateDownloadUrl should get correct url if case of key matches: 1ms ##########'
'>>>>>>>>>> getTemplateDownloadUrl should get correct url if case of key does not match: >>>>>>>>>>'
'########## getTemplateDownloadUrl should get correct url if case of key does not match: 1ms ##########'
'>>>>>>>>>> download file name when downloading to an existing file should prompt for overwrite and continue if confirmed: >>>>>>>>>>'
'########## download file name when downloading to an existing file should prompt for overwrite and continue if confirmed: 4ms ##########'
'>>>>>>>>>> download file name when downloading to an existing file should exit if file exists and overwrite is denied: >>>>>>>>>>'
'########## download file name when downloading to an existing file should exit if file exists and overwrite is denied: 2ms ##########'
'>>>>>>>>>> download file name when downloading to an existing file should not call confirmer and continue if quiet option present: >>>>>>>>>>'
'########## download file name when downloading to an existing file should not call confirmer and continue if quiet option present: 3ms ##########'
'>>>>>>>>>> download file name when downloading to an existing directory should return filename in subdirectory: >>>>>>>>>>'
'########## download file name when downloading to an existing directory should return filename in subdirectory: 6ms ##########'
'>>>>>>>>>> download file name when downloading to a new file should return the passed in filename: >>>>>>>>>>'
'########## download file name when downloading to a new file should return the passed in filename: 0ms ##########'
'>>>>>>>>>> download file name when downloading to a new file should not require confirmation: >>>>>>>>>>'
'########## download file name when downloading to a new file should not require confirmation: 0ms ##########'
'>>>>>>>>>> download file name when downloading to a new file should have created new directories: >>>>>>>>>>'
'########## download file name when downloading to a new file should have created new directories: 0ms ##########'
'>>>>>>>>>> download file name when file is not given should return name of file in current directory: >>>>>>>>>>'
'########## download file name when file is not given should return name of file in current directory: 1ms ##########'
'>>>>>>>>>> arm group create should create empty group: >>>>>>>>>>'
' node cli.js group template list --json'
' node cli.js group create xplatTestGCreate3675 --location West US --json'
' node cli.js group list --json'
' node cli.js group delete 2121fddf --json --quiet'

Wed Aug 20 2014 10:41:47 GMT-0700 (Pacific Daylight Time):
{ [Error: Resource group '2121fddf' could not be found.]
stack: [Getter/Setter],
code: 'ResourceGroupNotFound',
statusCode: 404,
requestId: '60d66694-1f7d-4899-9d8d-a25a927aeb3e',
__frame:
{ name: '__4',
line: 138,
file: 'D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\lib\\commands\\arm\\group\\group._js',
prev:
{ name: '__5',
line: 160,
file: 'D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\lib\\commands\\arm\\group\\group._js',
prev:
{ name: '__1',
line: 60,
file: 'D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\lib\\commands\\arm\\group\\group._js',
prev: undefined,
active: false,
offset: 1,
col: 25 },
active: false,
offset: 12,
col: 25 },
active: false,
offset: 9,
col: 8 },
rawStack: [Getter] }
'Error: Resource group \'2121fddf\' could not be found.\n at Function.ServiceClient._normalizeError (D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\node_modules\\azure-common\\lib\\services\\serviceclient.js:785:23)\n at D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\node_modules\\azure-common\\lib\\services\\filters\\errorhandlingfilter.js:44:29\n at Request._callback (D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\node_modules\\azure-common\\lib\\http\\request-pipeline.js:109:14)\n at Request.self.callback (D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\node_modules\\request\\request.js:129:22)\n at Request.EventEmitter.emit (events.js:98:17)\n at Request. (D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\node_modules\\request\\request.js:873:14)\n at Request.EventEmitter.emit (events.js:117:20)\n at IncomingMessage. (D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\node_modules\\request\\request.js:824:12)\n at IncomingMessage.EventEmitter.emit (events.js:117:20)\n at _stream_readable.js:920:16\n at process._tickCallback (node.js:415:13)\n at __4 (D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\lib\\commands\\arm\\group\\group._js:147:8)\n at __5 (D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\lib\\commands\\arm\\group\\group._js:172:25)\n at __1 (D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\lib\\commands\\arm\\group\\group._js:61:25)\n'
'########## arm group create should create empty group: 1718ms ##########'
'>>>>>>>>>> arm group create should create a group with a named deployment from a template file and a parameter file: >>>>>>>>>>'
' node cli.js group template list --json'
' node cli.js group create xplatTestGCreate1643 --location West US -f D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\test\\data\\arm-deployment-template.json -e D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\test\\data\\arm-deployment-parameters.json -s teststorage101 -d mydepTemplateFile --template-version 1.0.0.0 --json'
'1 arm group create should create a group with a named deployment from a template file and a parameter file'
'>>>>>>>>>> arm group create should create a group with a named deployment from a gallery template and a parameter file: >>>>>>>>>>'
' node cli.js group template list --json'
' node cli.js group list --json'
' node cli.js group deployment list -g xplatTestGCreate1643 --json'
' node cli.js group delete xplatTestGCreate1643 --json --quiet'
'########## arm group create should create a group with a named deployment from a gallery template and a parameter file: undefinedms ##########'
'>>>>>>>>>> arm group create should create a group with a named deployment from a template uri and parameter string: >>>>>>>>>>'
' node cli.js group template list --json'
' node cli.js group create xplatTestGCreate1291 --location West US --template-uri https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.ASPNETSTARTERSITE.0.1.0-PREVIEW/DeploymentTemplates/Website_NewHostingPlan-Default.json -p { "siteName": { "value": "xDeploymentTestSite1" }, "hostingPlanName": { "value": "xDeploymentTestHost1" }, "siteLocation": { "value": "North Europe" }, "sku": { "value": "Free" }, "workerSize": { "value": "0" }} -d mydeptemplateUrl --template-version 1.0.0.0 --json'
' node cli.js group list --json'
' node cli.js group deployment list -g xplatTestGCreate1291 --json'
' node cli.js group delete xplatTestGCreate1291 --json --quiet'
'########## arm group create should create a group with a named deployment from a template uri and parameter string: 17544ms ##########'
'>>>>>>>>>> arm group show should show information of an empty group: >>>>>>>>>>'
' node cli.js group template list --json'
' node cli.js group create xplatTestGrpShow5685 --location West US --json'
' node cli.js group show xplatTestGrpShow5685 --json'
' node cli.js group delete xplatTestGrpShow5685 --json --quiet'
'########## arm group show should show information of a group with resources created in it: 18031ms ##########'
'>>>>>>>>>> arm group log show should return logs of all the operations: >>>>>>>>>>'
' node cli.js group template list --json'
' node cli.js group create xDeploymentTestGroup2552 --location West US --json'
' node cli.js group deployment create -f https://gallerystoreprodch.blob.core.windows.net/prod-microsoft-windowsazure-gallery/8D6B920B-10F4-4B5A-B3DA-9D398FBCF3EE.PUBLICGALLERYITEMS.MICROSOFT.ASPNETSTARTERSITE.0.1.0-PREVIEW/DeploymentTemplates/Website_NewHostingPlan-Default.json -g xDeploymentTestGroup2552 -n Deploy11978 -e D:\\test\\xplat\\amar_fork\\azure-sdk-tools-xplat\\test\\data\\startersite-parameters.json --json -vv'
' node cli.js group log show -n xDeploymentTestGroup2552 -l --json'
' node cli.js group log show -n xDeploymentTestGroup2552 -l --json'
' node cli.js group log show -n xDeploymentTestGroup2552 --all --json'
'########## arm group log show should return logs of all the operations: 716ms ##########'
'>>>>>>>>>> arm group log show should return logs of the last deployment with the --last-deployment switch: >>>>>>>>>>'
' node cli.js group template list --json'
' node cli.js group log show -n xDeploymentTestGroup2552 --last-deployment --json'
'########## arm group log show should return logs of the last deployment with the --last-deployment switch: 410ms ##########'
'>>>>>>>>>> arm group log show should return logs of the last deployment by default: >>>>>>>>>>'
' node cli.js group template list --json'
' node cli.js group log show -n xDeploymentTestGroup2552 --json'
'########## arm group log show should return logs of the last deployment by default: 424ms ##########'
'>>>>>>>>>> arm group log show should return logs of the specified deployment: >>>>>>>>>>'
' node cli.js group template list --json'
' node cli.js group log show -n xDeploymentTestGroup2552 -d Deploy11978 --json'
'########## arm group log show should return logs of the specified deployment: 408ms ##########'
```