extentreports-dotnet-cli icon indicating copy to clipboard operation
extentreports-dotnet-cli copied to clipboard

Feature/fix categories parsing

Open AFAde opened this issue 5 years ago • 6 comments

AFAde avatar Mar 18 '19 15:03 AFAde

@AFAde

Which NUnit version contains this element?

anshooarora avatar Mar 23 '19 20:03 anshooarora

Categories are output as property name-value pairs as of NUnit 3. e.g. <property name="Category" value="SuperFancyCategoryName" />

See: https://nunit.org/files/testresult_30.txt

Probably should change this add support for the version 3 XML schema rather than overwriting support for version 2

dsparkplug avatar Mar 24 '19 22:03 dsparkplug

Categories are output as property name-value pairs as of NUnit 3. e.g. <property name="Category" value="SuperFancyCategoryName" />

See: https://nunit.org/files/testresult_30.txt

Probably should change this add support for the version 3 XML schema rather than overwriting support for version 2

Yes, that's right, that's how categories are handled in the version 3. Having a new dedicated parser for version 3 is definitely a good idea.

AFAde avatar Mar 25 '19 08:03 AFAde

Having a new dedicated parser for version 3 is definitely a good idea.

Maybe. But for now, I would suggest editing the pull request to include both the if (parser(elem, "categories").Any()) and if (parser(elem, "properties").Any()) sections of the code so that this parser works with results from all versions of NUnit.

dsparkplug avatar Mar 25 '19 11:03 dsparkplug

Having a new dedicated parser for version 3 is definitely a good idea.

Maybe. But for now, I would suggest editing the pull request to include both the if (parser(elem, "categories").Any()) and if (parser(elem, "properties").Any()) sections of the code so that this parser works with results from all versions of NUnit.

Speaking in terms of clean code, I am not sure whether that's a good solution; it will fix the issue but it will introduce a kind of code smell, if you ask me. If you want to keep it simple, I would rather give up the compatibility with NUnit 2, which is no longer maintained. But I leave the final decision to you.

AFAde avatar Mar 25 '19 12:03 AFAde

Are there any updates on this?

esrahofstede avatar Jul 11 '20 19:07 esrahofstede