Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I track production coverage in a csp rest endpoint #27

Open
Bongso66 opened this issue Dec 26, 2023 · 3 comments
Open

How do I track production coverage in a csp rest endpoint #27

Bongso66 opened this issue Dec 26, 2023 · 3 comments
Labels
customer question Further information is requested

Comments

@Bongso66
Copy link

No description provided.

@isc-tleavitt
Copy link
Collaborator

@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?

@isc-tleavitt isc-tleavitt added question Further information is requested customer labels Jan 9, 2024
@Bongso66
Copy link
Author

@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.

@isc-tleavitt
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants