Tests that can react to changes in test lists

3 posts, 1 answers
  1. Carl
    Carl avatar
    11 posts
    Member since:
    Apr 2012

    Posted 28 Nov 2012 Link to this post

    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. Answer
    Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 03 Dec 2012 Link to this post

    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
  3. Carl
    Carl avatar
    11 posts
    Member since:
    Apr 2012

    Posted 04 Dec 2012 Link to this post

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

Back to Top