Microsoft Power Apps, SharePoint, & Microsoft 365 Consulting Company

Performance Testing Power Apps

Microsoft Power Apps has many ways to accomplish the same tasks.  This includes choose the right data source, the right formulas, the right queries to get the optimal amount of data and so on.  Microsoft offers guidance on performance testing Power Apps here, but we want to boil it down into a quick, usable example.

How Performance Testing Power Apps Works

The gist of how to do performance testing is timing different formulas and functions.  You must compare the start time to the end time and see the results.  Since Power Apps is web based, Speed is also reliant on your internet connection.  The speeds you get might not be what a person in a different location observes.  Additionally, you may observe different speeds based on the time of day and overall internet traffic.

The Technical Setup

In Power Apps, most of your functionality resides in the formula bar for different objects.  The most common is ‘OnSelect’ since it is associated with buttons and clicks.  Determine what exactly you are testing and how the different methods differ.  For instance, are you debating saving information to the Common Data Service versus SharePoint?  Or are you testing different queries to see if you should get all the data or a subset of data?  Once you know what you are testing:

  1. Figure out the formulas for each of your scenarios and make sure they work first.
  2. Choose which formula you want to test first.
  3. Add Set(varStart,Now()); before the formula
  4. Add ;Set(varSpeed, Text(DateDiff(varStart, Now(), Milliseconds))); after the formula
  5. Add a label to your screen and set the Text of that label to varSpeed

Now when you preview or run your Power App your can see the speed of your formula right on the screen.

Want to get even fancier?  Save varSpeed to a centralized location with 1-2 more columns describing the test that is being conducted and what variables you are testing.

In the below example, we were testing different save functions for saving contacts to different locations as well as performance testing Collect vs Patch.  Our test result shows 146 milliseconds for the latest test.  When we rerun the test multiple times, the test ranges from 146 milliseconds to 582 milliseconds with and average of 391 milliseconds.  We were able to determine the average over 20 tests that saved to a centralized list of test results.

Performance Testing Power Apps Results


How to Conduct Performance Testing on Power Apps

Once you have your technical setup, it is time to start testing.  Variable you should be aware of which you might want to record for each of the times:

  • What time of day are you conducting the test? Is it during peak internet usage or the middle of the night?
  • What browser are you testing with?
  • What is your internet speed? Run a speed test here.  This ties in closely on what time of day, but if you are comparing to a colleague in a different location, it is good to record the speeds even if you are running at the same time of day.

Performance Testing Power Apps Speed Test