dotCover 1.1 eap and arguments

Hi everybody,

I was playing with dotcover lately and in my build process I need to refer to relative paths, so I switched to latest eap (1.1.227.11) as suggested by this thread in youtrack http://youtrack.jetbrains.net/issue/DCVR-2401 and my configuration file look like this:

<CoverageParams>
  <Executable>.\lib\xunit\xunit.console.clr4.x86.exe</Executable>
  <Arguments>MyProject.Tests.dll</Arguments>
  <WorkingDir>.\build</WorkingDir>
  <Output>coverage.xml</Output>
</CoverageParams>



As you see I'm using the xunit console runner and xunit tests, if I change to absolute path in dotcover 1.0.120.2 it works (of course, with absolute paths), but for some reasons dotcover eap is not passing my arguments to the xunit runner and I'm getting this error output:


PS C:\src\myproject> dotcover c .\dotcover.xml
JetBrains dotCover Console Runner v1.1.227.11. Copyright (c) 2009-2011 JetBrains s.r.o. All rights reserved.


Coverage session started [3/04/2011 4:14:24 PM]
xUnit.net console test runner (32-bit .NET 4.0.30319.225)
Copyright (C) 2007-10 Microsoft Corporation.


error: file not found: C:\src\myproject\build
Coverage session finished [3/04/2011 4:14:31 PM]
Analysed application exited with code '-1'.


As you see we are passing the working directory, but not the arguments (in this case the test assembly). I've tryied without the WorkingDir and still the same, the arguments are not passed to the xunit console runner

What am I doing wrong?

0
3 comments

Hi Cristian,

As I mentioned per Twitter, relative paths should work and arguments should be passed. Where is the coverage file located? Where is the Test output located?

0
Avatar
Permanently deleted user

Hi Hadi,

As I answered in Twitter, yes, that is the reason because I moved from dotcover 1.0 to the eap version, to support relative paths. My layout is as following:

+ root
| - dotcover.xml
| - lib\xunit\xunit.console.clr4.x86.exe
| - build\MyProject.Tests.dll
| - output.xml

As you see, the relative paths for the runner works as expected (that's the reason because in the output we can see the xunit console runner output, so dotcover is executing the test runner as expected) the problem is with the argument parameter, if I change the dotcover.xml configuration file to something like this:

echo *** argument 1 is %1 ***
.\lib\xunit\xunit.console.clr4.x86.exe %1


And change my dotcover file to this:

<CoverageParams>
  <Executable>xunit.bat</Executable>
  <Arguments>.\build\MyProject.Tests.dll</Arguments>
  <Output>coverage.xml</Output>
</CoverageParams>

As expected for this bug, the argument is not passed to the batch file.

am I missing something? what's wrong? something hidden to configure? I tested this with the eap 1.1.200.1585, the same problem appears.

Should I fill a bug report for this?

0

Cristian,

That should work. Could you please log it? We'll try and reproduce it here too....

Thanks.

0

Please sign in to leave a comment.