Test case with input parameter like function

3 posts, 0 answers
  1. WY
    WY avatar
    2 posts
    Member since:
    Mar 2015

    Posted 24 Jul 2015 Link to this post

    Does test studio have some feature to achieve this: use test case like a function, create step with custom input parameter.

    I know data source can somewhat do this, but it is not flexible.

    Suppose we want create a scenario, User A login the system, publish a product, User B login to buy the product, User A login the process the order. A and B can vary from time to time.

    Can we easily achieve this by assembling steps?

  2. WY
    WY avatar
    2 posts
    Member since:
    Mar 2015

    Posted 24 Jul 2015 Link to this post

    Is it possible to enter a $(variable) to a control?

    just like Enter text '$(someText)' in 'KwText'

  3. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 28 Jul 2015 Link to this post

    Hello,

    I apologies for the delay getting back to you on this. We were temporarily overloaded for the last week.

    For your first question, yes we have the Test-As-Step feature. You can pass it parameters from the parent test via multiple methods:
    • Check the InheritParentDataSource property - When this is turned on the child test gets all the data rows that the parent test gets when using data binding.
    • Extracted Variables - These are stored in a global data dictionary and exist for the entire life of the test. Both child tests and parent tests have access to these variables. They can also be set via a coded step.
    • Your own custom code - You could implement your own code to pass a variable from a parent test to a child test using standard programming methods e.g. create a global variable in code which can be accessed anywhere by any other code.

     Is it possible to enter a $(variable) to a control?

    That's exactly what our Extracted Variables were designed to handle.


    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top