Skip to content

Azure/azure-rest-api-specs-tests

Repository files navigation

Live Testing for Azure REST API Specifications

The repository contains a set of scripts for Azure SDK live testing Azure REST API Specifications. The scripts use Azure SDK for .Net to test other Azure SDKs for different programming languages. For example Azure SDK for Go.

Build Definitions

Creating a Personal Build Definition

Requirements

  • Windows 10
  • PowerShell

Enviroment Variables

  • TEST_PROJECT is a REST API specification name from azure-rest-api-specs. See sdkinfo.json for available names. For example arm-redis.
  • TEST_LANG is a Azure SDK programming language. For example go.
  • TEST_CSM_ORGID_AUTHENTICATION is a connection string, in a format SubscriptionId=...;ServicePrincipal=...;ServicePrincipalSecret=...;AADTenant=...;
  • TEST_FORK is a GitHub fork name of the azure-rest-api-specs.
  • TEST_BRANCH is a GitHub fork branch name of the azure-rest-api-specs.

Build Stages

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Adding a New Language for Testing

  1. Create a new folder for the language, for example go.
  2. Create the PowerShell scripts in this folder:
    • install.ps1, install all required software to the x folder, for example go/install.ps1
    • build.ps1, build a JSON-RPC server for the Azure REST API specifications, for example go/build.ps1
    • test.ps1, set the SDK_REMOTE_SERVER environment variable to a path on the created JSON-RPC server, for example go/test.ps1

See also Creating JSON-RPC server.

Running Locally

  1. Run .\init.ps1 to clone the recent [Azure REST API specifications] and [Azure SDK for .Net]
  2. Run .\built.ps1 {service name} to build a service project. For example, .\build.ps1 -project arm-redis.
  3. Run .\test.ps1 {service name} to test a service project. For example, .\test.ps1 -project arm-redis. arm-redis`.

See also

About

Live Testing for Azure REST API Specifications

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •