Software testing is an investigation conducted to provide stakeholders with information about the quality of the software product or service under test.
How can I effectively unit test a Business Process Language(BPL) that incorporates three code activities calling methods from distinct ObjectScript classes?.
We are successfully using System Default Settings to manage differences in settings across environments where the production and underlying code are otherwise identical. However, the TestingEnabled and LogGeneralTraceEvents settings don't appear to be settable via this mechanism. While we appear to be able to set them on the SDS page, they do not show up as selectable when resetting the settings on the Production Settings tab in the management portal - see screenshots below.
Hello, 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 :-) :
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")
Hi All, I want to write testcase in objectscript but stuck at this point where I am getting a DynamicObject from the class method and how can I assert this and check it is okay. Also if in any case error It will throw error custom exception class that I created. How to handle assertion for exception in this case also.
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."
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?
I found a package on OEX for a Sharding Demo If Sharding is NOT included in the Community License I can not use the Community Distribution but require a different one. And have to add ZPM manually.
I read a great article by @Timothy Leavitthere, where he wrote about unit testing and test coverage with ZPM. I am facing a slight problem and was wondering if someone has some insight into the matter.
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?
We are looking for a 3rd party application that can scan our IRIS based Cache Object Script code for vulnerabilities or coding weaknesses. There are many, many applications/vendors out there that do code scanning but none seem to support Cache Object Script or scanning the IRIS environment. If anyone is aware of a company/product that can scan our code / IRIS environment, I would love to hear about it.
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.
I am busy trying out the %UnitTest.TestProduction class to implement some automated production testing.
I have a scenario which I am not sure how to get the final results of for assertion. Below is the scenario I am trying to test, with comments on what I have done.
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.
In the context of IKO (Iris Kubernetes Operator) the question of Service not redirecting dynamically to the correct Pod is still pending. In production this can be dangerous since an overload (or any other simpler problem) can cause you to change the main Pod and leave the application inoperable until we intervene.
Intersystems support warned that this is still an issue of IKO, but there are some possibilities that I am studying.
To explore an idea I had, I would like the help of this Forum to answer the following question:
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 "myemail@myemaildomain.co.uk". I need to add the text "test" to the beginning of that string. "testmyemail@myemaildomain.co.uk".
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.