Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xunit XML output has the same name for all tests #14

Open
jacek99 opened this issue Nov 26, 2010 · 5 comments
Open

xunit XML output has the same name for all tests #14

jacek99 opened this issue Nov 26, 2010 · 5 comments
Labels
Milestone

Comments

@jacek99
Copy link

jacek99 commented Nov 26, 2010

When you run a Freshen note test with the --with-xunit option, the generated XML file has "runTest" as the name for all entries. It would be great if the "name" attribute would reflect the actual title that is being displayed in the console.

@jacek99
Copy link
Author

jacek99 commented Nov 26, 2010

Here's a sample

File "/usr/local/lib/python2.6/dist-packages/freshen-0.2-py2.6.egg/freshen/noseplugin.py", line 70, in runTest
self.step_runner.run_step(step)
File "/usr/local/lib/python2.6/dist-packages/freshen-0.2-py2.6.egg/freshen/core.py", line 33, in run_step
return step_impl.run(step.arg, _args)
File "/usr/local/lib/python2.6/dist-packages/freshen-0.2-py2.6.egg/freshen/stepregistry.py", line 39, in run
self.func(_args, **kwargs)
File "/home/jacekf/src/Maven-Python-Mojos/maven-python-mojos/maven-bdd-plugin/src/test/python/features/db/steps.py", line 19, in and_those_who_werent
raise Exception("TEST")
Exception: TEST

in "those that weren't:" # features/db/db.feature:18
]]>

@jacek99
Copy link
Author

jacek99 commented Nov 26, 2010

Oops, sorry I closed this one by mistake...how do you re-open it?

@rlisagor rlisagor reopened this Jun 12, 2011
@lroszak
Copy link

lroszak commented Sep 2, 2011

Please consider adding to FreshenTestCase method:

def id(self):
    return "%s.%s"%(self.feature.name, self.scenario.name)

This is later on used in xunit xml's giving you a nice output

@dexterous
Copy link
Contributor

I've put in an alternative solution in #35. By creating sub-classes with feature names having scenario names as test methods, any other plugins introspecting test classes will get a consistent view.

@dexterous
Copy link
Contributor

I think we can close this now that we have merged #35; or do we want to wait for the release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants