Forum Discussion
Understand the problem.
Changing the step is common because of various reasons.
Why not fix the test step name if at all possible? just to quote, "step 1" is not a good naming convention. Please give the meaningful name to the step so that you wouldn't have to rename so frequently.
To your point, renaming step name is get replaced in all place of project including groovy script references (example you pointed context.expand), but not in other assignment, because of the fact that it is a string literal (no reference).
Another chance is that if you know (i am sure you would) the method type, interface, name etc of a step, then it is possible to get the step dynamically. Of course, if the same type of request is used multiple times in same test case, will again have problem.
Thanks for the reply.
Switching to a better naming convention is actually our main cause of test step renames.. 😉
Using the same type of request multiple times in a test case is not uncommon in this project either. Also, if you would use that, dynamically by method or whatever, or something like CONTAINS as suggested in the other reply: it gets harder for a human reader to understand what is actually being pointed at, and if it still is correctly being pointed at.
Basically we want to point to a test step with a reference instead of a string literal, so that it automatically adjusts. But for human readability it should still include the test step name.
Related Content
- 5 years agoComputingFroggy