Add name of tester who selects status of a Step
We have a project where the tests follow huge amount of steps and each step covers extended functionality.
In order to achieve deeper traceability of test, we want to record the name of the user who notes certain status of execution of each step. The tests runs are continued by multiple users (using Continue Manual Run) and a test sometimes takes several days to be completed.
I tried the following:
I added the statament in the function " Function Step_FieldCanChange(FieldName, NewValue) "
If Actions("act_pass_selected") = True then
Step_Fields("ST_USER_03").Value = TDConnection.User.UserName
but obviously it is not working [img]/images/graemlins/frown.gif[/img]
I will appreciate any comments and hints.
Re: Add name of tester who selects status of a Step
There are several issues with your code :
1. You probably need to record the user name on passed and failed steps.
2. Actions("act_pass_selected") is an Action object and will never compare to the boolean value "True".
3. Rather than checking that a particular action has been performed, in the Step_FieldCanChange function, it would be more meaningful to check that the changing field is the step status.
4. Rather than using the Step_FieldCanChange function, it would be preferable to use the Step_FieldChange sub. The former is intended to verify that the changing field can receive the given new value, whereas the latter is called when the field has been assigned that value.
So, one way to achieve what you are looking for is to program the Step_FieldChange sub so that when the FieldName is "ST_STATUS", you set the ST_USER_03 field value as in your current code.