[Feature] Extend <start-run> data for ITestEventListener
See original GitHub issueHello, 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:
- Created 4 years ago
- Comments:7 (7 by maintainers)
#629 did not auto-close this issue, as “Resolving” is not one of the recognised keywords.
Hi @ChrisMaddock,
I’ve implemented the changes here
Thank you