You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Benson Margulies <bi...@basistech.com> on 2007/10/24 17:41:36 UTC
Testing strategy for ServiceWSDLBuilder
I don't see any tests of ServiceWSDLBuilder in systests. This 'imports'
issue has to be tested against Aegis and JAX-WS - the mock strategy in
the test that accompany ServiceWSDLBuilder won't do it, I think. Am I
missing something, or should I just toss in a systest.
RE: Testing strategy for ServiceWSDLBuilder
Posted by Benson Margulies <bi...@basistech.com>.
That's what I did, but I had to do it in systest, since I needed a
frontend.
> -----Original Message-----
> From: Dan Diephouse [mailto:dan.diephouse@mulesource.com]
> Sent: Wednesday, October 24, 2007 7:46 PM
> To: cxf-dev@incubator.apache.org
> Subject: Re: Testing strategy for ServiceWSDLBuilder
>
> Benson Margulies wrote:
> > I don't see any tests of ServiceWSDLBuilder in systests. This
'imports'
> > issue has to be tested against Aegis and JAX-WS - the mock strategy
in
> > the test that accompany ServiceWSDLBuilder won't do it, I think. Am
I
> > missing something, or should I just toss in a systest.
> >
> >
> >
> I think the idea is that its pretty well tested through other means.
For
> instance, a bunch of Aegis tests grab the WSDL and then run assertions
> on it. Which will use ServiceWSDLBuilder underneath. (See
> AbstractAegisTest.getWsdlDocument(...) and run a few searches for its
> usages. So it's tested, just not directly.
>
> These tests would also probably make a good template for your tests.
> Then you could do something like:
>
> Document wsdl = getWsdlDocument(...);
>
assertValid("//schema[@targetNamespace='urn:foo']/import[@namespace='urn
:i
> mported:namespace'],
> wsdl);
>
> This syntax is off the top of my head, so it may be slightly off, but
> hopefully its of some help.
>
> - Dan
>
> --
> Dan Diephouse
> MuleSource
> http://mulesource.com | http://netzooid.com/blog
Re: Testing strategy for ServiceWSDLBuilder
Posted by Dan Diephouse <da...@mulesource.com>.
Benson Margulies wrote:
> I don't see any tests of ServiceWSDLBuilder in systests. This 'imports'
> issue has to be tested against Aegis and JAX-WS - the mock strategy in
> the test that accompany ServiceWSDLBuilder won't do it, I think. Am I
> missing something, or should I just toss in a systest.
>
>
>
I think the idea is that its pretty well tested through other means. For
instance, a bunch of Aegis tests grab the WSDL and then run assertions
on it. Which will use ServiceWSDLBuilder underneath. (See
AbstractAegisTest.getWsdlDocument(...) and run a few searches for its
usages. So it's tested, just not directly.
These tests would also probably make a good template for your tests.
Then you could do something like:
Document wsdl = getWsdlDocument(...);
assertValid("//schema[@targetNamespace='urn:foo']/import[@namespace='urn:imported:namespace'],
wsdl);
This syntax is off the top of my head, so it may be slightly off, but
hopefully its of some help.
- Dan
--
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com/blog