Forum Discussion

Andrew_Hore's avatar
Andrew_Hore
Occasional Contributor
18 years ago

How to specify an "Excluded element" for Coverage options

Hi,

As the title suggests, just trying to work out what I can specify, and how, for an excluded element under coverage options? I'm looking to excluded specific values from a complex type being counted as part of the coverage - is this possible?

Thanks,
Andy,

5 Replies

  • Lars's avatar
    Lars
    Contributor
    Hi,

    You cannot exclude specific values, just elements.

    For instance, with the request:

     
         
            ?
            ?
         

     


    You can add the following excluded element:
    NewOperation@http://www.example.org/TestService/

    Which will exclude the whole tree under for coverage calculation.

    Hope this makes sence.

    Regards,
    Lars,
    eviware.com
  • Andrew_Hore's avatar
    Andrew_Hore
    Occasional Contributor
    Hi Lars,

    It does, unfortunately I have quite a few complex structures with about 80% of the values being optional, so I haven't generated test cases with them all populated, especially as some of them are actually read-only! So, I can never get my coverage to 100%.

    Any suggestion on how to handle this situation?

    Thanks,
    Andy.
  • Lars's avatar
    Lars
    Contributor
    Hi,

    I'm afraid I don't have a better solution for you at the moment, but it makes me think how we could improve the GUI for this purpose. Maybe it should be possible to select elements to ignore right in the coverage panel. We need to think about this.

    Regards,
    Lars
  • Andrew_Hore's avatar
    Andrew_Hore
    Occasional Contributor
    That would be good - you can expand the Message Coverage to see exactly what is covered or not, it would be nice to be able to say right there "ignore this".

    Andy.
  • Would someone be able to help me work out the syntax for excluded elements? So, for a request like this:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:van="http://van.xvwtibs.net/">
    <soapenv:Header/>
    <soapenv:Body>
    <van:getChangeNumberAnnouncementForAccount>
    <accountId>?</accountId>
    <changeno>?</changeno>
    </van:getChangeNumberAnnouncementForAccount>
    </soapenv:Body>
    </soapenv:Envelope>

    What value would exclude everything under the 'van:getChangeNumberAnnouncementForAccount' node? accountid won't work because there are other operations for which I'd like to get at accountid for coverage.