cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nwood2009
Regular Visitor

PCF Access WebAPI in Test Harness

Hi All

I am aware that the recommended way to test data in the test harness is to load a data file (csv) but was wondering if there was a way to access the CDS WebAPI outside of the deployed control inside of the test harness?

 

This would expedite development as any live data testing currently requires a build and publish.

 

Thanks for any help

2 REPLIES 2
DianaBirkelbach
Super User
Super User

Hi @nwood2009 , 

If you are talking about csv file for test-harness, I guess you're doing a dataset pcf. Using csv is not very helpful, because the metadata is stil missing in your csv. It's better to test it directly in your App, using live data.

The best way to debug a dataset pcf, is to use the Fiddler autoresponder. Firts you need to upload the pcf (using "pac pcf push" is enough), and bind the pcf against a dataset.

Then, just let the "npm start watch" run, this will continuously bundle for you, and configure the Fiddler Autoresponder to redirect your bundle.js to the bundle.js from your project folder.

There are a few blogs about this:

- Scott Durow for CanvasApps: https://community.dynamics.com/crm/b/develop1/posts/debugging-canvas-app-pcf-components-with-fiddler

- Inogic Blog: https://www.inogic.com/blog/2020/05/debug-power-apps-component-for-model-driven-app/

 

It might sound like a hack in the beginning, but it works like a charm.

Hope this helps!

 

Kind regards,

Diana

 

 

 

 

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Hi @nwood2009 , 

 

Did this help to solve your problem?

 

Kind regards,

Diana

Kind regards,
Diana
----------
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Users online (2,184)