Open Bongso66 opened 10 months ago
@isc-tleavitt Yes, I am trying to write a unit test to measure test coverage. I want to know if I can call the SendRequestSync method in Ens.BusinessService to measure the coverage of the method called in OnRequest in Ens.BusinessProcess.
Got it. The answer is "Yes, but there might be some extra hoops to jump through."
It's possible that your production is all InProc but it's most likely using queues (and multiple actor processes) somewhere. You need to monitor activity in all of those processes to measure coverage.
The readme mentions how to do this:
tPIDList (optional) has a $ListBuild list of process IDs to monitor. If this is empty, all processes are monitored. By default, only the current process is monitored.
If you monitored all processes, you'd end up picking up all the actor processes... and everything else going on on the system, so your test coverage could look better than it really is. #14 may also be in play - I'm hopeful that some of the underlying issues in IRIS may have been fixed, but that may be a silly hope because I never really dug into root cause.
What InterSystems product + version are you on (w $zv)? I'd recommend starting out just trying to collect coverage on all processes, and if it works, great! If it doesn't, it's a good excuse to bump the priority up on #14.
@Bongso66 can you elaborate on what you're trying to do? Are you trying to measure test coverage via a unit test that makes a %Net.HttpRequest to an IRIS-based REST endpoint? When you say "production" are you referring to interoperability productions?