This is the final part of my blog series for Power BI Performance testing, where I will finally run the Power BI Performance Load testing using Visual Studio Code.

In this blog post I will show you how I set up the test, run the test and view the outputs from the performance testing.

Previous Blog posts:

Example

I will be using my PBIReport.JSON file from the previous blog post which I will use for the performance testing.

The test will be based on 100 concurrent users.

Setting up Test

Before starting the test, I needed to set up the test with the following below.

CPU, memory and Bandwidth

I needed to ensure I was using a PC, VM or Server that has got enough CPU for the user load, memory and bandwidth to have the testing running in parallel.

How many concurrent users to scale

Next is how many concurrent users will there be.

As with my example it will be 100 concurrent users.

Time when capacity is not being used

A critical component is to make sure that when I did the load testing it was at a time when the capacity was not being used.

The reason for this is that if I run it during the working day, there is a possibility that I could consume over 100% of the capacity, this could lead to slowness or even blocking the capacity.

Typically, when I have done tests for customers, this is done after the working day in the evening.

How long to load test for

When I have done testing for customers I typically let the test run for 10 minutes.

This allows for enough time for all the different values to be used.

As well as allowing for Power BI to hopefully start caching some of the results, so over time it should plateau.

Installing Google Chrome

In my testing I have found that using Google Chrome is the easiest way to automate and scale up the testing.

I made sure that I have got Google Chrome installed.

Running the test

Finally, I get to run the actual test as shown below.

As in my previous blog post, I first make sure that running a single instance the report runs as expected.

Initial Test

What you can now do to make sure that it works is to do an initial test.

This is going into the folder where you have been editing the PBIReport.JSON and double click the file “RealisticLoadTest.html”

This should load in your browser successfully as shown below.

A screenshot of a computer screen

AI-generated content may be incorrect.

NOTE: If you get an error due to the Token expired, re-run the setup to create the PBIToken.JSON from my previous blog post under the section called “Running the set-up script”

Then copy it into your existing folder

How to configure for Field Parameters

Field Parameters is a newer feature, and the good news is that this too can be done in an automated way for the performance testing.

For this to work as expected when completing the Performance Test, what I needed to do was to go into my report page which was using the Field Parameters and make sure that no field parameters were selected.

The reason for this, is if the report page has a field parameter selected, it would then keep that selection during the performance test.

NOTE: I had to edit the report and remove a default field parameter selection for it to work correctly (And don’t forget to add the field parameter selection back in after finishing the testing).

Starting the Test

Below is my PowerShell script that I use which allows me to define how many instances I want to run and opens it in Google Chrome (As opening the HTML file 100 times can be cumbersome 😊)

I ran this using Visual Studio Code.

# Prompt the user to input how many times the command should run
$runCount = Read-Host "Enter the number of times to run the command"

# Ensure the input is a valid number
if (-not [int]::TryParse($runCount, [ref]$null)) {
    Write-Host "Please enter a valid number." -ForegroundColor Red
    exit
}

# Convert the input to an integer
$runCount = [int]$runCount

# The command to run (replace this with the command you want to run)
$command = {
    # Define the path to the HTML file
    $ReportName = "C:\Users\gilbertque\Downloads\PowerBI-Tools-For-Capacities-master\PowerBI-Tools-For-Capacities-master\RealisticLoadTestTool\07-28-2025_15_53_14\RealisticLoadTest.html"
    # Define the path to the Chrome executable
    $chromePath = "C:\Program Files\Google\Chrome\Application\chrome.exe"

    # Start Chrome and load the HTML file
    Start-Process -FilePath $chromePath -ArgumentList "--new-window", $ReportName
    # Add your command here, e.g., Get-Process or any other command
}

# Run the command the specified number of times
for ($i = 1; $i -le $runCount; $i++) {
    Write-Host "Iteration $i "
    & $command
    sleep -Seconds 11
}

Write-Host "Completed running the command $runCount times."

NOTES:

  • LINE 16:
    • Change this to your location where you have your PBIReports.JSON file saved.
  • LINE 29:
    • I am delaying the opening of each of the Chrome instances by 11 seconds, so that it is a staggered start.

I then clicked on Run and Debug to start the script

In the Terminal Window it then prompted me “Enter the number of times to run the command:” I put in 100 and pressed Enter

Yes, I did actually let this run 100 times as shown below.

My testing PC was extremely busy.

A screenshot of a computer

AI-generated content may be incorrect.

Stopping the test

Once I had all 100 instances opened I then let it run for 10 minutes.

To stop the test what I did was to close all instances of Google Chrome.

A screenshot of a computer

AI-generated content may be incorrect.

Viewing results in Metrics App

I could then go into my Fabric Metrics App and view the impact the 100 concurrent users had on my Fabric Capacity.

As you can see above, my report went well over my capacity limit.

I would then need to investigate the cause and how potentially this might be resolved.

One way would be to simply increase the capacity to the next SKU which would then mean this report with 100 concurrent users would run fine.

Or I could look at optimising the semantic model and measures where possible.

Summary

In this blog post I have shown you how to complete the Performance Test, replicate it with 100 concurrent users and view the results.

I hope you found this useful and can help you determine if you have enough Capacity or how much Capacity you will need to run Power BI reports in your organisation.

If you have any questions or need assistance with Performance testing, analysis or how to improve performance please let me know.

Thanks for reading 😊