benchpress/assets/demos
Caroline b3bc7e561d one line tests 2023-03-31 11:39:50 -07:00
..
DemoApp.Tests.ps1 one line tests 2023-03-31 11:39:50 -07:00
README.md update readme and correct typo 2023-03-31 10:38:04 -07:00
demoapp-pipeline.yml create canonical bicep application, and, tests (#107) 2023-03-08 13:33:15 -08:00
deploy-demoapp.ps1 update demo app to use our functions 2023-03-30 14:01:09 -07:00
main.bicep create canonical bicep application, and, tests (#107) 2023-03-08 13:33:15 -08:00

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

  1. Navigate to demo directory:

    cd assets\demo\
    
  2. 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