зеркало из https://github.com/Azure/benchpress.git
b3bc7e561d | ||
---|---|---|
.. | ||
DemoApp.Tests.ps1 | ||
README.md | ||
demoapp-pipeline.yml | ||
deploy-demoapp.ps1 | ||
main.bicep |
README.md
Benchpress Demo Application
This demo application is used to demonstrate the capabilities of Benchpress. It is a simple ASP.NET Core application that has been instrumented with Benchpress. The application is deployed to Azure and then Benchpress is used to run the tests against the application.
The demo includes the following deployed resources:
Demo App Files
- main.bicep - Bicep module used to deploy the demo application infrastructure
- deploy-demoapp.ps1 - PowerShell script used to deploy the infrastructure and the demo application
- DemoApp.Tests.ps1 - PowerShell script used to run the Benchpress tests against the demo application
- demoapp-pipeline.yml - GitHub Action YAML file used to deploy the demo application infrastructure and run the Benchpress tests
Guidelines for creating and testing a demo application
-
Navigate to demo directory:
cd assets\demo\
-
Run the deploy-demoapp.ps1 script to deploy the demo application infrastructure and the demo application.
./deploy-demoapp.ps1
Running the tests
-
Run the tests by calling the test script file, or,
Invoke-Pester
command./DemoApp.Tests.ps1
Invoke-Pester -Path .\DemoApp.Tests.ps1
Cleaning up the demo application
-
Delete the resource group
az group delete --name "benchpress-rg-${env:ENVIRONMENT_SUFFIX}" --yes
Running the deployment, tests, and cleanup together
./deploy-demoapp.ps1
./DemoApp.Tests.ps1
az group delete --name "benchpress-rg-${env:ENVIRONMENT_SUFFIX}" --yes