Trace output is disabled by default in version 2.6.2.12296

Bug #1096902 reported by Csaba Kállai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
Triaged
High
Charlie Poole
NUnit V2
Fix Released
High
Charlie Poole

Bug Description

[Issue now tracked at https://github.com/nunit/nunit-framework/issues/10]

Before we upgraded to the mentioned version both the Debug.WriteLine and the Trace.WritLine had been written out to the output in version 2.5.9. But in the new version this is disabled by default. We found that checkbox which we can enabled this with. But there is no similar option in the nunit console. We need it because it is used in out test reult logging system.

Tags: github
Revision history for this message
Charlie Poole (charlie.poole) wrote :

Let's clarify the bug first. If I understand you correctly, the problem is not that you can't get trace output, but that NUnit is not intercepting it. That is, if you use a TraceWriter, the trace output goes where you tell it, but your event listener addin never sees it. Is that right?

If so, it makes sense. NUnit-console has never done anything with trace output. Through at least 2.5.10, it would capture be captured anyway, which seemed to be a waste of effort. Somewhere in the 2.6 series of releases, we decided to set a flag that tells the runner not to capture any trace output.

If I understand your bug correctly, you want the output to be captured so that your addin can get it.

Revision history for this message
Csaba Kállai (kallai-csaba) wrote :

So I have talked to my colleagues again. It seem there were some misunderstanding. So the real problem: the event listener can not get the trace output if we use console nunit. But in the older version it works.

In case of console nunit this event is not fired:

public void TestOutput(TestOutput testOutput)

Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 1096902] Re: Trace output is disabled by default in version 2.6.2.12296

It sounds like NUnit-console should turn on the capture of trace
output, so that addins work as expected, and also display it at the
console for backward compatibility. Does that make sense for your
case?

Charlie

On Tue, Jan 8, 2013 at 3:49 AM, Csaba Kállai <email address hidden> wrote:
> So I have talked to my colleagues again. It seem there were some
> misunderstanding. So the real problem: the event listener can not get
> the trace output if we use console nunit. But in the older version it
> works.
>
> In case of console nunit this event is not fired:
>
> public void TestOutput(TestOutput testOutput)
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https://bugs.launchpad.net/bugs/1096902
>
> Title:
> Trace output is disabled by default in version 2.6.2.12296
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nunit-3.0/+bug/1096902/+subscriptions

Revision history for this message
Charlie Poole (charlie.poole) wrote :

Wait... I'm rethinking my last note. Trace output should currently
only display at the console if you have a TraceListener that sends it
there. That should still happen, even if NUnit also captures the
output.

So the desired behavior WRT trace is:

1. Any EventListener addins get to see it to use as they want.
2. Whatever TraceListeners you have set up also receive the output.
3. In the GUI, NUnit's own EventListener, displays trace output in the
TextOutput tab, if your settings call for it.

What do you think?

On Tue, Jan 8, 2013 at 8:25 AM, Charlie Poole <email address hidden> wrote:
> It sounds like NUnit-console should turn on the capture of trace
> output, so that addins work as expected, and also display it at the
> console for backward compatibility. Does that make sense for your
> case?
>
> Charlie
>
> On Tue, Jan 8, 2013 at 3:49 AM, Csaba Kállai <email address hidden> wrote:
>> So I have talked to my colleagues again. It seem there were some
>> misunderstanding. So the real problem: the event listener can not get
>> the trace output if we use console nunit. But in the older version it
>> works.
>>
>> In case of console nunit this event is not fired:
>>
>> public void TestOutput(TestOutput testOutput)
>>
>> --
>> You received this bug notification because you are subscribed to NUnit
>> Extended Testing Platform.
>> https://bugs.launchpad.net/bugs/1096902
>>
>> Title:
>> Trace output is disabled by default in version 2.6.2.12296
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/nunit-3.0/+bug/1096902/+subscriptions

Revision history for this message
Csaba Kállai (kallai-csaba) wrote :

I think it seems the correct behavior. What do you think when the release which contains it will be released?

Csaba

Changed in nunit-3.0:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Charlie Poole (charlie.poole)
Revision history for this message
Charlie Poole (charlie.poole) wrote :

Well, I just noticed you filed this against the nunit-3.0 project, which won't be in production for some time. I'll keep it for NUnit 3.0, so we don't create the same problem and also add it to the nunitv2 project, scheduling it for NUnit 2.6.3.

NUnit 2.6.3 was scheduled to be done at the end of the year, but isn't! I'll review the unfinished work and set a new date in the next few days.

Changed in nunitv2:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.6.3
Revision history for this message
Csaba Kállai (kallai-csaba) wrote :

Thank you very much!

tags: added: framework
Revision history for this message
Charlie Poole (charlie.poole) wrote :

For NUnit 2.6.3, I simply turned trace capture back on, so that eventlisteners will see it. Trace output will be displayed at the console, even if you had not set up a tracelistener for console output. For NUnit 3.0, we'll reconsider this and may adopt a more nuanced approach.

Changed in nunitv2:
status: Triaged → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
description: updated
tags: added: github
removed: framework
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.