You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RunTest(), DebugRunTestCase(), and some other methods of %UnitTest.Manager support a ByRef userparams array argument. It allows you to pass custom arguments into the testing methods (including OnBefore* and OnAfter* methods). Obscure but useful feature I think.
For example, If you set the array fred("logging") = 1, and fred("check") = "abcd1234" and pass .fred into RunTest(), then your testing methods can access those values using ..Manager.UserFields.GetAt("logging") and GetAt("check").
Do you think it's possible for an invocation of a test to 1) prompt for these name/value pairs, 2) stuff them into an array, and 3) pass that array by reference into the methods that are called when the tests are invoked from VS Code?
The text was updated successfully, but these errors were encountered:
This would require a server-side change. The VS Code API doesn't have a great way to prompt for a list of key/value pairs, and I wouldn't want to prompt the user for these rarely used parameters every time they want to run a test. I suppose they could be put in a VS Code setting, but users would then need to change that setting often. I'll leave this open for a while to get user feedback but I'm thinking that the best action to take will be documenting this as a limitation and moving on.
RunTest(), DebugRunTestCase(), and some other methods of %UnitTest.Manager support a ByRef userparams array argument. It allows you to pass custom arguments into the testing methods (including OnBefore* and OnAfter* methods). Obscure but useful feature I think.
For example, If you set the array
fred("logging") = 1
, andfred("check") = "abcd1234"
and pass.fred
into RunTest(), then your testing methods can access those values using..Manager.UserFields.GetAt("logging")
andGetAt("check")
.Do you think it's possible for an invocation of a test to 1) prompt for these name/value pairs, 2) stuff them into an array, and 3) pass that array by reference into the methods that are called when the tests are invoked from VS Code?
The text was updated successfully, but these errors were encountered: