ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlcarpen...@household.com
Subject Re: Changing Working Directory to get tests to work (The Solution)
Date Wed, 07 Aug 2002 22:21:14 GMT

>On Tue, 6 Aug 2002, <jlcarpenter@household.com> wrote:

>> As a side note, the AbstractCvsTaskTest makes use of anonymous
>> access to the jakarta cvs server.

>This is one of the main reasons it is not part of the test run by the
>run-tests target.

>> It might be better to instead create a local cvs repository with the
>> cvs init command.

>Doesn't this have even stronger requirements than network access to
>port 2401?  Can you have a local CVS repo on Windows or MacOS 9 (OK,
>I'm getting silly here)?  What would you do when there already is one
>on your box?

If you need to test remote (probably pserver) access to cvs then this
is a very valid point.  If local access is adaquate for the particular
test at hand, then the drawbacks are not as bad.

I have been developing a test which takes this local repository approach
in testing a cvsgroupimport task I am developing.  (See previous postings
I have written).  There are drawbacks to this approach, but in my case I
believe the benefits outweigh the disadvantages.

So far my build file used by my test looks like:
<?xml version="1.0"?>

<project
     name="cvsgroupimporttask-test"
     basedir="../../../../../"
     default="init-repository">

     <property name="temp.dir" value="/tmpdir" />
     <property name="cvsroot" value="${temp.dir}/cvsrepository" />
     <property name="inputA" value="inputA" />
     <property name="inputB" value="inputB" />

     <target name="init-repository">
          <mkdir dir="${temp.dir}"/>
          <cvs
               command="init"
               cvsRoot="${cvsroot}"
               failonerror="true"/>
     </target>

     <target name="cleanup">
          <delete dir="${temp.dir}" />
     </target>
</project>

>> The class I created in the Ant project is:

>I still think it would be easier to run the tests via Ant's <junit>
>task instead of JUnit's testrunner.
I would typically agree, but I am working within the confines of an IDE.
I find developing without a decent graphical debugger very painful.
This means whatever process is running the unit test must be running within
the IDE not as an external process.  Consequently, I can't simply drop
down to the command line and execute >ant test (or whatever the target is).

One solution to this type of problem is to maintain junit suites for
interactive testing, and ant driven junit tests for external builds.

Maybe its possible to run Ant within the IDE and I am being a bit dense.

The very reason I am doing the work I am doing is to extract myself from
the chains of Visual Age for Java, but until this work is complete it
is much easier to simply stay within VAJ.

You may not realize that VAJ is not like any normal IDE with file based
storage
of the java files.  It is a creature unto itself, with big benefits and big
drawbacks to its way of doing things.

java files.
>Stefan

James Lee Carpenter
Software Engineer
Household Technical Services
6602 Convoy Court
San Diego, CA 92111

ph: 858-609-2461
email: jlcarpenter@household.com


                                                                                         
                          
                                                                                         
                          
                        Stefan Bodewig         To:    ant-dev@jakarta.apache.org         
                          
                        <bodewig@apache.o      cc:                                    
                             
                        rg>                    Subject:    Re: Changing Working Directory
to get tests to work (The 
                                                      Solution)                          
                          
                        08/06/2002 11:24                                                 
                          
                        PM                                                               
                          
                        Please respond to                                                
                          
                        "Ant Developers                                                  
                          
                        List"                                                            
                          
                                                                                         
                          
                                                                                         
                          



On Tue, 6 Aug 2002, <jlcarpenter@household.com> wrote:

> As a side note, the AbstractCvsTaskTest makes use of anonymous
> access to the jakarta cvs server.

This is one of the main reasons it is not part of the test run by the
run-tests target.

> It might be better to instead create a local cvs repository with the
> cvs init command.

Doesn't this have even stronger requirements than network access to
port 2401?  Can you have a local CVS repo on Windows or MacOS 9 (OK,
I'm getting silly here)?  What would you do when there already is one
on your box?

> The class I created in the Ant project is:

I still think it would be easier to run the tests via Ant's <junit>
task instead of JUnit's testrunner.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>






--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message