NUnit XML log files - assembly name with base class in inherited methods from base class
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit Framework |
Triaged
|
Wishlist
|
Jiri Pik |
Bug Description
Imagine this object hierarchy of Test Fixtures:
BaseClass with test BaseClassTest. This is extended by Level01 with test Level01Test. This is extended with Level02 class with Level02Test etc.
When you run this with NUnit (e.g. on Teamcity), and save an XML log
<test-case name="NUnitInhe
<test-case name="NUnitInhe
<test-case name="NUnitInhe
<test-case name="NUnitInhe
<test-case name="NUnitInhe
<test-case name="NUnitInhe
As you can see, the NUnit puts into the test case name apart from the actual class also the base class of the test.
That is NUnitInheritanc
As this reference makes it rather difficult to match the class with the results from assembly traversal using reflection and as clarified with
Charlie Poole that there is no longer any need for the inclusion of the base class padding, i suggest to remove that Base class references,
i.e. in this case it would be NUnitInheritanc
Changed in nunit-3.0: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Changed in nunit-3.0: | |
assignee: | nobody → Jiri Pik (jiri-j) |
The fix is simple
=== modified file 'NUnitFramework /src/framework/ Internal/ Tests/TestMetho d.cs' src/framework/ Internal/ Tests/TestMetho d.cs 2012-09-07 04:08:58 +0000 src/framework/ Internal/ Tests/TestMetho d.cs 2012-11-05 05:16:26 +0000
this. Name = method.Name;
this. FullName += "." + this.Name;
--- NUnitFramework/
+++ NUnitFramework/
@@ -77,11 +77,6 @@
- // Disambiguate call to base class methods DeclaringType != method. ReflectedType) DeclaringType. Name + "." + method.Name; ReflectedType. FullName;
- // TODO: This should not be here - it's a presentation issue
- if( method.
- this.Name = method.
-
// Needed to give proper fullname to test in a parameterized fixture.
// Without this, the arguments to the fixture are not included.
string prefix = method.