This is a migrated thread and some comments may be shown as answers.

Problem when renaming code steps

2 Answers 127 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 28 Jul 2011, 02:40 AM
I have a script that contains about 176 steps.  Within those 176 steps I have about 20 coded steps, the coded steps are sprinkled throughout the test.  I needed to change the names of the coded steps, rather than open up each coded step one at a time, I clicked on the "class" button so that I could scroll through all of the code for the test and change the step names all at one time.  I changed the names of the coded steps, closed the class, saved the class and then noticed that Test Studio had moved everyone of the coded steps to the bottom of the test. Obviously having the test rearranged was not what I was looking for.   Has this happened to anyone else?

2 Answers, 1 is accepted

Sort by
0
Daniel Djambov
Telerik team
answered on 28 Jul 2011, 07:03 AM
Hi Mark,

I'm sorry for the problem you have, but unfortunately what you experience is a desired behavior.

Here is how it works - when changing a name of a coded step class we don't know if this is a new coded step or edit of existing one, so we place the coded step in the steps sequence bellow the marker in Test Explorer for where the next recorded step to be. In your case the marker has been at the bottom of the test and when editing all coded steps, they were all put at the bottom.

In this case, what you want to do - edit all coded steps at the same time will not preserve the test steps sequence. You will have to do the renaming of the coded steps one by one, making sure the cursor for record next step is above the currently edited coded step in order not to have your test rearranged.

I'm sorry for the inconvenience and not being able to offer you another solution, but hope this guide will help you in not ruining your tests in such scenarios.

Regards,
Daniel Djambov
the Telerik team
Check out the Test Studio roadmap to find out more about the new performance testing functionality coming in our R2 2011 release this September!

Have you looked at the new Online User Guide for Telerik Test Studio?
0
Shashi
Top achievements
Rank 1
answered on 28 Jul 2011, 03:43 PM

Mark,

Another option is to change the names in the test file first and then change it in the coded step file - yes, I know this is still tedious but might be a few less mouseclicks.

Daniel: 
Telerik could make this easier by automating the second step i.e. if user changes the name in the test file, automatically change it in the corresponding coded step in the code-behind file.  Another suggestion is to support what Mark wants to do as a global option.

 

In connection with this, a couple of other features which would be very useful is to allow multiple coded steps to be associated with the same function and to allow users to change the function associated with a coded step (these are independent requests although I imagine the implementation of the second feature would be influenced by whether or not you implement the first).

Shashi

Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Daniel Djambov
Telerik team
Shashi
Top achievements
Rank 1
Share this question
or