Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support userparams argument of RunTest() and DebugRunTestCase() (from %UnitTest.Manager) when invoking tests from VS Code #1368

Closed
isc-solon opened this issue May 21, 2024 · 3 comments

Comments

@isc-solon
Copy link
Collaborator

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?

@isc-bsaviano
Copy link
Contributor

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.

@isc-rsingh
Copy link
Member

@isc-bsaviano
Copy link
Contributor

There's not enough interest to warrant spending time on this

@isc-bsaviano isc-bsaviano closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants