You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Tom Jordahl <to...@macromedia.com> on 2003/12/10 16:07:24 UTC
RE: Clover test coverage (was Re: cvs commit: ws-axis/java/src/or
g/apache/axis/wsdl/fromJava Types.java)
These numbers concern me:
org.apache.axis.wsdl.toJava Methods: 10.2% TOTAL: 3.9%
org.apache.axis.wsdl.fromJava Methods: 49.7% TOTAL: 41.9%
org.apache.axis.wsdl.gen Methods: 44.9% TOTAL: 43.9%
org.apache.axis.wsdl.symbolTable Methods: 70.2% TOTAL: 58.5%
The largest number of tests are in the test/wsdl directory, which should be testing the fromJava package better. The numbers for toJava are dismal.
Question: How will we get committers to increase these code coverage numbers?
I know writing more tests doesn't appeal to me (even if I had time). :-(
--
Tom Jordahl
Macromedia Server Development
-----Original Message-----
From: Davanum Srinivas [mailto:dims@apache.org]
Sent: Tuesday, December 09, 2003 8:41 PM
To: Glen Daniels
Cc: axis-dev@ws.apache.org
Subject: Clover test coverage (was Re: cvs commit: ws-axis/java/src/org/apache/axis/wsdl/fromJava Types.java)
+1. Understood. Let me see what i can do tomorrow. Also see
http://ws.apache.org/~dims/axis-clover/ for the latest test coverage.
-- dims
--- Glen Daniels <gl...@thoughtcraft.com> wrote:
> Hi dims, all:
>
> Two things -
>
> 1) This looks like a pretty complicated test case for a fairly simple
> problem. We could probably trim it down quite a lot and a) still test the
> failure and b) make the functional-tests run faster. What do you think?
>
> 2) Can we make a rule that says whenever you check in a new test, you MUST
> check in a readme.txt in the test directory which states a) the purpose of
> the test (i.e. what it's testing), b) the author/committer (you can find
> this out with CVS, but it's nice to see it there in the readme file
> alongside the description so you know who to ask about it)?
>
> I think we've discussed the latter point before, but we should start doing
> it to avoid infinite source-tree-creep. Also, at some point we should make
> an effort to separate out our tests into a couple of levels - the
> "mainstream" tests should test all the primary functionality we're
> interested in, and should be essentially "what's necessary to make sure the
> package does everything it's supposed to do". Then there should be a "full
> regression" which includes tests that get built to check individual bugs
> like this one.
>
> We could use the "mainstream" tests as what's necessary for checkin (maybe
> "ant checkintests"?), and then auto-run the full regressions nightly.
>
> Thoughts?
>
> --Glen
>
> ----- Original Message -----
> From: <di...@apache.org>
> To: <ws...@apache.org>
> Sent: Tuesday, December 09, 2003 4:22 PM
> Subject: cvs commit: ws-axis/java/src/org/apache/axis/wsdl/fromJava
> Types.java
>
>
> > dims 2003/12/09 13:22:01
> >
> > Modified: java/src/org/apache/axis/wsdl/fromJava Types.java
> > Added: java/test/wsdl/xsd build.xml CPWSImplServiceTestCase.java
> > good.wsdl
> > Log:
> > Fix and test case for Bug 25161 - Axis 1.2 alpha WSDL xsd types problem
> prevent .Net integration
> >
> > Revision Changes Path
> > 1.1 ws-axis/java/test/wsdl/xsd/build.xml
> >
> > Index: build.xml
> > ===================================================================
> > <?xml version="1.0" ?>
> > <!DOCTYPE project [
> > <!ENTITY properties SYSTEM "file:../../../xmls/properties.xml">
> > <!ENTITY paths SYSTEM "file:../../../xmls/path_refs.xml">
> > <!ENTITY taskdefs SYSTEM "file:../../../xmls/taskdefs.xml">
> > <!ENTITY taskdefs_post_compile SYSTEM
> "file:../../../xmls/taskdefs_post_compile.xml">
> > <!ENTITY targets SYSTEM "file:../../../xmls/targets.xml">
> > ]>
> >
> > <!-- ===================================================================
> > <description>
> > Test/Sample Component file for Axis
> >
> > Notes:
> > This is a build file for use with the Jakarta Ant build tool.
> >
> > Prerequisites:
> >
> > jakarta-ant from http://jakarta.apache.org
> >
> > Build Instructions:
> > To compile
> > ant compile
> > To execute
> > ant run
> >
> > Author:
> > Matt Seibert mseibert@us.ibm.com
> >
> > Copyright:
> > Copyright (c) 2002-2003 Apache Software Foundation.
> > </description>
> > ==================================================================== -->
> >
> > <project default="compile">
> >
> > <property name="axis.home" location="../../.."/>
> > <property name="componentName" value="test/wsdl/xsd"/>
> > &properties;
> > &paths;
> > &taskdefs;
> > &taskdefs_post_compile;
> > &targets;
> >
> > <target name="clean">
> > <echo message="Removing ${build.dir}/classes/${componentName}
> and ${build.dir}/work/${componentName}"/>
> > <delete dir="${build.dir}/classes/${componentName}"/>
> > <delete dir="${build.dir}/work/${componentName}"/>
> > </target>
> >
> > <target name="copy" depends="setenv"/>
> >
> > <target name="compile" depends="copy">
> > <echo message="Compiling test.wsdl.xsd"/>
> >
> > <!-- local version of the WSDL -->
> > <wsdl2java url="${axis.home}/test/wsdl/xsd/good.wsdl"
> > output="${axis.home}/build/work"
> > verbose="no"
> > serverSide="yes"
> > testcase="yes">
> > <mapping
> namespace="http://snv882:10217/gateway/services/CPWebServices"
> package="test.wsdl.xsd"/>
> > <mapping namespace="http://datatypes.cs.amdocs.com"
> package="test.wsdl.xsd.data"/>
> > <mapping
> namespace="http://messages.common.api.cs.amdocs.com"
> package="test.wsdl.xsd.messages"/>
> > <mapping namespace="urn:CPWSImpl"
> package="test.wsdl.xsd.impl"/>
> > </wsdl2java>
> >
> > <copy todir="${build.dir}/work/test/wsdl/xsd" overwrite="yes">
> > <fileset dir="${axis.home}/test/wsdl/xsd">
> > <include name="*TestCase.java"/>
> > </fileset>
> > </copy>
> >
> > <javac srcdir="${build.dir}/work" destdir="${build.dest}"
> fork="${javac.fork}"
> > debug="${debug}">
> > <classpath refid="classpath"/>
> > <include name="test/wsdl/xsd/*.java"/>
> > </javac>
> > </target>
> >
> > <target name="run">
> > <antcall target="execute-Component"/>
> > </target>
> >
> > </project>
> >
> >
> >
> > 1.1
> ws-axis/java/test/wsdl/xsd/CPWSImplServiceTestCase.java
> >
> > Index: CPWSImplServiceTestCase.java
> > ===================================================================
> > /**
> > * CPWSImplServiceTestCase.java
> > *
> > * This file was auto-generated from WSDL
> > * by the Apache Axis 1.2alpha Dec 09, 2003 (01:27:53 EST) WSDL2Java
> emitter.
> > */
> >
> > package test.wsdl.xsd;
> >
> > import junit.framework.TestCase;
> > import org.apache.axis.Constants;
> > import org.apache.axis.wsdl.gen.Parser;
> > import org.apache.axis.wsdl.symbolTable.DefinedType;
> > import org.apache.axis.wsdl.symbolTable.ElementDecl;
> > import org.apache.axis.wsdl.symbolTable.SchemaUtils;
> > import org.apache.axis.wsdl.symbolTable.SymbolTable;
> >
> > import javax.xml.namespace.QName;
> > import java.util.Vector;
> >
> > public class CPWSImplServiceTestCase extends TestCase {
> > public CPWSImplServiceTestCase(java.lang.String name) {
> > super(name);
> > }
> >
> > /** Test case for Bug 25161
> > Axis 1.2 alpha WSDL xsd types problem prevent .Net integration */
> > public void testCPWebServicesWSDL() throws Exception {
> > String url = new
> test.wsdl.xsd.CPWSImplServiceLocator().getCPWebServicesAddress();
> > Parser wsdlParser = new Parser();
> > System.out.println("Reading WSDL document from '" + url +
> "?WSDL'");
> > wsdlParser.run(url + "?WSDL");
> > SymbolTable symbolTable = wsdlParser.getSymbolTable();
> > Vector v = symbolTable.getSymbols(new
> QName("http://datatypes.cs.amdocs.com", "CSText"));
> > DefinedType type = (DefinedType) v.get(0);
> > assertNotNull(type);
> > Vector v2 = SchemaUtils.getContainedElementDeclarations(
> > type.getNode(), symbolTable);
> > ElementDecl element = (ElementDecl) v2.get(0);
> > assertNotNull(element);
> > assertEquals(Constants.XSD_STRING,
> element.getType().getQName());
> > }
>
=== message truncated ===
=====
Davanum Srinivas - http://webservices.apache.org/~dims/
RE: Clover test coverage (was Re: cvs commit: ws-axis/java/src/or g/apache/axis/wsdl/fromJava Types.java)
Posted by Davanum Srinivas <di...@yahoo.com>.
Tom,
need to dig deeper. i think clover is somehow not picking up all the stuff exec'ed from
j2wAntTask.
-- dims
--- Tom Jordahl <to...@macromedia.com> wrote:
>
> These numbers concern me:
>
> org.apache.axis.wsdl.toJava Methods: 10.2% TOTAL: 3.9%
> org.apache.axis.wsdl.fromJava Methods: 49.7% TOTAL: 41.9%
> org.apache.axis.wsdl.gen Methods: 44.9% TOTAL: 43.9%
> org.apache.axis.wsdl.symbolTable Methods: 70.2% TOTAL: 58.5%
>
> The largest number of tests are in the test/wsdl directory, which should be testing the fromJava
> package better. The numbers for toJava are dismal.
>
> Question: How will we get committers to increase these code coverage numbers?
>
> I know writing more tests doesn't appeal to me (even if I had time). :-(
>
> --
> Tom Jordahl
> Macromedia Server Development
>
> -----Original Message-----
> From: Davanum Srinivas [mailto:dims@apache.org]
> Sent: Tuesday, December 09, 2003 8:41 PM
> To: Glen Daniels
> Cc: axis-dev@ws.apache.org
> Subject: Clover test coverage (was Re: cvs commit:
> ws-axis/java/src/org/apache/axis/wsdl/fromJava Types.java)
>
> +1. Understood. Let me see what i can do tomorrow. Also see
> http://ws.apache.org/~dims/axis-clover/ for the latest test coverage.
>
> -- dims
>
> --- Glen Daniels <gl...@thoughtcraft.com> wrote:
> > Hi dims, all:
> >
> > Two things -
> >
> > 1) This looks like a pretty complicated test case for a fairly simple
> > problem. We could probably trim it down quite a lot and a) still test the
> > failure and b) make the functional-tests run faster. What do you think?
> >
> > 2) Can we make a rule that says whenever you check in a new test, you MUST
> > check in a readme.txt in the test directory which states a) the purpose of
> > the test (i.e. what it's testing), b) the author/committer (you can find
> > this out with CVS, but it's nice to see it there in the readme file
> > alongside the description so you know who to ask about it)?
> >
> > I think we've discussed the latter point before, but we should start doing
> > it to avoid infinite source-tree-creep. Also, at some point we should make
> > an effort to separate out our tests into a couple of levels - the
> > "mainstream" tests should test all the primary functionality we're
> > interested in, and should be essentially "what's necessary to make sure the
> > package does everything it's supposed to do". Then there should be a "full
> > regression" which includes tests that get built to check individual bugs
> > like this one.
> >
> > We could use the "mainstream" tests as what's necessary for checkin (maybe
> > "ant checkintests"?), and then auto-run the full regressions nightly.
> >
> > Thoughts?
> >
> > --Glen
> >
> > ----- Original Message -----
> > From: <di...@apache.org>
> > To: <ws...@apache.org>
> > Sent: Tuesday, December 09, 2003 4:22 PM
> > Subject: cvs commit: ws-axis/java/src/org/apache/axis/wsdl/fromJava
> > Types.java
> >
> >
> > > dims 2003/12/09 13:22:01
> > >
> > > Modified: java/src/org/apache/axis/wsdl/fromJava Types.java
> > > Added: java/test/wsdl/xsd build.xml CPWSImplServiceTestCase.java
> > > good.wsdl
> > > Log:
> > > Fix and test case for Bug 25161 - Axis 1.2 alpha WSDL xsd types problem
> > prevent .Net integration
> > >
> > > Revision Changes Path
> > > 1.1 ws-axis/java/test/wsdl/xsd/build.xml
> > >
> > > Index: build.xml
> > > ===================================================================
> > > <?xml version="1.0" ?>
> > > <!DOCTYPE project [
> > > <!ENTITY properties SYSTEM "file:../../../xmls/properties.xml">
> > > <!ENTITY paths SYSTEM "file:../../../xmls/path_refs.xml">
> > > <!ENTITY taskdefs SYSTEM "file:../../../xmls/taskdefs.xml">
> > > <!ENTITY taskdefs_post_compile SYSTEM
> > "file:../../../xmls/taskdefs_post_compile.xml">
> > > <!ENTITY targets SYSTEM "file:../../../xmls/targets.xml">
> > > ]>
> > >
> > > <!-- ===================================================================
> > > <description>
> > > Test/Sample Component file for Axis
> > >
> > > Notes:
> > > This is a build file for use with the Jakarta Ant build tool.
> > >
> > > Prerequisites:
> > >
> > > jakarta-ant from http://jakarta.apache.org
> > >
> > > Build Instructions:
> > > To compile
> > > ant compile
> > > To execute
> > > ant run
> > >
> > > Author:
> > > Matt Seibert mseibert@us.ibm.com
> > >
> > > Copyright:
> > > Copyright (c) 2002-2003 Apache Software Foundation.
> > > </description>
> > > ==================================================================== -->
> > >
> > > <project default="compile">
> > >
> > > <property name="axis.home" location="../../.."/>
> > > <property name="componentName" value="test/wsdl/xsd"/>
> > > &properties;
> > > &paths;
> > > &taskdefs;
> > > &taskdefs_post_compile;
> > > &targets;
> > >
> > > <target name="clean">
> > > <echo message="Removing ${build.dir}/classes/${componentName}
> > and ${build.dir}/work/${componentName}"/>
> > > <delete dir="${build.dir}/classes/${componentName}"/>
> > > <delete dir="${build.dir}/work/${componentName}"/>
> > > </target>
> > >
> > > <target name="copy" depends="setenv"/>
> > >
> > > <target name="compile" depends="copy">
> > > <echo message="Compiling test.wsdl.xsd"/>
> > >
> > > <!-- local version of the WSDL -->
> > > <wsdl2java url="${axis.home}/test/wsdl/xsd/good.wsdl"
> > > output="${axis.home}/build/work"
> > > verbose="no"
> > > serverSide="yes"
> > > testcase="yes">
> > > <mapping
> > namespace="http://snv882:10217/gateway/services/CPWebServices"
> > package="test.wsdl.xsd"/>
> > > <mapping namespace="http://datatypes.cs.amdocs.com"
> > package="test.wsdl.xsd.data"/>
> > > <mapping
> > namespace="http://messages.common.api.cs.amdocs.com"
> > package="test.wsdl.xsd.messages"/>
> > > <mapping namespace="urn:CPWSImpl"
> > package="test.wsdl.xsd.impl"/>
> > > </wsdl2java>
> > >
> > > <copy todir="${build.dir}/work/test/wsdl/xsd" overwrite="yes">
> > > <fileset dir="${axis.home}/test/wsdl/xsd">
> > > <include name="*TestCase.java"/>
> > > </fileset>
> > > </copy>
> > >
> > > <javac srcdir="${build.dir}/work" destdir="${build.dest}"
> > fork="${javac.fork}"
> > > debug="${debug}">
> > > <classpath refid="classpath"/>
> > > <include name="test/wsdl/xsd/*.java"/>
> > > </javac>
> > > </target>
> > >
> > > <target name="run">
> > > <antcall target="execute-Component"/>
> > > </target>
> > >
> > > </project>
> > >
> > >
> > >
> > > 1.1
> > ws-axis/java/test/wsdl/xsd/CPWSImplServiceTestCase.java
> > >
> > > Index: CPWSImplServiceTestCase.java
> > > ===================================================================
> > > /**
> > > * CPWSImplServiceTestCase.java
> > > *
> > > * This file was auto-generated from WSDL
> > > * by the Apache Axis 1.2alpha Dec 09, 2003 (01:27:53 EST) WSDL2Java
> > emitter.
> > > */
> > >
> > > package test.wsdl.xsd;
> > >
> > > import junit.framework.TestCase;
> > > import org.apache.axis.Constants;
> > > import org.apache.axis.wsdl.gen.Parser;
> > > import org.apache.axis.wsdl.symbolTable.DefinedType;
>
=== message truncated ===
=====
Davanum Srinivas - http://webservices.apache.org/~dims/