This sample intends to show how to create and run a load test of Azure AD B2C user flows and custom policies (including dependencies), and evaluate the results using the Azure Load Testing Service.
Use this sample to perform a load test and determine your web application and B2C flows behavior under anticipated peak load conditions, identify bottlenecks and determine which element is causing degradation.
This sample uses Apache JMETER and Azure Load Testing Service.
The authorization flow used for testing is OAuth 2.0 Authorization Code Flow
This sample test includes the following components:
- Custom policy to implement the custom CIAM flow
- Web Api to be called from the custom CIAM flow
- Python script for user creation
- JMETER script for load testing
This sample test architecture involves the following components / services:
- Azure AD B2C Tenant
- Azure Function Web API
- Application Insights
- Azure Load Testing Service
Running the sample test will help to understand the effort required to perform a load test before creating a new one from scratch.
To run the sample test follow this steps:
- Setup Test Environment
- Azure AD B2C Tenant
- Azure Function Web API
- Application Insights
- Azure Load Testing
- Set up custom policies
- Create / configure users for testing
- Setup JMETER Test plan
- Execute the load test
- Evaluate the results
Detailed steps on how to run this sample are documented here.
This documentation helps to understand how to create a load test for a different set of user flows, custom policies and web applications.
Use JMETER recording capabilities and the information provided here to speed up the creation of a new load test from scratch.
Detailed steps on how to create a new Load Test are documented here.
>[!NOTE]
> This Sample Test does not include MFA / OTP scenarios as these involve automating the reception of the OTP from an external source (email, sms).
This documentation helps to understand what information can be obtained from the evaluation of the results, to:
-
Observe the behavior of the entire solution on a certain production load.
-
Measure the performance of the CIAM flows and Web Application to verify improvements.
Detailed steps on how to evaluate results can be found here.