You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by John Fallows <jo...@gmail.com> on 2005/12/29 18:51:18 UTC

Unit tests broken during ant build?

Devs,

There seems to be a problem with running the unit tests via "ant
unit-test-all" (top level build) or "ant unit-test) (api build).  Don't
worry about the UISelectManyTest breakage, that is expected and will be used
to verify the bugfix once completed.

unit-test:
    [junit] Running javax.faces.FacesExceptionTest
    [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.093 sec
    [junit] Running javax.faces.FactoryFinderTest
    [junit] Tests run: 9, Failures: 0, Errors: 7, Time elapsed: 0.078 sec
    [junit] Test javax.faces.FactoryFinderTest FAILED
    [junit] Running javax.faces.application.FacesMessageTest
    [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0.047 sec
    [junit] Running javax.faces.application.StateManagerTest
    [junit] Tests run: 5, Failures: 0, Errors: 5, Time elapsed: 0.453 sec
    [junit] Test javax.faces.application.StateManagerTest FAILED
    [junit] Running javax.faces.component.UIComponentBaseTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
    [junit] Test javax.faces.component.UIComponentBaseTest FAILED
    [junit] Running javax.faces.component.UISelectManyTest
    [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.078 sec
    [junit] Test javax.faces.component.UISelectManyTest FAILED
    [junit] Running javax.faces.component._AttachedListStateWrapperTest
    [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.093 sec
    [junit] Running javax.faces.component._AttachedStateWrapperTest
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.063 sec
[junitreport] Transform time: 843ms

Looks like UIComponentMock.java, MockStateManager.java and
MockApplicationFactory.java are not being compiled during the test build,
possibly due to the following in build/build.xml at the top level.

    <target name="unit-test" depends="compile" if="test.src.dir"
            description="build and run subproject unit tests">
...
        <javac srcdir="${test.src.dir}"
               destdir="${test.classes.dir}"
               optimize="${javac.optimize}"
               debug="${javac.debug}"
               classpathref="test.classpath">
          <include name="${test.suffix}"/>
          <exclude name="${cactus.suffix}"/>
        </javac>
...
    </target>

Looks like files with "${test.suffix}" pattern will be included for test
compilation.  However, I couldn't find the definition of this ant variable,
can anyone point me in the right direction?

Thanks in advance.

Kind Regards,
John Fallows.

--
Author Pro JSF and Ajax: Building Rich Internet Components
http://www.apress.com/book/bookDisplay.html?bID=10044

Re: Unit tests broken during ant build?

Posted by John Fallows <jo...@gmail.com>.
Sounds good, Sean.  That's what I'll do then.

tc,
-john.

--
Author Pro JSF and Ajax: Building Rich Internet Components
http://www.apress.com/book/bookDisplay.html?bID=10044

Re: Unit tests broken during ant build?

Posted by Sean Schofield <se...@gmail.com>.
Go for it.  Since we will be scrapping the Ant build soon enough
anyways I don't see the harm ;-)  This way you can get on with your
fix.

sean

On 12/29/05, John Fallows <jo...@gmail.com> wrote:
> Just a quick follow-up - not only could I not find a definition of
> ${test.suffix} but removing the <include name="${test.suffix}" > line seemed
> to fix the problem.
>
>  I'll include this removal in my next patch unless someone has a better
> idea.
>
>  tc,
>  -john.
>
>
> On 12/29/05, John Fallows <jo...@gmail.com> wrote:
> > Devs,
> >
> > There seems to be a problem with running the unit tests via "ant
> unit-test-all" (top level build) or "ant unit- test) (api build).  Don't
> worry about the UISelectManyTest breakage, that is expected and will be used
> to verify the bugfix once completed.
> >
> > unit-test:
> >     [junit] Running javax.faces.FacesExceptionTest
> >     [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.093 sec
> >     [junit] Running javax.faces.FactoryFinderTest
> >     [junit] Tests run: 9, Failures: 0, Errors: 7, Time elapsed: 0.078 sec
> >     [junit] Test javax.faces.FactoryFinderTest FAILED
> >     [junit] Running
> javax.faces.application.FacesMessageTest
> >     [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0.047 sec
> >     [junit] Running
> javax.faces.application.StateManagerTest
> >     [junit] Tests run: 5, Failures: 0, Errors: 5, Time elapsed: 0.453 sec
> >     [junit] Test javax.faces.application.StateManagerTest
> FAILED
> >     [junit] Running
> javax.faces.component.UIComponentBaseTest
> >     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
> >     [junit] Test
> javax.faces.component.UIComponentBaseTest FAILED
> >     [junit] Running
> javax.faces.component.UISelectManyTest
> >     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.078 sec
> >     [junit] Test javax.faces.component.UISelectManyTest
> FAILED
> >     [junit] Running
> javax.faces.component._AttachedListStateWrapperTest
> >     [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.093 sec
> >     [junit] Running
> javax.faces.component._AttachedStateWrapperTest
> >     [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.063 sec
> > [junitreport] Transform time: 843ms
> >
> > Looks like UIComponentMock.java, MockStateManager.java and
> MockApplicationFactory.java are not being compiled during the test build,
> possibly due to the following in build/build.xml at the top level.
> >
> >     <target name="unit-test" depends="compile" if="test.src.dir"
> >             description="build and run subproject unit tests">
> > ...
> >         <javac srcdir="${test.src.dir}"
> >                destdir="${test.classes.dir}"
> >                optimize="${javac.optimize}"
> >                debug="${javac.debug}"
> >                classpathref="test.classpath">
> >           <include name="${test.suffix}"/>
> >           <exclude name="${cactus.suffix}"/>
> >         </javac>
> > ...
> >     </target>
> >
> > Looks like files with "${test.suffix}" pattern will be included for test
> compilation.  However, I couldn't find the definition of this ant variable,
> can anyone point me in the right direction?
> >
> > Thanks in advance.
> >
> > Kind Regards,
> > John Fallows.
> >
> > --
> > Author Pro JSF and Ajax: Building Rich Internet Components
> > http://www.apress.com/book/bookDisplay.html?bID=10044
>
>
>
> --
> Author Pro JSF and Ajax: Building Rich Internet Components
> http://www.apress.com/book/bookDisplay.html?bID=10044

Re: Unit tests broken during ant build?

Posted by John Fallows <jo...@gmail.com>.
Just a quick follow-up - not only could I not find a definition of ${
test.suffix} but removing the <include name="${test.suffix}" > line seemed
to fix the problem.

I'll include this removal in my next patch unless someone has a better idea.

tc,
-john.

On 12/29/05, John Fallows <jo...@gmail.com> wrote:
>
> Devs,
>
> There seems to be a problem with running the unit tests via "ant unit-test-all"
> (top level build) or "ant unit-test) (api build).  Don't worry about the
> UISelectManyTest breakage, that is expected and will be used to verify the
> bugfix once completed.
>
> unit-test:
>     [junit] Running javax.faces.FacesExceptionTest
>     [junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 0.093 sec
>     [junit] Running javax.faces.FactoryFinderTest
>     [junit] Tests run: 9, Failures: 0, Errors: 7, Time elapsed: 0.078 sec
>     [junit] Test javax.faces.FactoryFinderTest FAILED
>     [junit] Running javax.faces.application.FacesMessageTest
>     [junit] Tests run: 12, Failures: 0, Errors: 0, Time elapsed: 0.047 sec
>     [junit] Running javax.faces.application.StateManagerTest
>     [junit] Tests run: 5, Failures: 0, Errors: 5, Time elapsed: 0.453 sec
>     [junit] Test javax.faces.application.StateManagerTest FAILED
>     [junit] Running javax.faces.component.UIComponentBaseTest
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
>     [junit] Test javax.faces.component.UIComponentBaseTest FAILED
>     [junit] Running javax.faces.component.UISelectManyTest
>     [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.078 sec
>     [junit] Test javax.faces.component.UISelectManyTest FAILED
>     [junit] Running javax.faces.component._AttachedListStateWrapperTest
>     [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 0.093 sec
>     [junit] Running javax.faces.component._AttachedStateWrapperTest
>     [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 0.063 sec
> [junitreport] Transform time: 843ms
>
> Looks like UIComponentMock.java, MockStateManager.java and
> MockApplicationFactory.java are not being compiled during the test build,
> possibly due to the following in build/build.xml at the top level.
>
>     <target name="unit-test" depends="compile" if="test.src.dir"
>             description="build and run subproject unit tests">
> ...
>         <javac srcdir="${test.src.dir}"
>                destdir="${test.classes.dir}"
>                optimize="${javac.optimize}"
>                debug="${javac.debug}"
>                classpathref="test.classpath">
>           <include name="${test.suffix}"/>
>           <exclude name="${cactus.suffix}"/>
>         </javac>
> ...
>     </target>
>
> Looks like files with "${test.suffix}" pattern will be included for testcompilation.  However, I couldn't find the definition of this ant variable,
> can anyone point me in the right direction?
>
> Thanks in advance.
>
> Kind Regards,
> John Fallows.
>
> --
> Author Pro JSF and Ajax: Building Rich Internet Components
> http://www.apress.com/book/bookDisplay.html?bID=10044




--
Author Pro JSF and Ajax: Building Rich Internet Components
http://www.apress.com/book/bookDisplay.html?bID=10044