Resuable Login Test

4 posts, 1 answers
  1. B
    B avatar
    2 posts
    Member since:
    Aug 2012

    Posted 08 Nov 2012 Link to this post

    Hi,

    Our team is currently evaluating Test Studio and we were wondering how to go about creating a login test that can accept a user/password and be reused in other scripts?

    I've read a few forum posts on this subject and believe the approach is to use the Test as Step / Data Driven approach, however I'm not 100% sure which of our tests I need to modify in Test Studio to achieve this :-) I've attached a picture of the current project structure.

    Currently I have a _LOGIN test (with a hardcoded user/password) that is called via Test As Step by both the CreateStringFilter and ViewDashboard tests. I'd like to modify it so CreateStringFilter can use a username & password of admin/admin and ViewDashboard QA/12345.

    Is anyone able to outline the steps based on our test structure to set this up?

    Cheers,
    Brett
  2. Answer
    Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 09 Nov 2012 Link to this post

    Hello Brett,

    In order to achieve this, you need to bind the parent tests to a local or external data source. Then check "InheritParentDataSource" on the login subtest. This will cause the subtest to consume/use all the data offered by the parent test, effectively passing that data in as a parameter for the subtest to use. See the first scenario described in this article for more information.

    Regards,
    Plamen
    the Telerik team
    Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
    Vote now
  3. B
    B avatar
    2 posts
    Member since:
    Aug 2012

    Posted 11 Nov 2012 Link to this post

    Great, thanks for that
    That helped clarify what I needed to change :-) Got it working now
  4. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 12 Nov 2012 Link to this post

    Hello Brett,

    Glad to hear it! Please contact us again if you have further problems.

    Regards,
    Plamen
    the Telerik team
    Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
    Vote now
Back to Top