Question
Gordon Hodgkinson · Apr 9, 2017

Cache UnitTest Manager RunTest Error #5007

Hi All,

Am attempting to run sample unit tests as per

Caché %UnitTest Tutorial
Example: Executing a Test Using Set-Up and Tear Down Methods
 

 and getting an ERROR #5007:

The Terminal detail is as follows:

SAMPLES>Set ^UnitTestRoot="C:\UnitTests"                                        
SAMPLES>write ^UnitTestRoot
C:\UnitTests
SAMPLES>do ##class(%UnitTest.Manager).RunTest("MyTests")
 
ERROR #5007: Directory name '/usr/cachesys/mgr/samples/C:/UnitTests/MyTests/' is invalid
SAMPLES>

The '/usr/cachesys/mgr/samples/' part is the correct path for the namespace 'SAMPLES' and the 'C:/UnitTests/MyTests/' part is the correct local path as specified by '^UnitTestRoot' + 'Child Directory = MyTests'. The file 'Tests.xml' resides within this path => ' C:/UnitTests/MyTests/Tests.xml' .

This is my first attempt at Unit Testing in Cache and as such would appreciate any advice that can put me on the right track as to what I may of either missed or not understand in this process.

Please advise if and what other information I should supply.

Cheers,

Gordon

0
0 363
Discussion (2)2
Log in or sign up to continue

Unit tests should be on a server. Copy your files to "/usr/cachesys/mgr/unittests/" and point ^UnitTestRoot  global to it.

Hi Eduard,

Much appreciate your fast response.

OK... That makes sense... so I assume the Tutorials are assuming you have a server instance on a local machine and hence the local files would then work...

Cheers,

Gordon