Is there any place like TestInitialize for me to add some customize steps for setting up environment?

6 posts, 0 answers
  1. Tom
    Tom avatar
    5 posts
    Member since:
    Dec 2010

    Posted 15 Feb 2011 Link to this post

    Hi,

    Is any one know if there had some place in WebUI Test Project Solution where i could changed for adding customize steps for setting up environment just like TestInitialize method in VS Test project?


    Regards,
    Tom
  2. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 15 Feb 2011 Link to this post

    Hello Tom,
        yes, there is. Please check out this KB article:
    http://www.telerik.com/automated-testing-tools/support/kb/code/executing-custom-scripts-before-after-your-test-runs.aspx

    Let me know if you have any problems with getting this to work!

    Best wishes,
    Stoich
    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
  3. Tom
    Tom avatar
    5 posts
    Member since:
    Dec 2010

    Posted 15 Feb 2011 Link to this post

    Thanks for your information!,
    And i had another question - if there had some place could i keep some global variables which could be used in several customized test cases?

    Regards,
    Tom
  4. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 15 Feb 2011 Link to this post

    Hi Tom,
       would you please clarify what you mean by "test cases"? Are you referring to Coded Steps?

    If so, you can declare and use global variables in the "code behind" class where all the coded steps are stored.
    Just make sure you declare them inside the class but outside each individual method (coded steps are represented as methods). From here all methods (i.e. coded steps) in your test can access it. See screenshot 1.

    Best wishes,
    Stoich
    the Telerik team
    Interested in Agile Testing? Check out Telerik TV for a recording of Automated Testing in the Agile Environment
  5. Tom
    Tom avatar
    5 posts
    Member since:
    Dec 2010

    Posted 16 Feb 2011 Link to this post

    Is this feature could be used in Developer Edition of WebUI Test Studio?
  6. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 21 Feb 2011 Link to this post

    Hello Tom,
        yes, just turn a step to code. Once you do that you'll be able to see the entire code-behind class. You can implement this solution there.

    Let me know how it goes!

    Regards,
    Stoich
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top