Please go vote for this! (function testing)

I would like to propose the ability to test a function from the function screen, exactly like testing a report form, or a quick search, or a BPM form is. You shouldn’t have to wire it up in some other place to make sure the code is working as expected. Even something like the BL tester would be a step in the right direction. I would propose you click on actions, test function, and a dynamically generated for with your inputs pops up, you fill them in, click run, and your outputs come out.

https://epicor-manufacturing.ideas.aha.io/ideas/KNTC-I-2144

7 Likes

You mean like a real DevOps process??? :thinking:

For Functions exposed to REST, I guess we could wrap up a test from the command line but not “Internal” functions.

1 Like

Good point Mark.

Great idea @Banderson, that would be super convenient instead of having to use ABC all the time.

This might be a dumb question but I’m still just getting started with functions. Which ones are, and are not, exposed to REST? And for those that are, wouldn’t running them in Swagger be an accurate and quick test? Or does exposed to REST != available in Swagger?

Like I said, possibly dumb questions… but you know me, @Mark_Wonsil, somebody’s got to ask them…

Always good questions Steve!

I honestly don’t know if one can hide the function from REST or not. :thinking:

Yes, anything with an OpenAPI/Swagger file can be tested with the Swagger page.

If there isn’t an OpenAPI/Swagger specification file then one can always use tools like Postman, the VSCode REST Client, or even PowerShell + Pester.

or even using XMLHTTP in Excel VBA, if you’re insomniac and slightly OCD like me!

But all I was thinking was, while I like @Banderson 's idea, at least if it’s available in Swagger or Postman, there’s an easy way to test it on-the-fly.

1 Like

Some reading for your OCD:

Differences between Office Scripts and VBA macros - Office Scripts

huh. That’s interesting. We’ve just been running into securing a whole VBA ecosystem (or not securing) so maybe it’s time to move on. Thanks for that.

But I think I’ve taken yet another thread off topic, the folks are gonna start greeting us as Jack

I couldn’t find the swagger section for functions. I had to use postman. Is there a function section in swagger? (I suppose I should check out the API help in kinetic, maybe it’s in there.)

Maybe in K21 but I see nothing for Swagger/OpenAPI in 12.2.###.

I’ve used the internal function scheduling for testing:

image

1 Like


I can’t remember how long ago it was changed/introduced but from the /apps/resthelp page it’s been super easy to test published functions for quite a while now. It does add a couple of quick steps to the test process which is not ideal but I have still found it fairly easy and quick.

When a Kinetic UI version Epicor Functions UI is available, I suspect that it would be easy for Epicor to add test functionality directly into the development UI for a better workflow/experience but I don’t think that it would work well as well in, or would be worth adding to, the classic WinForms UI. Particularly when considering the DataSet input/output options.

You can mark a function as internal only in theory it’s supposed to only allow you to call it inside a bpm. / baq and other functions

But not vía rest

2 Likes