Forum Discussion

globus1987's avatar
globus1987
Occasional Contributor
13 years ago

generating request

I have a question.
Part of my request structure looks like this:
<InstanceData>
<RiskList>
<Risk id="one">
</Risk>
<Risk id="two">
</Risk>
<Risk id="three">
</Risk>
</RiskList>
</InstanceData>

Every risk has a lot of attributes (around 200 lines).
In .xls I have an array of combinations of these risks where a line is a combination of true and false values for a specific risk.
How can I build an automatic test case for this (existing of all risk node depends on its value from .xls file)?

3 Replies

  • globus1987's avatar
    globus1987
    Occasional Contributor
    I have a structure with attributes and their values for every risk.
    I want to use it depending on value for risk in .xls file.
    It's not only value but very large structure.
    for example:
    in xls true true true
    req:
    <InstanceData>
    <RiskList>
    <Risk id="one">
    </Risk>
    <Risk id="two">
    </Risk>
    <Risk id="three">
    </Risk>
    </RiskList>
    </InstanceData>

    in xls true false false
    <InstanceData>
    <RiskList>
    <Risk id="one">
    </Risk>

    </RiskList>
    </InstanceData>

    in xls true false true
    <InstanceData>
    <RiskList>
    <Risk id="one">
    </Risk>
    <Risk id="three">
    </Risk>
    </RiskList>
    </InstanceData>


    If it is only value, it's not a problem with get data.
    What if it is structure with thousands of lines nested tags in tags in tags in tags...
  • Hi,

    ok - then I would suggest to create a Script TestStep after the DataSource that dynamically builds the entire RiskList element and writes it to a TestCase property which is then inserted into the request using a PropertyTransfer.

    Does that make sense?

    regards,

    /Ole
    SmartBear Software