This provides a sample app and test for Azure Functions integration testing in a CI/CD pipeline.
dotnet restore .
dotnet build .
-
Run the function app as a background process in bash shell
# Bash cd ./src/FunctionApp func start & bg
-
Run the function app as a background process in PowerShell (Non-Windows)
# PowerShell cd ./src/FunctionApp Start-Process -NoNewWindow func @("start","--verbose","false")
-
Run the function app as a background process in PowerShell (Windows)
# PowerShell cd ./src/FunctionApp $func = $(Get-Command func).Source.Replace(".ps1", ".cmd") Start-Process -NoNewWindow "$func" @("start","--verbose","false")
cd ./test/FunctionApp.Tests
dotnet test