Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#5 Empty Report

open
nobody
None
5
2010-08-10
2010-08-10
Anonymous
No

Hi everybody,
I am using PartCover 4.0 (Release 4.0.10801) with Nunit 2.5.7 (on Win Xp 32 Sp3) .
I am running the whole thing inside NAnt 0.90:

<project ...>
...
<target name="coverage" depends="compile-framework-test, copy-dlls-test">
<exec program="${partcover}\partcover.exe" failonerror="false">
<arg value="--target &quot;${nunit-dir}/bin/net-2.0/nunit-console.exe&quot;" />
<arg value="--target-work-dir &quot;${test.dir}&quot;"/>
<arg value="--target-args &quot;${basename}-test.dll /fixture:De.Mathema.EntityFramework4.Configuration.SimpleIntegrationTest&quot;" />
<arg value="--include &quot;[${basename}.*]De.Test&quot;" />
<arg value="--exclude &quot;[nunit*]*&quot;" />
<arg value="--output &quot;partcover-results.xml&quot;" />
</exec>
</target>

The console gives me the following :
[exec] open driver pipe
[exec] modify target environment variables
[exec] create target process
[exec] wait for driver connection
[exec] [00000] [04148] Options dump:
[exec] [00000] [04148] VerboseLevel: -842150451
[exec] [00000] [04148] Log file: C:\dev\dotNet\project\a4e\EF_Attributes\projects\partcover.driver.log
[exec] [00000] [04148] Log pipe: yes
[exec] [00000] [04148] Count Coverage - ON
[exec] [00000] [04148] Count Call Tree - OFF
[exec] [00000] [04148] Exclude [nunit*]*
[exec] [00015] [04148] Exclude [mscorlib]*
[exec] [00015] [04148] Exclude [System*]*
[exec] [00015] [04148] Include [Attributes4Entities.*]De.Mathema.EntityFramework4.Configuration
[exec] ProcessModel: Default DomainUsage: Single
[exec] Execution Runtime: Default
[exec] [00000] [06040] Options dump:
[exec] [00000] [06040] VerboseLevel: -842150451
[exec] [00000] [06040] Log file: C:\dev\dotNet\project\a4e\EF_Attributes\projects\partcover.driver.log
[exec] [00000] [06040] Log pipe: yes
[exec] [00000] [06040] Count Coverage - ON
[exec] [00000] [06040] Count Call Tree - OFF
[exec] [00000] [06040] Exclude [nunit*]*
[exec] [00000] [06040] Exclude [mscorlib]*
[exec] [00015] [06040] Exclude [System*]*

(Somehow the trace is repeated a second time, with a different process id or what ever the 04148 and 06040 are)

And after the test ist run I get the following trace:
[exec] [24109] [01720] CorProfiler is turned off
[exec] [21625] [04640] CorProfiler is turned off
[exec] Target PageFaultCount: 5991
[exec] Target PagefileUsage: 19668992
[exec] Target PeakPagefileUsage: 25681920
[exec] Target PeakWorkingSetSize: 23793664
[exec] Target QuotaNonPagedPoolUsage: 37716
[exec] Target QuotaPagedPoolUsage: 170604
[exec] Target QuotaPeakNonPagedPoolUsage: 39348
[exec] Target QuotaPeakPagedPoolUsage: 174508
[exec] Target WorkingSetSize: 23793664
[exec] Target PageFaultCount: 5991
[exec] Target PagefileUsage: 19668992
[exec] Target PeakPagefileUsage: 25681920
[exec] Target PeakWorkingSetSize: 23793664
[exec] Target QuotaNonPagedPoolUsage: 37716
[exec] Target QuotaPagedPoolUsage: 170604
[exec] Target QuotaPeakNonPagedPoolUsage: 39348
[exec] Target QuotaPeakPagedPoolUsage: 174508
[exec] Target WorkingSetSize: 23793664
[exec] Total 0 bytesTotal 0 bytes

Once again the trace is somewhat doubled but also slightly different.
The generated XML file only contains a singular line.

Do you have any idea what I have done wrong?

Addionally, I have a question, if it is possible to run partcover for a whole test suite in one "shot", or do I have to iterated over each Testclass calling partcover as shown above.

Thank you very much!

Thomas

Discussion

  • Thomas Haug
    Thomas Haug
    2010-08-10

    Sorry this is not a patch but a bug/question

     
  • Shaun Wilde
    Shaun Wilde
    2010-08-10

    I haven't seen this myself however...

    What happens if you run the command outside of nant?

    Does your test do anything unusual that may cause a 2nd process to start?

     
  • Thomas Haug
    Thomas Haug
    2010-08-10

    Hi Shaun,

    thank you for your quick response. Yes you gave me the right clue.
    The same thing happens if I run it on cmd line, but I investigated a little bit and discovered (it was more a suspicion) that nunit is spawning a new process, because if I omit '/nologo' I see between the two Option dumps of partcover the infos about Nunit.

    To verify my suspicion I read the documentation of Nunit (once again) and found the following explanantion (http://nunit.org/index.php?p=consoleCommandLine&r=2.5.7):
    "Prior to version 2.5, it was necessary to run the console program itself using the CLR version under which you wanted to run tests. This was done either by editing the nunit-console.exe.config file or by setting the COMPLUS_Version environment variable before running the program.

    Under NUnit 2.5 and later versions, you may still use either of these approaches, but a simpler method is available.

    The /framework option allows you to specify the version of the runtime to be used in executing tests. If that version specified is different from the one being used by NUnit, the tests are run in a separate process. "

    Ok, here we are. Just to see what is happening I added the argument '/process=Single' argument to the nunit args. That caused the Nunit/coverage run to stop because Nunit is started with .net 2.0 but my libs require 4.0.

    I will try to get Nunit running on 4.0 and will let you know about the results as soon as possible.

    Thanks,
    Thomas