Open devcooch opened 11 years ago
I would also like my Xunit output to use the customized description. Is your patch available somewhere?
Hi Jonathan, I'll merge my fix with latest version and try to send pull request. Though it looks like the nose developers are not really reading everything in the project.
FWIW, I've looked at this and I can't decide if this is appropriate. JUnit output typically has the classname point to the parent of the method, and then use the name field to hold the method name. It's nice to have a description, but I think giving up the name of the method is too much. There's also no wiggle room in the JUnit spec for another attribute to contain this information. I think losing the organization for the description is a net negative. Perhaps changing the name field (not classname) to something like:
methodName (Description goes here)
Thoughts?
And FWIW, I only know of myself and Jason who are working on Nose at all, and both of us have fulltime jobs. Jason has about 15 minutes a week for Nose, and I think has been more focused on Nose2 (which is coming along well, BTW). As for me, I've been pretty tied up with work too. When I start hitting 50-60 hours a week, it leaves little time for anything else. I hope you understand.
Hi John!
I am apologizing if my comment was too rude. Sure all of us are working in normal fulltime jobs, same for me. And actually I am a big fan of Nose.
Speaking about the description usage: Now I see your point, so probably I had a bit different understanding of it. What if we will just introduce support for additional function attributes instead of reusing description? So user can intentionally override xUnit plugin output? To give more details - we are using Jenkins to collect nose results and I am using nose as convenient test runner, so if I use default yield naming scheme the results are really unreadable. So what I want is to put some really understandable name for the method instead of generated one.
Please let me know what do you think and thanks for your answer!
Regards, Dmitry
No worries Dmitry, your comment wasn't rude. I just wanted to explain why you see little activity on Nose.
I'm just thinking out loud here: what happens if you do embed the description field as the name only (not the classname)? One issue I can think of would be is when using coverage support. You can't use the name field to locate the method in that case. But, that doesn't matter with generators, because you aren't currently going to get those to match now anyways (because it embeds a stringified version of the parameters). So, what if we just changed the name field and not the class name one? That would at least help keep things fairly organized when you have lots of tests, but see the description too.
BTW, I do think it's fine to reuse the description attribute. My only real concern is breaking CI tools other than just Jenkins, like QuickBuild. I'd like to enable this only with an option though. Maybe --xunit-use-desc
?
We have a similar issue, but if we could change the name-attribute to the name of the yielded function that would be a better description of the actual test case. We have test generators that yield several different functions but use the same input for the tests.
Hi - can you kindly let me know if there's any update on this requirement? This will be useful for me too.
Hello,
When we are using generators for test generation, xUnit plugin doesn't consider "description" attribute of yielded function. Please see example:
I will be happy to provide patch, I already have it. I run unit tests on py27 and py32, looks like nothing broken. I haven't managed to run other tests as I don't succeeded to configure proper environment for that.
Regards, Dmitry