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.
You mean like a real DevOps process???
For Functions exposed to REST, I guess we could wrap up a test from the command line but not “Internal” functions.
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.
Yes, anything with an OpenAPI/Swagger file can be tested with the Swagger page.
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.
Some reading for your OCD:
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:
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