· 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

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

Good morning people.
The use of TDD is currently being reference for software delivery more confiabilitade and quality.

At the company I work developing web applications , we create tests for method class in a deteminado package and running the steps that the documentation recommends:

1 export the tests classes to a predefined folder.
2- And running the test ( D ## class (% UnitTest.Manager ) .RunTest (,"/nodelete" )

It is a lot of work to do the export and run these tests would have a resource that we could only run the tests without the need for export ?

1 5
0 660

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

Hello everyone,

Does anyone know how to create integration tests using the Cache unit test framework in order to test an Ensemble production?

For example, what would be the best way to create automated tests for a BPL that calls multiple business operations (SQL, WebService ...)?

Should we create some kind of mock service/operation to simulate the response from the business operations ?

1 5
0 1K

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


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

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

We have one user that is having issues in Ensemble via browser. The two issues she reported are:

- If she opens a DTL, she has to Save or Compile the DTL before she is able to edit anything in the Actions tab. Typically, you can simply open the DTL, click on a line, and edit the Actions.

- If she opens the Tools tab and clicks the Test button, she does not get a response and it eventually times out on her. Typically, clicking the Test button will open a new window where you can paste a message to test your DTL with.

0 2
0 202


I am using a class based on %UnitTest.TestProduction to test Health Connect production.

I read in Class Reference IRIS for UNIX 2020.1:

Note: This class is not intended to be used in InterSystems IRIS instances.

Why should this not be used in IRIS? I have not seen any difference using this with HealthConnect 2017 or IRIS 2020.1

0 1
0 243


Interested in testing the Eclipse / Atelier on my Mac with 10.13.6 High Sierra, I installed both and had a go at connecting to my Cache Server. It offers Address & Port and login ID and Password.

No matter what I gave it, it cannot connect, saying Server not found.

The Server is a virtual Server running Windows 12 Server on a dedicated IP address, to which I can connect correctly using Remote Desktop, I can Ping the IP so all looks good, except Eclipse cannot find it.

Any hints would be appreciated.



0 5
0 428

Hi Developers

Is there any way that we can pass the values to the read prompts via cache routine.

For example, we have a couple of reports/routine in our system which accepts some inputs and after taking the inputs it generates some data. Right now it has proper UI and where User enters the value and in routines we have Read statements which accepts those inputs for further processing.

0 7
0 432

Getting INVALID OREF error while unit testing. Also ResultDyanmicObj.Headers.%Size(),DummyResponse.Headers.%Size() these are working fine getting 7 value from both. but still it is not working.

do $$$AssertEquals(ResultDyanmicObj.Headers.%Size(),DummyResponse.Headers.%Size(), "Validation for Headers")

error - INVALID OREF>TestAccountSearchWithoutAccount+6

0 1
0 112

Someone may have asked this before but is there a way to return the TRACE statements that we have placed in the Data transformation within the DTL Editor Testing Tool (EnsPortal.Dialog.TestTransform.cls)? Is this something we can get in an Enhancement request in for?

It would save sometime in troubleshooting where an error might be in the DTL.

Just wondering...



0 1
0 227

Hey all,

I am currently working on a website (with Angular) for displaying the results of UnitTests.

Everything is working fine, except that I can not run a test inside a ClassMethod.

I have 2 classes: One for handling which test class should be invoked and then a test class that is extending %UnitTest.TestCase

The test class:

0 1
0 189

as i'm trying to develop a operation and its methods (SQL adapter), I'm running into issues when i run my test class.
I have the class i want to test in the very same folder as my test class.
I followed the tutorial in the documentation.
When i run the test class, i get the following message error :

LogStateStatus:0::ERREUR #5002: Erreur Cache: <METHOD DOES NOT EXIST>zTestAdd+1^unitTests.testMyClass.1 *myMethod,Package.BO.MyClass

Here is my test class (heavily inspired bythe documentation :-) :

0 3
0 226

I need to do some nifty string manipulation on a source property. I will not be able to do it with the functions available(with the knowledge that I have of what is available). Could I call a ClassMethod to do this for me? This is what I want to do: The source property is "". I need to add the text "test" to the beginning of that string. "".

0 7
0 209