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:
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:
- 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 ) - Compile and run the test harness (npm start) – ensure you have latest PAC installed.
- Goto your Dynamics instance.
- Goto an entity (e.g. Account entity).
- Click Export to Excel > Static Worksheet (Save this to your computer)
- Open that excel file, then save it as a CSV.
- Load the CSV into the Harness
- Map each Columns to a Data Type (e.g. Account Name = SingleLine.Text)
- 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.