update readme and correct typo

This commit is contained in:
Caroline 2023-03-31 10:38:04 -07:00
Родитель 1968096732
Коммит 12c731a89d
3 изменённых файлов: 40 добавлений и 33 удалений

@ -1 +0,0 @@
Subproject commit d8b029a127d7b220e056c799c7324979b5990937

Просмотреть файл

@ -1,5 +1,7 @@
BeforeAll {
Import-Module "../../bin/BenchPress.Azure.psd1"
# Navigate to ../../docs/installation.md to build BenchPress module"
#Import-Module "../../bin/BenchPress.Azure.psd1"
$Script:rgName = "benchpress-rg-${env:ENVIRONMENT_SUFFIX}"
$Script:webAppName = "benchpress-web-${env:ENVIRONMENT_SUFFIX}"
@ -17,7 +19,7 @@ Describe 'Resource Group Tests' {
$resourceGroup = Confirm-AzBPResource @params
#assert
$resourceGroup.Success | Should -BeDeployed
$resourceGroup | Should -BeDeployed
}
}
@ -36,7 +38,7 @@ Describe 'Service Plan Tests' {
$servicePlan = Confirm-AzBPResource @params
#assert
$servicePlan.Success | Should -BeDeployed
$servicePlan | Should -BeDeployed
}
}
@ -55,7 +57,7 @@ Describe 'Action Group Tests' {
$ag = Confirm-AzBPResource @params
#assert
$ag.Success | Should -BeDeployed
$ag | Should -BeDeployed
}
}
@ -72,7 +74,7 @@ Describe 'Web Apps Tests' {
$webApp = Confirm-AzBPResource @params
#assert
$webApp.Success | Should -BeDeployed
$webApp | Should -BeDeployed
}
it 'Should have the web app availability state as normal' {
@ -89,7 +91,7 @@ Describe 'Web Apps Tests' {
$webApp = Confirm-AzBPResource @params
#assert
$webApp.Success | Should -BeDeployed
$webApp | Should -BeDeployed
}
it 'Should have the web app works https only' {
@ -105,7 +107,7 @@ Describe 'Web Apps Tests' {
$webApp = Confirm-AzBPResource @params
#assert
$webApp.Success | Should -BeDeployed
$webApp | Should -BeDeployed
}
it 'Should contain application insights configuration in the web app' {
@ -122,7 +124,7 @@ Describe 'Web Apps Tests' {
$webApp = Confirm-AzBPResource @params
#assert
$webApp.Success | Should -BeDeployed
$webApp | Should -BeDeployed
}
}

Просмотреть файл

@ -4,6 +4,13 @@
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:
* [Application Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview?tabs=net)
* [Action Group](https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/action-groups)
* [App Service Plan](https://learn.microsoft.com/en-us/azure/app-service/overview)
* [Web App](https://azure.microsoft.com/en-us/products/app-service/web)
## Demo App Files
* [main.bicep](main.bicep) - Bicep module used to deploy the demo application infrastructure
@ -13,43 +20,42 @@ This demo application is used to demonstrate the capabilities of Benchpress. It
## Guidelines for creating and testing a demo application
* Run the [deploy-demoapp.ps1](deploy-demoapp.ps1) script to deploy the demo application infrastructure and the demo application
1. Navigate to demo directory:
* [Application Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview?tabs=net)
* [Action Group](https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/action-groups)
* [App Service Plan](https://learn.microsoft.com/en-us/azure/app-service/overview)
* [Web App](https://azure.microsoft.com/en-us/products/app-service/web)
```Powershell
cd assets\demo\
```
```powershell
./deploy-demoapp.ps1
```
1. Run the [deploy-demoapp.ps1](deploy-demoapp.ps1) script to deploy the demo application infrastructure and the demo application.
```Powershell
./deploy-demoapp.ps1
```
## Running the tests
* Run the tests by calling the test script file, or, `Invoke-Pester` command
```powershell
./DemoApp.Tests.ps1
```
```Powershell
./DemoApp.Tests.ps1
```
```powershell
Invoke-Pester
```
```Powershell
Invoke-Pester -Path .\DemoApp.Tests.ps1
```
## Cleaning up the demo application
* Delete the resource group
```powershell
az group delete --name "benchpress-rg-${env:ENVIRONMENT_SUFFIX}" --yes
```
```Powershell
az group delete --name "benchpress-rg-${env:ENVIRONMENT_SUFFIX}" --yes
```
## Running the deployment, tests, and cleanup together
```powershell
./deploy-demoapp.ps1
./DemoApp.Tests.ps1
az group delete --name "benchpress-rg-${env:ENVIRONMENT_SUFFIX}" --yes
```
```Powershell
./deploy-demoapp.ps1
./DemoApp.Tests.ps1
az group delete --name "benchpress-rg-${env:ENVIRONMENT_SUFFIX}" --yes
```