I believe there are a couple of shortcomings that would make life easier
with the nunit2 and foreach tasks.

 

First, the nunit2 issue: I run between 10-30 tests in an nunit2 block in
each tier of my application.  But the output I receive does not include
the name of the target currently being called, or the test that is
running.  I would like to be able to see: a) the name of the test dll
currently being run, b) the name of the test being run, c) the amount of
time it took to run a given test.  It is not really acceptable to have a
batch of tests running for up to 20 minutes with no output about what is
happening.  My only option at present is to switch to use nunit-console
via exec, where I can use the /labels parameter to write out the name of
the test being run.  

 

The foreach issue: I would like to use foreach to specify a list of
assemblies to run in nunit.  This would allow me to write out a message
and do some extra processing in a shared target file, so that I do not
have to repeat the same target body in 10 different build files.  I can
get the following foreach statement to run, but it actually SORTS my
include list alphabetically - which is unacceptable in my situation.  I
attempted to use a foreach item="String" but this does not work, as the
"in" list is actually a fileset, not just an "item list".  item lists
would be very useful in nant generally, in the case when you want to
vary the target actually being called by the task - for example, I might
run a SQL script prior/after each test runs, inside the <do> block.  I
want to run various different tools against my list of dlls, not just
nunit - like NDOC.  Allowing a list capability would enhance my ability
to do this.  At present I have to duplicate lists of dlls in my build
file in order to accomplish this.  

 

                <foreach item="File" property="assembly">

                                <in>

                                                <items>

<include name="${build.basedir}\Itron.EE.Common.DataEvent.Test.dll" />

                                                                <include
name="${build.basedir}\Itron.EE.Common.EntityManager.Test.dll" />

                                                                <include
name="${build.basedir}\Itron.EE.Common.Reporting.Test.dll" />

                                                                <include
name="${build.basedir}\Itron.EE.Common.TaskManagement.Test.dll" />

                                                </items>

                                </in>

                                <do>

                                                <echo message="currently
executing: ${assembly}" />

                                                <nant
buildfile="${codeline}\utility\utility.build"
target="nunit-exec-internal" / -->

                                </do>

                </foreach>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to