Azure Testing Framework/Library project
Перейти к файлу
Engin Polat 501f5dcc70
Merge remote-tracking branch 'private/main' into v2
2022-11-11 22:31:38 +00:00
.devcontainer spike/engine lifecycle (#28) 2022-11-11 15:00:11 -06:00
.github/workflows Bicep Transpile Service - Takes Bicep File, Generates Arm Template Using Bicep Submodule (#20) 2022-11-09 15:03:54 -05:00
BenchPress Bicep Transpile Service - Takes Bicep File, Generates Arm Template Using Bicep Submodule (#20) 2022-11-09 15:03:54 -05:00
config/megalinter Merge remote-tracking branch 'private/main' into v2 2022-11-11 22:31:38 +00:00
designs spike/engine lifecycle (#28) 2022-11-11 15:00:11 -06:00
docs Merge remote-tracking branch 'private/main' into v2 2022-11-11 22:31:38 +00:00
engine PowerShell Test / GitHub Actions Workflow Docs Update (#29) 2022-11-11 10:59:27 -05:00
framework Bicep Transpile Service - Takes Bicep File, Generates Arm Template Using Bicep Submodule (#20) 2022-11-09 15:03:54 -05:00
protos expose gRPC endpoint for deploying at the subscription scope (#24) 2022-11-10 13:38:33 -06:00
samples FileSerice Wrapper - Integration with ArmDeploymentService and TranspileBicepSerivice (#26) 2022-11-10 18:19:40 -05:00
.editorconfig configure code analysis in csharp projects (#24) 2022-10-24 09:57:59 -07:00
.gitignore Feature/megalinter (#18) 2022-10-20 17:38:35 -04:00
.gitmodules Bicep Transpile Service - Takes Bicep File, Generates Arm Template Using Bicep Submodule (#20) 2022-11-09 15:03:54 -05:00
.globalconfig Bicep Transpile Service - Takes Bicep File, Generates Arm Template Using Bicep Submodule (#20) 2022-11-09 15:03:54 -05:00
.mega-linter.yml GitHub Actions Pull Request Workflow - On Pull Request to Specific File Path, only the required file path will be linted instead of running all linting workflow (#11) 2022-11-04 10:45:23 -04:00
.pylintrc Feature/python sample tests (#27) 2022-10-28 10:32:54 -07:00
BenchPress.sln Bicep Transpile Service - Takes Bicep File, Generates Arm Template Using Bicep Submodule (#20) 2022-11-09 15:03:54 -05:00
CODE_OF_CONDUCT.md creating code of conduct 2022-08-15 19:32:33 -07:00
CONTRIBUTING.md Feature/megalinter (#23) 2022-10-24 15:22:02 -04:00
LICENSE LICENSE committed 2022-04-22 15:57:07 -07:00
README.md Merge remote-tracking branch 'private/main' into v2 2022-11-11 22:31:38 +00:00
SECURITY.md GitHub Actions Workflow for Linting python and dotnet source code, and docs (#22) 2022-10-24 14:15:59 -04:00
SUPPORT.md GitHub Actions Workflow for Linting python and dotnet source code, and docs (#22) 2022-10-24 14:15:59 -04:00
package-lock.json Feature/megalinter (#18) 2022-10-20 17:38:35 -04:00
package.json Feature/megalinter (#18) 2022-10-20 17:38:35 -04:00

README.md

Bicep testing framework

This is a testing framework for Azure deployments using Bicep.

In order to see how you can work with this framework you can find one sample bicep file in the folder samples that will be deployed by using one PowerShell script.

An example of how to use this framework can be found in the Powershell Test Sample guide.

The process of the tests is the following:

flowchart LR

A[Creation] -->|Bicep| B[Verification]
B --> C[Remove]

Creation: New Features are deployed using Bicep files Verification: Tests confirm that the resource exists and that it matches the expected values Remove: Optionally, resources can be removed after being tested

Benchpress Architecture

BenchPress uses gRPC to create a multi-language testing framework.

The BenchPress Test Engine is a C# gRPC Server located under /engine/BenchPress.TestEngine. The Test Engine is responsible for the business logic of deploying Bicep files, obtaining information about deployed resources in Azure, and cleaning up the deployment afterward.

The BenchPress Test Frameworks (located under /framework/) are gRPC Clients of multiple languages. The Test Frameworks are responsible interfacing between the user's tests (written in their chosen language) and the Test Engine. They are also responsible for managing the life cycle of the Test Engine.

gRPC uses protocol buffers. The /protos/ folder contains BenchPress's .proto files. These define the API that the gRPC Server and Clients use to communicate.

From left to right: 1). There is a Powershell Test Script and a Python Test Script.  2). The Powershell Test Script calls into a Powershell Test Framework. The Python Test Script calls into a Python Test Framework.  3) Both Test Frameworks call through a gRPC Boundary.  4) The gRPC Boundary wraps a language agnostic Test Engine.  5).  The Test Engine calls into both the Bicep CLI and the Azure Resource Manager.

Getting started

See Getting Started guide on how to start development on Benchpress.

Deveplopment Tips

See Github Actions Lint Workflow for how to maintain the CI/CD pipeline.

See Manually Testing the Test Engine for guidance on exploring the gRPC endpoints.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

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.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.