· Oct 20, 2016
%UnitTest Code Coverage


When we write unit test cases for cache object script code using %UnitTest.TestCase, what is the best way to write code to identify code coverage?

So, let say my unit test case hit all 10 lines of code of a method for a given class. So, unit test coverage should be 100% for that. But, using line-by-line coverage [(%Monitor.System.LineByLine] getting wrong percentage, because it also includes code comment/documentation as part of code. So, practically we can not ever achieve 100% of code coverage by using this API.

2 2
0 736
· Mar 1, 2018
Cucumber / Gherkin integration

Are there any BDD testing automation implementations within Mumps/Cache Objects already in existence?

We are looking at using Cucumber for our Java regression test automation and would like to use similar feature file testing with the Cache code.

Looking to use something existing before building it.


2 5
1 866

OAuth server to be deployed on the IRIS learning cloud platform. Clients - one on the other instance of the learning IRIS server, the other client locally on my computer in the container docker.

Both clients get a seemingly correct link (through ##class(%SYS.OAuth2.Authorization).GetAuthorizationCodeEndpoint()) to the login request form:

1 3
1 712

We are upgrading from Health Connect 2018.1.3 to IRIS Health Connect 2022.1, and one thing that we are particularly hesitant about is if our Business Rules will work in the new version.

I am trying to come up with a testing process for bulk testing our rules, and wanted to know if this could be done programmatically instead of having to modify all the Business Operations to have them write the HL7 data to a file. I caught Orlando Health's presentation at GS2022 but I am not sure that will work for my team.

1 10
3 538


I have a property which I need to move from one class definition to another as follows:

Old definition:

Class SCHED.SchedEntry
  Property Experiment as %String;

  Property ScanSlot as list of TracerEntry;


Class SCHED.TracerEntry
  Property Tracer As %String


I want to move the Experiment property to the TracerEntry class so that there is a different Experiment allowed for each ScanSlot, like this:

1 2
0 304

Hi all,

I am currently wokring on integrating unit tests into a project. I am also attempting to test productions with the TestProductions class. This works great, but I noticed that no code coverage information is being gathered when I run the production tests?

Am I doing something wrong (forgot to add something in the coverage.list for instance) or is TestProduction not intended for code coverage?


1 0
1 173

Did anyone run into this error when stopping a Production from Ens.Director?

Ens.Director::StopProduction => ERROR <Ens>ErrProductionNotQuiescent: IRIS can not become quiescent

It happens sporadically when an automated unit test from a class that extends %UnitTest.TestProduction runs a test on a Business Process. I already increased the parameter MAXWAIT to 30 seconds, but the error still happens.

1 4
0 408

I want to test automatically that HL7 business operation works correctly in error conditions. One is to test CE acknowledgement. I have planned to implement test production which includes business services for different situations (AA, AE, CA, CE, timeout, late response etc).

How should I implement HL7 business service that always returns CE (commit error)? I have tried but it keeps returning "AA".

1 2
0 317

Hi folks!

Those who actively use unittests with ObjectScript know that they are methods of instance but not classmethods.

Sometimes this is not very convenient. What I do now if I face that some test method fails I COPY(!) this method somewhere else as classmethod and run/debug it.

Is there a handy way to call the particular unittest method in terminal? And what is more important, a handy way to debug the test method?

Why do we have unittest methods as instance methods?

1 25
0 373

I am under the impression that inside HealthShare you can Services, Processes, and Operations. The service takes incoming data, the processes can process that data, and then the operations can send that data out.

I am curious if anyone has any experience, guides, or advice on how I can send data to a service using a Java application. I intend for the data to be in XML format. I am also curious if I succeed at picking up the data in the service, how I send the data back to the Java application using an Operation.

0 2
0 306

Is there a method I can utilise to check if a particular method has been called and perhaps log the args it was called with?

We are currently trying to expand out Cache Unit Testing processes and were wondering if there is an existing method that would capture this or how such a method could be structured.


0 2
0 187
· Oct 19, 2019
Common Testing Frameworks.


I'm after feedback and comments on the sort of tools and approaches the wider InterSystems community uses for QA Testing applications written in Cache/Ensemble or IRIS. I am aware of the %UnitTest package, and understand how that works... but:

- Do you use an alternative or framework built around this native Unit Testing tool ?

- What is your experience with %UnitTest if you use it ?

- Is there a tool you would recommend for your UI (I know this is not specifically an InterSystems' related question)

0 4
0 495

When running the command

do ##class(TestCoverage.Manager).RunTest(,"/nodelete",.userParams)

I now get the following error. these tests used to run fine.

LogStateStatus:0:TestCoverage.Manager:OnBeforeAllTests:ERROR #6060: Somebody else is using the Monitor. <<==== **FAILED**

Can someone please point me in the right direction?

0 7
0 283

Hi All,
I was creating a unit test directory with the below script. But it not creating any directory as mentioned in code. I am working on MacBook with irisusr User as standard installation process.

if '$data(^UnitTestRoot) {

set mainFolder = "UnitTest\NewDir\"

set st = ##class(%File).CreateDirectoryChain(mainFolder _ testSuite)

if $$$ISOK(st) { set ^UnitTestRoot = mainFolder }

else {

write !, "UnitTestRoot folder could not be created. Consult with instructor."

do $system.Status.DisplayError(st)



0 2
0 121