© 2024 InterSystems Corporation, Cambridge, MA. All rights reserved.Privacy & TermsGuaranteeSection 508Contest Terms
Initial Release
Simple unit tests for data transforms in InterSystems IRIS using external files.
Build and run the Docker image
$ docker-compose build
$ docker-compose up -d
Enter IRIS Management Portal using superuser
/ SYS
account.
Open a WebTerminal session and run the tests:
do ##class(Sample.TestCase.BankLoan).Run("/app/src/", "Sample/TestCase:Sample.TestCase.BankLoan")
do ##class(Sample.TestCase.Health).Run("/app/src/", "Sample/TestCase:Sample.TestCase.Health")
Open IRIS Unit Test Portal and check out the results
System Explorer > Tools > Unit Test Portal > Switch to APP namespace
This sample will let you create simple unit tests for data transforms using external files.
TestDirectory
parameter to specify the directory where your tests are stored.BeforeLookUpDirectory
, AfterLookUpDirectory
and LookUpTables
parameters to load some specific Look Up tables before running the tests.datatransform-test/dt/Sample.BankLoan.ApplicationToApproval/
directory.datatransform-test/dt/Sample.Health.a31ToPatient
directory.In your test directory you can have:
<DataTransformClassName>/
sub-directory for each data transform you want to test.<DataTransformClassName>/<name>.in.txt
required input message to the data transform you want to test.<DataTransformClassName>/<name>.out.txt
required expected message of the data transform for the given input.<DataTransformClassName>/<name>.nfo.txt
optional simple info message you want to appear during the text execution.In case you are getting an error while running the test you will get:
<DataTransformClassName>/<name>.gen.txt
actual output of the data transform for the given input. You can compare this file Vs. the expected output to see what’s wrong.