01-22-2020 05:12 AM
Hello,
In a sequence I have to use a .net code module that I also use outside TestStand (in a Windows Form application). For this reason I'm currently using the code module without using the TestStand Interoperability API meaning that I do not pass Sequence Context to my dll, I just use its function as I do in .net application. It works, I'm just wondering if it is a bad practice.
Furthermore, I choosed to use fileglobals to sto store the object reference to my dll since it is used in many subseqeunces of the sequence, even in this case I'm wondering if it is a bad practice.
Thanks in advance,
Francesca
01-22-2020 10:18 AM
If you don't need the sequencecontext inside of a code module there is no point in passing it in. I do this same thing all the time. It makes your code modules more flexible (as you noted).
As for the FileGlobals question: I would use parameters and pass by reference. This makes your sequences a lot more modular and could potentially exist in a separate sequence file, kind of like a "library" of sequences if you will, that can be shared by many tests.
Hope this helps,