Sachin_Sawe
17 years agoContributor
Can a Test Coverage reflect elements covered by groovy script?
Ole,
soapUI has neat indications in green and red bars that show how much of your result xmls are test covered. This, however, works only if you use standard Assertions for a given soap request. It does not understand what all elements are covered by my groovy script. Is there a way that test coverage can understand those? Let me give an example to explain the problem:
Say I have a list of items coming back in my result. each item has certain properties and further children which are also of the nature of some sort of list. Now I need to verify certain referential integrity of these items and its children with respect to each other. In order to do this I need to iterate through these items. soapUI does not have functionality to iterate through stuff and have asserts. For example, in soapUI I can assert if item[1] value is something or item[1] attribute is something that I expect. but I cannot assert the same for a list of items or so. To achieve this I land up writing a groovy script that can do all this programmatically. However the soapUI test coverage does not understand how many elements of resulting xml I have covered. Instead it only picks the elements that I covered by standard assertion steps I created using soapUI GUI.
Please let me know if there is anyway to either have test coverage understand my assertions and reflect those in green bars OR
If I can assert things for a SET or COLLECTION of ITEMS in result via soapUI GUI so that test coverage green bar do cover these
Thanks,
Sachin
soapUI has neat indications in green and red bars that show how much of your result xmls are test covered. This, however, works only if you use standard Assertions for a given soap request. It does not understand what all elements are covered by my groovy script. Is there a way that test coverage can understand those? Let me give an example to explain the problem:
Say I have a list of items coming back in my result. each item has certain properties and further children which are also of the nature of some sort of list. Now I need to verify certain referential integrity of these items and its children with respect to each other. In order to do this I need to iterate through these items. soapUI does not have functionality to iterate through stuff and have asserts. For example, in soapUI I can assert if item[1] value is something or item[1] attribute is something that I expect. but I cannot assert the same for a list of items or so. To achieve this I land up writing a groovy script that can do all this programmatically. However the soapUI test coverage does not understand how many elements of resulting xml I have covered. Instead it only picks the elements that I covered by standard assertion steps I created using soapUI GUI.
Please let me know if there is anyway to either have test coverage understand my assertions and reflect those in green bars OR
If I can assert things for a SET or COLLECTION of ITEMS in result via soapUI GUI so that test coverage green bar do cover these
Thanks,
Sachin