I didn't see this discussion before I added comments to the JIRA 1962. Let me try to add some comments in-line.
[1] https://issues.apache.org/jira/browse/TUSCANY-1962 On Jan 11, 2008 6:09 AM, Mike Edwards <[EMAIL PROTECTED]> wrote: > Folks, > > The real problem here is that the testcase for wsdl2java is cr*p. I'll > raise a JIRA to track this. > > Basically, the testcase runs the wsdl2java tool a number of times and > produces some output. Nothing wrong with that, except that all that is > being tested is that the tool code can be invoked without getting an > exception. > Yes, I guess this was exactly the purpose of the testcase, the full blow test, where all the java artifacts get generated and compiled it's done on wsdl2java iTest. > There is *no* checking that what is produced by the tool makes any sense > at all. And in fact, the code produced DOESN'T make any sense - try > compiling it by hand. > > So, this test needs changing and extending. There must be a test done > on the output code itself - ideally there should be an "expected output" > which is checked against the actual output. > I guess the tests we have don't check for "expected output", but try to compile it (under iTest). > One other point is that the generated code looks VERY poor - it's Java, > but not as you'd write it. For an SDO used by a method, for example, > instead of an import statement for the SDO class, followed by a variable > declaration using the class, the full path to the class is used on every > occasion it's referenced (YUK !!!!). Worse, the test doesn't actually > generate these SDO classes - hence the code won't compile since they > can't be found > I guess this is something we could improve on the tools. My guess is that it has been like this for a while. > > Yours, Mike. > > > Simon Laws wrote: > > On Jan 11, 2008 4:50 AM, <[EMAIL PROTECTED]> wrote: > > > >> Author: lresende > >> Date: Thu Jan 10 20:50:35 2008 > >> New Revision: 611046 > >> > >> URL: http://svn.apache.org/viewvc?rev=611046&view=rev > >> Log: > >> TUSCANY-1936 > >> > >> Modified: > >> incubator/tuscany/java/sca/tools/wsdl2java/pom.xml > >> > >> Modified: incubator/tuscany/java/sca/tools/wsdl2java/pom.xml > >> URL: > >> http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tools/wsdl2java/pom.xml?rev=611046&r1=611045&r2=611046&view=diff > >> > >> ============================================================================== > >> --- incubator/tuscany/java/sca/tools/wsdl2java/pom.xml (original) > >> +++ incubator/tuscany/java/sca/tools/wsdl2java/pom.xml Thu Jan 10 20:50:35 > >> 2008 > >> @@ -191,26 +191,6 @@ > >> <build> > >> <plugins> > >> <plugin> > >> - <groupId>org.codehaus.mojo</groupId> > >> - <artifactId>build-helper-maven-plugin</artifactId> > >> - <version>1.0</version> > >> - <executions> > >> - <execution> > >> - <id>add-test-source</id> > >> - <phase>generate-sources</phase> > >> - <goals> > >> - <goal>add-test-source</goal> > >> - </goals> > >> - <configuration> > >> - <sources> > >> - <source>target/sdo-source</source> > >> - <source>target/wsdl2java-source</source> > >> - </sources> > >> - </configuration> > >> - </execution> > >> - </executions> > >> - </plugin> > >> - <plugin> > >> <groupId>org.apache.tuscany.sdo</groupId> > >> <artifactId>tuscany-sdo-plugin</artifactId> > >> <version>1.0-incubating-SNAPSHOT</version> > >> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> Hi Luciano > > > > It looks like this means that we are no longer trying to compile the source > > code that is generated as part of the generator test. I'm a little concerned > > that this means that we are not checking that the generator generates valid > > output. Looking at the tests though it doesn't seem that it does explicit > > checks anyhow. So how about we build on your change here and do a textual > > comparison of what was generated against what was expected to be generated? > > > > Simon > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]