Prerequisites
Before adding a performance test app:- Complete the basic AL-Go for GitHub setup
- Understand BCPT framework basics
- Have a working CI/CD pipeline
Create a Performance Test App
Run the Create Performance Test App workflow
Navigate to Actions in your repository, select Create a new performance test app, then click Run workflow.Provide the required information:
- Name: Name of your performance test app
- Publisher: Your publisher name
- ID Range: Object ID range for the test app
If workflows are not allowed to create pull requests due to GitHub organization settings, you can create the PR manually by following the link in the workflow annotation.
Review and merge the pull request
Once the workflow completes, navigate to Pull Requests.Inspect the changes, which include:
- Performance test app structure
- Sample BCPT test codeunits
- BCPT suite configuration
Monitor the CI/CD workflow
After merging, a CI/CD workflow automatically starts.Navigate to Actions to watch the workflow execute. This workflow will:
- Build your apps and performance test app
- Run the BCPT tests
- Generate performance test results
Review BCPT test results
When the workflow completes successfully, check the build artifacts.You’ll find BCPT Test Results as one of the artifacts. Download and open it to view:
- Execution duration for each test
- Number of SQL statements
- SQL read/write operations
- Performance metrics in JSON and table format
Understanding BCPT Results
The BCPT Test Results artifact contains detailed performance data:Duration
Execution time in milliseconds for the test operation
SQL Statements
Total number of SQL statements executed during the test
SQL Reads
Number of database read operations performed
SQL Writes
Number of database write operations performed
Set Up Performance Baselines
To compare performance across builds, establish a baseline by uploading abcptBaseLine.json file.
Get initial results
After your first successful BCPT run, download the BCPT Test Results artifact.The results viewer will indicate that you need to add a
bcptBaseLine.json file to enable baseline comparison.Create baseline file
Use the results from your initial run to create
bcptBaseLine.json.Upload this file to your project root (the repository root for single-project repositories).Run CI/CD with baseline
Commit and push the
bcptBaseLine.json file.The next CI/CD workflow will compare new results against the baseline, showing:- Diff values for each metric
- Negative numbers indicate improvements (faster execution, fewer SQL operations)
- Positive numbers indicate performance regression
Configure Performance Thresholds
Set thresholds to automatically fail builds when performance degrades beyond acceptable levels.Create thresholds file
Create a
bcptThresholds.json file in the same location as your baseline file (project root).You can also specify thresholds in project settings using the
bcptThresholds setting. See Settings Documentation for details.Understand threshold values
Threshold values represent percentage changes from baseline:
durationWarning: 0- Warns if duration increases at alldurationError: 1- Fails if duration increases by more than 1%- Similar thresholds can be set for SQL statements, reads, and writes
BCPT Threshold Options
You can configure multiple threshold types:Best Practices
Choose Representative Tests
- Test common user workflows (e.g., creating sales orders, posting documents)
- Include scenarios that access large datasets
- Test operations known to be performance-sensitive
- Consider testing during peak load conditions
Maintain Stable Baselines
- Update baselines when you intentionally improve performance
- Don’t update baselines to hide regressions
- Document why baselines changed in commit messages
- Keep historical baselines for comparison
Set Realistic Thresholds
- Start with lenient thresholds and tighten over time
- Account for normal variation in test execution
- Use warnings to catch trends before they become problems
- Set error thresholds to prevent significant regressions
Monitor Trends
Track Over Time
Download and archive BCPT results from each build to identify performance trends across releases.
Compare Branches
Run BCPT tests on feature branches to catch performance issues before merging.
Document Changes
When performance characteristics change, document the reasons in release notes.
Investigate Anomalies
Sudden performance changes deserve investigation even if they don’t breach thresholds.
Example BCPT Test
Next Steps
Add Test Apps
Create functional test apps to validate business logic
Development Environments
Set up online development environments for rapid testing