frasd06's avatar
frasd06
Established Member
9 days ago
Status:
New Idea

Run Script Routine uses default parameter values

If I have a Function that has default parameter values set when I add that function into the test with Run Script Routine it should pull through the default parameter values.

Currently, it just sets them all to None and sometimes you just want it to use the defaults and have to spend time setting each one.

For example, if I add the below function to Run Script Routine it should automatically set user = 'Test' and id = 123 in the Run Script Routine.

def TestFunction(user = 'Test', id = 123): 

Then if the Function is modified and a new Parameter is added with a default parameter, Run Script Routine should add the new parameter with the default at the run time. The log should show a warning like the intelligent fix does and ask if you want to apply the fix going forward. Currently, the tests will fail with an exception indicating that the parameter count is incorrect. 

No CommentsBe the first to comment