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

Improving the xunit reporting from freshen #35

Merged
merged 9 commits into from
Sep 28, 2011
Merged

Conversation

dexterous
Copy link
Contributor

We've been using freshen-0.2 to write our first suite of acceptance tests for the last three months at work and are finding it to be very helpful.

The one piece missing, however, was that once we hooked our tests up to a CI server and enabled --with-xunit, the xunit output wasn't very helpful. All the features.scenarios were reported as FreshenTestCase.runTest.

So, I took it upon myself to add in the support to have feature and scenario names mapped to test class and method names appropriately so that when the CI server reports a failure/error, we know exactly where to look.

This pull request is essentially comprised of 4 chunks of changes, viz:

Hope you find these changes good enough to pull in. We plan to invest in freshen for the foreseeable future and would love to see it grow.

currently it just invokes nosetests with xunit plugin and tests from presence
of report as valid xml document. feature to be enhanced to test that xunit
report contains feature and scenario names as test class and method names
instead of just FreshenTestCase and runTest.
… cases;

ensure that test case names reflect feature names.
… cases;

ensure that test method names reflect scenario names.
covers pass, fail and undefined cases
now we can run all tests with a single command like so:

    nosetests --with-freshen tests/
@dexterous
Copy link
Contributor Author

Not sure if @Jerico-Dev gets notified of these automatically, hence putting in a quick mention.

@ghost
Copy link

ghost commented Sep 23, 2011

Hi dexterous! Yes, I'm getting (and reading) these messages. I'd rather prefer rlisagor to pull, though, as he's the main author of the project. Thanks for your contribution, btw. Sounds like a very useful change, not only for those who use CI but also for better output in PyDev and other tools that have test integration.

@dexterous
Copy link
Contributor Author

Heh, although that's not what I started out with! :P

I noticed @rlisagor's reply on #14 later; but reasoned that subclassing would help other tools that introspect, much like you did. PyDev should definitely benefit from this as well as, I guess, other plugins like cover and prof.

I'm glad you liked the change and hope we can pull it in soon. I've deployed the latest code from my repo onto our CI server for now, but would love to go back to pulling the package from pypi.

@dexterous
Copy link
Contributor Author

Just in case you noticed something weird- I transferred ownership of my original fork to the github organization we created for our work repos and then forked from there. That's why the source of the changes is now Vayana@master and not dexterous@master, even though they both point to the same tree.

@rlisagor rlisagor merged commit f96c13e into rlisagor:master Sep 28, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants