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

Parameterization in Telerik

4 Answers 268 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ME
Top achievements
Rank 1
ME asked on 14 Oct 2010, 01:16 PM
Is there any parameterization in Telerik.
I am looking for something like the following, supposed i have tests / scripts called login, DoSomething, DoSomethingElse
I would like to be able to arrange those in a list (execution unit) that looks like that in other paradigms:

Login("Admin", "pwd");
DoSomething();
DoSomethingElse();
Login("Guest", "");
DoSomething();
DoSomethingElse();

I would also like to have those scripts (for example) run as a unit using some other parameters (such as a configuration or browser)
MyList(params[ ]);

Much appreciated

4 Answers, 1 is accepted

Sort by
0
tom
Top achievements
Rank 1
answered on 14 Oct 2010, 03:01 PM
Hello

I am also wondering this...

I have a test recorded within one envirment and i need to run it on another...

Switching enviroments is donelike so:

Enviroment1: http://enviroment1/application.asp
Enviroment2: http://enviroment2/application.asp

I would like to have a datapool or parameter for this, so we can which enviroments...

Regards,
Tom


0
Daniel Levy
Telerik team
answered on 15 Oct 2010, 02:38 PM
Hello,

Tom - it sounds as though this is a perfect example of our BaseURL feature. Take a look at this thread that describes how to use this feature:

http://www.telerik.com/automated-testing-tools/community/forums/webui-test-studio-developer-edition/general-discussions/using-parameters.aspx

Avraham - your question is a little different. You can utilize the 'test as step' feature to accomplish your desired result, for example:

Test A (data driven login test) calls Test B which covers test case 'something' and test case 'something else'. Test A will iterate for each username / password combo in the dataset, thus iterating Test B for each login.

Hope this helps!

Best wishes,
Daniel Levy
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
0
Jim
Top achievements
Rank 1
answered on 25 Nov 2010, 12:20 PM
Hi Daniel

I have a problem similar to the one described by Avraham, but I want to be able to control which login is used when I call the test step.  Is this possible?

I have recorded a test that logs a user into our website.  There are 6 user accounts that I need to test with and I can certainly bind the test to a data source containing login details for those 6 users.   When I call the test as a step, it will execute the test 6 times - but I don't want to do this.  I want to be able to call the login test as a step and specify that it should use 1 of the defined logins. 

In essence, I want to treat the test as a function and pass it a parameter.  Can this be done?  If not, I think I would need to maintain 6 copies of the login test and bind each one to a single row in the data source.

Thanks, Jim
0
Cody
Telerik team
answered on 25 Nov 2010, 05:59 PM
Hi Jim,

I think you can accomplish your goal by taking advantage of the InheritParentDataSource feature as shown in the attached screenshot. Here's the sequence:

  1. Data bind your parent test
  2. On your sub-test check the InheritParentDataSource
Once you do this your subtest will be able to use the same data from the parent test. Then all you need to do is to put the login information in your data source and bind that column in the subtest.

Let us know if you need further assistance with this.

All the best,
Cody
the Telerik team
Interested in Agile Testing?

Tune in Wednesday, December 1st for a very special Webinar focused on Agile Testing. Click here to register for free!
Tags
General Discussions
Asked by
ME
Top achievements
Rank 1
Answers by
tom
Top achievements
Rank 1
Daniel Levy
Telerik team
Jim
Top achievements
Rank 1
Cody
Telerik team
Share this question
or