The updated PCF CLI tooling has just been released (July 2019), and one major enhancement is supporting mock datasets (Your Data within PCF Test Harness).

 

See the original blog post by Peter on the PCF Forums:

https://powerusers.microsoft.com/t5/PowerApps-component-framework/Updated-PCF-Tooling-version-is-now-available-July-2019/m-p/331859#M652

I wanted to give you a quick demonstration of how awesome this feature is, and how it will rapidly speed up your development flow. It should only take a minute to get set up, so here we go:

  1. Create your new dataset project. (here’s an example Data Set Grid Component with code if you require:
    https://docs.microsoft.com/en-us/powerapps/developer/component-framework/sample-controls/data-set-grid-control )
  2. Compile and run the test harness (npm start) – ensure you have latest PAC installed.
  3. Goto your Dynamics instance.
  4. Goto an entity (e.g. Account entity).
  5. Click Export to Excel > Static Worksheet (Save this to your computer)
  6. Open that excel file, then save it as a CSV. 
  7. Load the CSV into the Harness
  8. Map each Columns to a Data Type (e.g. Account Name = SingleLine.Text)
  9. Then Click Apply

The grid will then refresh with your data with your own dataset!

Here’s a video demonstrating the above steps in case you get stuck.

Looking forward to many more enhancements with the PCF CLI! Thank you Microsoft PCF team for this amazing update.