ahart
11 years agoOccasional Contributor
Dynamic Schema Compliance Assertions?
So, I have a test case that I original created step by step. On the steps that send requests, I originally added some Schema compliance assertions. This is my "modular" test case.
Once I had the thing set up the way I wanted, I then added some test case properties to "parameterize" the test case passing in the names of the operations I want to invoke. I then call this test case from another using the "Run TestCase" test step. My modular test case setup script then rebuilds the request to hit the operations I passed in.
The schema compliance assertions fail because it is looking for message parts for the request that I used when I was originally creating them; i.e., it does not look at the modified request that was actually sent and validate the response against that. It validates against the hard coded request I used when I was originally creating this "modular" test case. What's weird is that, even if I pull that test step up, delete the schema compliance assertion, and re-add it, it still wants to use the original value, even though the request has already been changed. Thinking that perhaps this is because it's working off something cached (which has bitten me more times than I care to list), I even save the project, close it, open it back up, and try to delete/re-add the schema compliance assertion. But it still fails, looking for the response to the original operation. I don't get it.
I see nothing to configure on these "Schema Compliance" assertions, other than the URL of the WSDL to validate against. But, obviously, they retain some other information from the time when they were created.
Is it possible to do this dynamically?
Once I had the thing set up the way I wanted, I then added some test case properties to "parameterize" the test case passing in the names of the operations I want to invoke. I then call this test case from another using the "Run TestCase" test step. My modular test case setup script then rebuilds the request to hit the operations I passed in.
The schema compliance assertions fail because it is looking for message parts for the request that I used when I was originally creating them; i.e., it does not look at the modified request that was actually sent and validate the response against that. It validates against the hard coded request I used when I was originally creating this "modular" test case. What's weird is that, even if I pull that test step up, delete the schema compliance assertion, and re-add it, it still wants to use the original value, even though the request has already been changed. Thinking that perhaps this is because it's working off something cached (which has bitten me more times than I care to list), I even save the project, close it, open it back up, and try to delete/re-add the schema compliance assertion. But it still fails, looking for the response to the original operation. I don't get it.
I see nothing to configure on these "Schema Compliance" assertions, other than the URL of the WSDL to validate against. But, obviously, they retain some other information from the time when they were created.
Is it possible to do this dynamically?