· Jun 29, 2023

Getting INVALID OREF error while unit testing

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

Product version: IRIS 2023.2
Discussion (1)2
Log in or sign up to continue

If you're developing in Studio, open the file that contains that TestAccountSearchWithoutAccount method, then click the "View Other Code" button so you're looking at the INT code. If it says no other code to view, that's fine; you're already where you need to be. There should be a small text field near the top of the window with a drop down arrow on its left end. In that text field, type TestAccountSearchWithoutAccount+6 and press enter. That should take you directly to the line where the error is occurring.

Something on that line is trying to reference an object that doesn't exist. That's what "INVALID OREF" means. Whatever objects are on that line, check how they were created and/or opened and see if there's a chance that the object doesn't exist.