A few years ago, I was teaching the basics of our %UnitTest framework during Caché Foundations class (now called Developing Using InterSystems Objects and SQL). A student asked if it was possible to collect performance statistics while running unit tests. A few weeks later, I added some additional code to the %UnitTest examples to answer this question. I’m finally sharing it on the Community.

5 2
2 566
Question
· Oct 20, 2016
%UnitTest Code Coverage

Hi,

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 757

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 205

Continuing on with providing some examples of various storage technologies and their performance profiles, this time we looked at the growing trend of leveraging internal commodity-based server storage, specifically the new HPE Cloudline 3150 Gen10 AMD processor-based single socket servers with two 3.2TB Samsung PM1725a NVMe drives.

4 2
0 1.3K

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 170

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 327

Attention all developers!

Get ready to revolutionize your testing process with iris-tripleSlash, the ultimate unit test solution.

Say goodbye to boring and repetitive unit testing and hello to effortless and efficient testing.

With iris-tripleSlash, you can easily generate unit test cases using the power of automatic documentation.

3 2
0 246

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.

Thanks
Adam

0 2
0 192
Question
· Dec 20, 2017
Atelier Evaluation Sandbox?

Hello everyone, I work for a company that currently uses Studio on version 2016.1.2, and will be looking at options to upgrade to 2016.2 and beyond. This would also include the potential to switch from Studio to Atelier, however there are a lot of workflow changes and new features to test.

Does Atelier have a simple way to evaluate what it has to offer without needing to setup an entire separate environment? How did your organization demo its features before committing?

0 2
0 356
Article
· Oct 5, 2020 2m read
File Passthrough Feeder

IRIS Interoperability Productions formerly known as Ensemble are fun to work with. Yes, I really think my work is fun. I have seen File Passthrough Services and File Passthrough Operations come in handy. At one point we placed test messages in files, then we utilized a File Passthrough Service with Inbound File Adapter to send the contents of the file as a Stream to a File Passthrough Operation with Outbound TCP Adapter.

4 1
0 355

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

Thanks

Scott

0 1
0 250

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 208

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 191
Article
· Jun 29, 2023 3m read
IRIS Api Tester

Hello Community!!

I just upload my lastest application "IRIS Api Tester" to the Open Exchange.

It's a docker project with InterSystems IRIS + Newman that will allow you to test your Postman Collections in a quick and easy way..

It's ready to work out of the box, you just have to clone the repo: https://github.com/daniel-aguilar-garcia/irisapitester

Run the docker-compose file:

2 1
1 363

Hello,

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 253

Hi Developers!

This is yet another short post that is intended to simplify developers' life. Now we'll talk about how to make GitHub run unit tests with every push to the repository by adding just one file to the repo. For free. On Github Cloud. Sounds great, isn't it?

It is possible and very easy to do. Credit goes to @Dmitry Maslennikov (and his repo), ZPM Package Manager, and GitHub Actions. Let's see how this all works!

Something for Nothing by Robert Sheckley - YouTube

5 0
0 445

Sometimes we need to know for sure if the current environment has sufficient cores, memory, and bandwidth to support the planned number of users and such SLAs as latency, response time, and availability. This is true for databases and backends. This is why it is mandatory for critical applications and databases to simulate the users simultaneous/concurrent requests and collect metrics about performance and availability.

3 0
2 358