This repository has been archived by the owner on May 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 566
Test Guide on Windows
immki edited this page Nov 25, 2021
·
2 revisions
- From WebPI at http://www.windowsazure.com/en-us/downloads/?sdk=node, which will install nodejs runtime 0.6.20, NPM, Azure Powershell Tool and IISNode.
- Or from nodejs.org at http://www.nodejs.org/download/ for latest nodejs runtime/NPM only.
- Install Git for Windows from here.
- Create test folder and get Node SDK source code via Git. From Git Bash, type the following command at the test folder you just created.
git clone https://github.com/WindowsAzure/azure-sdk-for-node.git
then type command for the branch you like to run test (eg. dev branch here, if run on master branch, no need to run "git checkout dev" cmd below)
cd azure-sdk-for-node
git checkout dev
- Run NPM package installation. At the same git bash console above, make sure all the npm packages installed success
npm install
Launch cmd console as admin at your test folder\azure-sdk-for-node, at the cmd console, run the following:
set AZURE_APNS_CERTIFICATE_FILE=C:\test\cert2\yourpfxtfile.pfx
set AZURE_APNS_CERTIFICATE_KEY=your certificate key
set AZURE_CERTIFICATE_FILE=C:\test\cert2\yourcertificatefile.cer
set AZURE_CERTIFICATE_KEY_FILE=C:\test\cert2\yourcertificatefile.pfx
set AZURE_SERVICEBUS_ACCESS_KEY=p5Td17PUrpwH4bWJOMT7...
set AZURE_SERVICEBUS_ISSUER=owner
set AZURE_SERVICEBUS_NAMESPACE=your servicebus namespace
set AZURE_STORAGE_ACCESS_KEY=+qVg/q/K3DVUsdISEaelqwdbW+eJHdB6ZQt+v+qRqSR....
set AZURE_STORAGE_ACCOUNT=yourstorageaccountname
set AZURE_STORAGE_DNS_SUFFIX=core.windows.net
set AZURE_SUBSCRIPTION_ID=6cf77b23-e09d-42...
set AZURE_MANAGEMENT_HOST=management.core.windows.net
set AZURE_MPNS_CERTIFICATE_FILE=path-to-the.pfx file
set AZURE_MPNS_CERTIFICATE_KEY=certificate-key
set AZURE_SQL_TEST_LOCATION=US West
set AZURE_SQL_DNS_SUFFIX=core.windows.net
set AZURE_WNS_PACKAGE_SID=yourWNSPackageSID
set AZURE_WNS_SECRET_KEY=yourWNSkey
set AZURE_GCM_KEY=yourGCMKey
set NOCK_OFF=true
- Run all unit test. Run the following cmd at cmd console of test folder\azure-sdk-for-node
npm test
- Run unit test one by one. Go to yourtestfolder\azure-sdk-for-node\test, edit the testlist.txt, put "# " at the beginning the line for the unit test that not need to run, save testlist.txt file, run cmd
npm test
- Run sample test. Make sure the compute emulator and storage emulator are started, and go to yourtestfolder\azure-sdk-for-node\examples\blobuploader, run
node server.js
If any npm package missed, just run npm install to install the package (e.g. following is the cmd to install the express npm package most the example may depend on), then run "node server.js" again to start the server.
npm install express
When the web server is up running, just go to the localhost to test it through the web browser (e.g.
http://localhost:1337 for blobuploader) to make sure the web site function as expected. Repeat the above step for examples\myevents, and examples\tasklist