Written by

Question Gautam Rishi · Jun 29, 2023

mocking framework and how to setup it on local iris

Hi All,

I am writing few test for REST API need help from you guys as  I am new to Objectscript. I want to implement mocking into testcase but didn't get any good resource for the same. please help me

Comments

Gautam Rishi  Jun 29, 2023 to Luis Angel Pérez Ramos

It is not what i want. I am writing unit test  cases and Also I have tested APIs from Postman but for Unit testing we need to write Unit testcases.

0
Dmitry Maslennikov · Jun 29, 2023

I'm sure that the best way to test REST API would be to use some external tools, such as Postman/newman

You can look at my example project, which contains running tests against REST using newman

But it also contains some tests for REST on the IRIS side

0
Gautam Rishi  Jun 30, 2023 to Guillaume Rongier

Hi @Guillaume Rongier 
I was also looking the same repository. Try to install it by using ZPM. But it was giving error below - 

ERROR! 'mocking-framework' not found in any repository.
any article how to setup this framework in my existing project on a local iris server.

0
Gautam Rishi  Jul 22, 2023 to Guillaume Rongier

How you are running the testcases. I tries to copy the Fw dir to my project but it is not working.

0
Gautam Rishi  Jul 22, 2023 to Guillaume Rongier

I am getting this error while compiling few files.
 

ERROR #5373: Class 'EnsLib.HL7.Message', used by 'TEST.Fw.CUnitTestBase:GetHL7FromString:ReturnType', does not exist

> ERROR #5030: An error occurred while compiling class 'TEST.Fw.CUnitTestBase'

ERROR #5373: Class 'EnsLib.HL7.Message', used by 'TEST.Fw.CUnitTestBase:GetHL7FromXData:ReturnType', does not exist

> ERROR #5030: An error occurred while compiling class 'TEST.Fw.CUnitTestBase'

0
Gautam Rishi  Jun 30, 2023 to Evgeny Shvarov

getting this error while running the same command
ERROR! ObjectScript error: <CLASS DOES NOT EXIST>%GetClass+5^%ZPM.PackageManager.Developer.Extension.SourceControl.Interface.1 *SourceControl.Git.Extension
  > ERROR #6315: Errors reporting importing XML subelement in file '/Users/irisusr/mgr/Temp/6665532401621932/InterSystems-UnitTest-Mocking/module.xml' at line '3' offset '42', skipping this item.

0
Gautam Rishi  Jun 30, 2023 to John Murray

mocking-framework]    Reload START (/Users/irisusr/mgr/Temp/6665534996923997/InterSystems-UnitTest-Mocking/)
[mocking-framework]    Reload FAILURE
ERROR! Resource path '/Users/irisusr/mgr/Temp/6665534996923997/InterSystems-UnitTest-Mocking/src/chs' not found

0