Tried Googling through this group as well as the rest of WWW, and I
have not been able to find an answer. :(
I am running NUnit 2.4.8 console under Windows (several of them). I
have an xslt that I pass to NUnit with /transform: that produces the
exact output that I want. How do I capture ONLY the results of this
transform and none of the NUnit fluff? I tried using /nologo and shell
redirect, but that still dumps things like "Excluded categories" along
with the line of dots and letters of the test results. Using /out:
and /err: got me nowhere - produced just empty files.
In the end, what I want to end up with is a file of only failing
tests, or a zero-sized file if no failures. I subsequently test for
the size of this file, and if it is not zero (or at least something
_predictable_) then mail it out.
TIA for any help.
> I am running NUnit 2.4.8 console under Windows (several of
> them). I have an xslt that I pass to NUnit with /transform:
> that produces the exact output that I want. How do I capture
> ONLY the results of this transform and none of the NUnit
> fluff? I tried using /nologo and shell redirect, but that
> still dumps things like "Excluded categories" along with the
> line of dots and letters of the test results. Using /out:
> and /err: got me nowhere - produced just empty files.
>
> In the end, what I want to end up with is a file of only
> failing tests, or a zero-sized file if no failures. I
> subsequently test for the size of this file, and if it is not
> zero (or at least something
> _predictable_) then mail it out.
>
> TIA for any help.
That's why the transform feature was dropped in NUnit 2.5 - it
was designed to allow you to tailor the console output for
display purposes rather than post-processing.
Best way to deal with this is to run your transform on the
TestResult.xml file separately, after NUnit runs.
If that approach won't work in your situation, you should try
running with /nonlogo /nodots and use shell redirect for
stdout (but not stderr) to create a file. If your tests
write to stdout, then redirect that output to another
file or to the null device using /output.
Charlie
> --
>
> You received this message because you are subscribed to the
> Google Groups "NUnit-Discuss" group.
> To post to this group, send email to nunit-...@googlegroups.com.
> To unsubscribe from this group, send email to
> nunit-discus...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/nunit-discuss?hl=en.
>
>
>
That is what we thought.
> Best way to deal with this is to run your transform on the
> TestResult.xml file separately, after NUnit runs.
I have this now, I just thought there might be a better way of doing
it.
> If that approach won't work in your situation, you should try
> running with /nonlogo /nodots and use shell redirect for
> stdout (but not stderr) to create a file. If your tests
> write to stdout, then redirect that output to another
> file or to the null device using /output.
I will have a look at this, but I suspect the best solution for me
will be, as you suggested, to separately post-process it.
Thanx! Mark.
I was using the /transform option to produce output recognized by
VisualStudio as part of the build. Take a look here:
http://padcom13.blogspot.com/2008/12/running-unit-tests-during-builds-in_28.html
That had allowed me to run unit tests as part of the build thus making
the build process sensitive to the actual domain I was working on.
I'd like to know if there's a way to achieve the same result without
having direct support from nunit-console.
Best regards,
Matthias.
On Dec 19 2009, 8:34 pm, SiKing <mark.le...@gmail.com> wrote:
> On Dec 18, 12:35 am, "Charlie Poole" <char...@nunit.com> wrote:
>
> > That's why thetransformfeature was dropped in NUnit 2.5 - it
> > was designed to allow you to tailor the console output for
> > display purposes rather than post-processing.
>
> That is what we thought.
>
> > Best way to deal with this is to run yourtransformon the
Charlie