question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] Extend <start-run> data for ITestEventListener

See original GitHub issue

Hello, This is not a bug but a feature request to improve this extension: https://github.com/nunit/docs/wiki/Event-Listeners.

At the moment I think we don’t have enough information about the tests when run is started. Consider the following example:


[Extension(Description = "My NUnit Extension")]
public class MyEventListener : ITestEventListener
{
     public void OnTestEvent(string report)
     {
         var xmlNode = XmlHelper.CreateXmlNode(report);

         switch (xmlNode.Name)
         {
             case "start-run":
             {
                 //Some custom logic here...
                 break;
             }

At the moment the only data I’m getting here is the string <start-run count='0'/> But it whould be nice to get some information like test run start DateTime, the command which is used to run the tests, engine version, clr version.

The use case for this change is simple: this data can be used for creating custom real-time test run reports based on ITestEventListener extension point.

I did a small investigation and it looks like the change should be quite simple, we could extend RunTests method here (@CharliePoole, please correct me if I’m wrong)

If you agree this is a useful feature I can prepare pull request with possible code changes, but first we may need to choose the data to be available in <start-run> section.

Thank you

Regards, Evgeniy

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mikkelbucommented, May 25, 2019

#629 did not auto-close this issue, as “Resolving” is not one of the recognised keywords.

0reactions
elv1s42commented, May 21, 2019

Hi @ChrisMaddock,

I’ve implemented the changes here

Thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Console and Engine Release Notes
The nunit3-console.exe runner executes under the .NET Framework but is able to launch .NET Core agents and communicate with them over a TCP...
Read more >
c# - NUnit 3 test listeners
The NUnit Test Engine supports extensions at various points. One such extension is a TestEventListener, which receives events from the engine.
Read more >
Chocolatey Software | NUnit 3 Console Runner 3.12.0
This package includes the nunit3-console runner and test engine for version 3 of the NUnit unit-testing framework. Files. Show tools\NOTICES.txt.
Read more >
Rat (Release Audit Tool) results - Apache log4net
... 617 Consider expanding projects before building ITestRunner structure; * 625 [Feature] Extend <start-run> data for ITestEventListener; * 628 [Question] ...
Read more >
NUnit.Engine.Runners.AbstractTestRunner Class Reference
The tests are run asynchronously and the listener interface is notified as it progresses. More... void, StartRun (ITestEventListener listener, TestFilter filter).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found