Question
· 19 hr ago

%UnitTest - Is there a variable or property that can be checked so the process knows it's executing a unit test?

Yes, that's right, a Cache 2017.1 question.  Let's all take a trip in the Wayback Machine.

The company I'm working for is in the process of starting to use the %UnitTest framework, and we are experiencing some errors in the code with some existing logic.  Long story short, it looks like the best way to handle the issue would be to recognize we're executing the job as a part of a unit test.  Is there any sort of variable or property that can be checked to confirm the process is indeed executing a unit test?  A lot of our legacy methods NEW virtually all variables at the top of the method so setting a variable in OnBeforeAllTests() would be futile.  Any thoughts?

Thank you kindly for any guidance you're able to provide.

Product version: Caché 2017.1
$ZV: 2017.1.3.317.0
Discussion (3)2
Log in or sign up to continue