Hi,
I have a question about 'Test as Step' function of WebUI Test Studio.
For example, I have a test list which includes 10 different tests. And each test begins from logging into the web-site.
I can record logging actions (navigate to url, entering login/password and pressing a button) and save them as a separate test, for example, 'Login_User', that can be inserted into each test by using 'Test as Step' function.
But what if I need to use different login/password in each test? So is there any possibility to pass arguments (login and password) to the test 'Login_User'?
I have a question about 'Test as Step' function of WebUI Test Studio.
For example, I have a test list which includes 10 different tests. And each test begins from logging into the web-site.
I can record logging actions (navigate to url, entering login/password and pressing a button) and save them as a separate test, for example, 'Login_User', that can be inserted into each test by using 'Test as Step' function.
But what if I need to use different login/password in each test? So is there any possibility to pass arguments (login and password) to the test 'Login_User'?
10 Answers, 1 is accepted
0
Accepted
Hi Maria,
This sounds like a perfect use of a Data Driven test. I attached a document that goes into detail for data driven testing with WebUI Test Studio. Also we recently made some fixes and improvements to Data Driven testing. I highly recommend you get the latest internal build (build 2010.2.727) for best results.
In your case I recommend binding a data source to your top most test. This data source will propagate down to the sub-tests, such as your login test. Your login test can then get the necessary UserID and password from the datasource and let the rest of the test run normally.
Regards,
Cody
the Telerik team
This sounds like a perfect use of a Data Driven test. I attached a document that goes into detail for data driven testing with WebUI Test Studio. Also we recently made some fixes and improvements to Data Driven testing. I highly recommend you get the latest internal build (build 2010.2.727) for best results.
In your case I recommend binding a data source to your top most test. This data source will propagate down to the sub-tests, such as your login test. Your login test can then get the necessary UserID and password from the datasource and let the rest of the test run normally.
Regards,
Cody
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

Maria
Top achievements
Rank 1
answered on 02 Aug 2010, 02:48 PM
Cody,
Thanks for help and for detailed description of using data driven tests.
I have another question about binding a test to data source.
Can I have an access to binding datasource from Find expression builder? (to find an element depending on current iteration)
Thanks for help and for detailed description of using data driven tests.
I have another question about binding a test to data source.
Can I have an access to binding datasource from Find expression builder? (to find an element depending on current iteration)
0
Accepted
Hello Maria,
No I'm sorry not directly. That feature is on our To-Do list. In the meantime what you can do is convert a step to code and then use the data in a data driven test in code however you like. This includes some form of element identification/find expression.
All the best,
Cody
the Telerik team
No I'm sorry not directly. That feature is on our To-Do list. In the meantime what you can do is convert a step to code and then use the data in a data driven test in code however you like. This includes some form of element identification/find expression.
All the best,
Cody
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

