Verification Steps

2 posts, 0 answers
  1. Lynsey
    Lynsey avatar
    4 posts
    Member since:
    Jun 2011

    Posted 16 Sep 2011 Link to this post


    I have a test where I want to verify that a certain document ID is routed correctly on the system I am testing.  However, the document ID is generated as part of an earlier test step & changes each time a new document is created.  So each time I run the test the document ID is different & I don't know what the ID will be until it is generated as part of the previous step.  Is it possible for me to capture the document ID when it is created and use that information it in a later verification step? 

    The only way I could think of to test this would be to set up a separate test to create the document ID then another test for the verification and update the verification test each time once I know the document ID that has been generated.

  2. Stoich
    Stoich avatar
    1 posts

    Posted 16 Sep 2011 Link to this post

    Hello Lynsey,
       it sounds like you need a Extraction step:

    It's aslo possible to access one test's Extracted Values from a different test, should you need to. This requires a little trick, you can do it by using the TestAsStep feature:

    What you can do is set the TestAsStep to inherit its parent's datasource (screenshot 1). That way the TestAsStep will be able to access the DataSource and the extracted values of its parent test. You can set/get extracted values in code like so:

    this.SetExtractedValue("ev", "some value");


    So you can set a parameter in the Parent test and extract it in the TestAsStep. However, you'll need to databind the Parent test in order to use InheritParentDataSource (even if you don't plan to use the values from the datasource at all):

    Keep in mind that if you have more than one row in the datasource that means your test will execute in multiple iterations. Let me know whether you require additional assistance with this.

    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top