This is a migrated thread and some comments may be shown as answers.
Tests that can react to changes in test lists
2 Answers 15 Views
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 28 Nov 2012, 04:04 PM
Hi there
        I was wondering is, is there any way I could use a coded step to pull back a list of the tests in a test list as it is executing.

The reason I ask is I want a coded step in the first test to react to changes in the test list.

So for example lets say I have a test list of 6 tests

Setuptest
test1
test2
test3
test4
test5

I want to be able to have Setuptest preform some data set up for all the other tests and I want it to be able to react to changes in the test list so that if I add test6 to the list it will react to the change without needing to be updated.

Thanks

Carl

2 Answers, 1 is accepted

Sort by
0
Accepted
Stoich
Telerik team
answered on 03 Dec 2012, 11:50 AM
Hi Carl,
you can take advantage of Test Studio's extendability and override the OnBeforeTestList started feature to implement whatever logic you want in there:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/general/execution-extensions.aspx

The TestList class should give you access to the information you're looking for (test included in this list etc).

The datasources for your test project are stored under ProjectFolder/Data (e.g. C:\Users\stoichev\Documents\Test Studio Projects\TestProject75\Data) so you can easily write code to edit them. 
Getting the path to the project folder in code is easy:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/general/get-project-folder.aspx

Additionally don't forget about the Dynamic TestLists feature:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/test-execution/standalone-test-lists.aspx#Dynamic

All of this information should give you an idea of how you can accomplish what you're looking to accomplish. Let me know if you need assistance with the heavy lifting (i.e. writing the actual code, figuring out how to make the plugin work and all of that stuff).

Accidentally, I'm doing a (free) "workshop" session on creating your own custom Test  Studio plugins this Wednesday so if you've got the time you should definitely sign up for that:
https://www1.gotomeeting.com/register/369331128

Greetings,
Stoich
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Carl
Top achievements
Rank 1
answered on 04 Dec 2012, 08:05 AM

Thanks Stoich
        that’s exactly what I was looking for.

Asked by
Carl
Top achievements
Rank 1
Answers by
Stoich
Telerik team
Carl
Top achievements
Rank 1
Share this question
or