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

Is it possible to use a coded step as a "Test as Step"?

1 Answer 35 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 27 Apr 2011, 05:46 PM
I have coded steps that need to execute in order to process the selection of jquery dropdown menus.

Instead of writing the coded step every time I need to use it I would like to data-bind the parameters to a data table and call it from a folder where I save my other Test as Step "functions" and "reusable business processes".

Would this cause any conflicts?


I ask because I have problems if I copy a test that has coded steps, paste it in the same folder and rename it, and try to edit some of the test steps but still use the same coded steps.  The compile fails and the error log has references to the name of the test that I originally copied from.

Since I have problems with this scenario I thought the same might be true if I attempted to use a coded step as a "Test as Step" called by multiple tests.

1 Answer, 1 is accepted

Sort by
0
Dobry Zranchev
Telerik team
answered on 29 Apr 2011, 05:06 PM
Hi Jeff,

Thank you for writing.

First, if you copy and paste a test that contains a coded step you will see that the name of the files are changed. But when we copy the test we do not change the class name in the related C#/VB.NET file. And you should do it yourself.

Second, if you want to reuse some method in more than one test you should to create your own project and reference it in the tests. After that you will be able to call this method in all the tests that you want. You can find how to do it in the following KB article.

In case that you have other related questions, fell free to write back.

Regards,
Dobry Zranchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Jeff
Top achievements
Rank 1
Answers by
Dobry Zranchev
Telerik team
Share this question
or