Maria
Top achievements
Rank 1
answered on 05 Aug 2010, 11:21 AM
Hi,
Please, help to resolve my problems.
I have a Parent test 'Upload file by user' which contains the following steps:
1. Navigate to url
2. Enter user id
3. Click a button to log in
4. Execute test 'Adding material' (*it was inserted by using 'Test as Step')
The sub-test 'Adding material' does the following:
1. Choose appropriate point of menu
2. click a button, that opens file upload dialog
3. input path to file (from external data source - Excel file)
4. input describing of file into textbox (from external data source - Excel file)
5. click a button to finish uploading
So I tried to follow your advices about DDT, but faced these problems:
1) if the data source is binded to Parent test 'Upload file by user', execution of this test will stop on the step 3 of 'Adding material' (file upload dialog will open, but no path from data source will be inputed and upload dialog will be shown until manually aborting the test execution).
2) if the data source is binded to sub-test 'Adding file', execution of the Parent test will pass, but steps of sub-test 'Adding material' will not be executed and Log file will contain this text:
Please, help to resolve my problems.
I have a Parent test 'Upload file by user' which contains the following steps:
1. Navigate to url
2. Enter user id
3. Click a button to log in
4. Execute test 'Adding material' (*it was inserted by using 'Test as Step')
The sub-test 'Adding material' does the following:
1. Choose appropriate point of menu
2. click a button, that opens file upload dialog
3. input path to file (from external data source - Excel file)
4. input describing of file into textbox (from external data source - Excel file)
5. click a button to finish uploading
So I tried to follow your advices about DDT, but faced these problems:
1) if the data source is binded to Parent test 'Upload file by user', execution of this test will stop on the step 3 of 'Adding material' (file upload dialog will open, but no path from data source will be inputed and upload dialog will be shown until manually aborting the test execution).
2) if the data source is binded to sub-test 'Adding file', execution of the Parent test will pass, but steps of sub-test 'Adding material' will not be executed and Log file will contain this text:
Overall Result: Pass
--------------------------------------------------
'05.08.2010 13:52:38' - 'Pass' : 1. Navigate to : 'http://*******'
'05.08.2010 13:52:38' - 'Pass' : 2. Set 'TbEnterByIDText' text to '*****'
'05.08.2010 13:52:40' - 'Pass' : 3. Click 'BtnEnterByIDSubmit'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'05.08.2010 13:52:40' - Executing test 'Adding material' as a step.
--------------------------------------------------
--------------------------------------------------
'05.08.2010 13:52:40' - System.NullReferenceException: Object reference not set to an instance of an object.
in ArtOfTest.WebAii.Design.Execution.ExecutionContext.SetNewBrowserTracking(Test test, Object codeBehind)
in ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Object codeBehindInstance)
в ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteDataDrivenTest(Test test, ExecutionEngine ee, TestResult testResult)
in ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteTestInCurrentContext(Test test)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
'05.08.2010 13:52:40' - 'Pass' : 14. Execute test 'Adding material'
--------------------------------------------------
'05.08.2010 13:52:40' - Overall Result: Pass
--------------------------------------------------
0
Hi Maria,
We have recently worked on improving the test as step data-driven scenario. You can try the latest uploaded build that supports multiple data sources in a test as step scenario along with introducing the InheritParentDataSource Test property. You can set that property to true of the child data-bound test so that it gets the parent data source on execution. The list of internal build updates is available here.
Please let us know if that works to you as expected and if you need further assistance or any other questions.
All the best,
Cody
the Telerik team
We have recently worked on improving the test as step data-driven scenario. You can try the latest uploaded build that supports multiple data sources in a test as step scenario along with introducing the InheritParentDataSource Test property. You can set that property to true of the child data-bound test so that it gets the parent data source on execution. The list of internal build updates is available here.
Please let us know if that works to you as expected and if you need further assistance or any other questions.
All the best,
Cody
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

Maria
Top achievements
Rank 1
answered on 06 Aug 2010, 08:04 AM
I'm using the latest internal build of WebUI Test Studio QA Edition 2010.2.727.0 and have problems that were described in a previous post. And this build is still available as the latest internal build here
The link, you've mentioned in your answer, refers to build 2010.2.802, but this link doesn't work.
The link, you've mentioned in your answer, refers to build 2010.2.802, but this link doesn't work.
0

Maria
Top achievements
Rank 1
answered on 09 Aug 2010, 09:09 AM
Information about the latest internal build was refreshed after my previous post, so I was able to download the version 2010.2.806.0.
But 2 problems, I mentioned above, are still actual.
But 2 problems, I mentioned above, are still actual.
0
Hi Maria,
Thanks for upgrading to the latest build.
Is the site you run these tests on available for us to work on? If so, can you please send these tests via a formal support ticket so that we can debug what's going on and get back to you with a solution shortly? I think this will be the best way to proceed since I can't identify the source of the problems without playing with the tests.
Thank you and looking forward to hearing from you.
Best wishes,
Konstantin Petkov
the Telerik team
Thanks for upgrading to the latest build.
Is the site you run these tests on available for us to work on? If so, can you please send these tests via a formal support ticket so that we can debug what's going on and get back to you with a solution shortly? I think this will be the best way to proceed since I can't identify the source of the problems without playing with the tests.
Thank you and looking forward to hearing from you.
Best wishes,
Konstantin Petkov
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

Maria
Top achievements
Rank 1
answered on 10 Aug 2010, 08:39 AM
Hi,
Unfortunately, test-version of the site is unavailable for public. So I can't send the tests I have problems with.
Resolution of the problem isn't actual for me from now, because trial period of Test Studio has expired and my company decided not to buy this product.
Thanks for help for all the Telerik Team.
Unfortunately, test-version of the site is unavailable for public. So I can't send the tests I have problems with.
Resolution of the problem isn't actual for me from now, because trial period of Test Studio has expired and my company decided not to buy this product.
Thanks for help for all the Telerik Team.
0
Hello Maria,
We're sorry to hear about that decision. I think we've already resolved most of the problems you reported and can definitely help you further to get what you need from the product. We're also working hard on introducing many new features and are always on top with supporting out clients.
Thanks a lot for your feedback so far!
Sincerely yours,
Konstantin Petkov
the Telerik team
We're sorry to hear about that decision. I think we've already resolved most of the problems you reported and can definitely help you further to get what you need from the product. We're also working hard on introducing many new features and are always on top with supporting out clients.
Thanks a lot for your feedback so far!
Sincerely yours,
Konstantin Petkov
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