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

Django test runner reporting plugin #693

Closed
atodorov opened this issue Jan 6, 2019 · 7 comments
Closed

Django test runner reporting plugin #693

atodorov opened this issue Jan 6, 2019 · 7 comments

Comments

@atodorov
Copy link
Member

@atodorov atodorov commented Jan 6, 2019

Kiwi TCMS needs a customized test runner for Django based projects. This runner will execute the Django test suite as normal and then report the results into Kiwi TCMS database via our API.

Getting started docs

How Django test discovery & execution works
The test runner can be controlled with the TEST_RUNNER setting, which by default points to
django.test.runner.DiscoverRunner class.

./manage.py test will initialize the test runner class and execute .run_tests() method which does the heavy lifting of setting up the test environment and executing the test suite. At the end it calls .suite_result() with the results.

.suite_result() and possibly .run_tests() look like possible methods to override and perform the reporting of results to Kiwi TCMS. For inspiration see https://github.com/kiwitcms/tap-plugin and https://github.com/kiwitcms/junit.xml-plugin

Definition of done

  • a class called tcms_django_plugin.TestRunner which inherits from DiscoverRunner and overrides methods to compile information of what has been tested and what the results were
  • then feed that information to an instance of tcms_api.plugin_helpers.Backend which encapsulates the communication and behavior logic around the TCMS DB, see referenced plugins above
  • ^^^ work is created in a separate repository
  • README.rst contains information about installatin & configuration (see plugin references above)
  • repository contains setup.py file similar to references above
  • repository contains tests - a nice candidate is to have a sample django project in the same repository which could be used as a driver, see https://github.com/kiwitcms/tenants/tree/master/test_project
  • repository uses GPLv3 license
  • code review & issues reported from Kiwi TCMS maintainers have been resolved
  • repository has been transferred under https://github.com/kiwitcms organization

Note: comment on this issue with a link to your repository as soon as you have something working!

This issue is part of Kiwi TCMS open source bounty program. For more information see the link(s) in bounty-program milestone

@atodorov atodorov added this to the test-automation-plugins milestone Jan 17, 2020
@atodorov atodorov changed the title RFC: Django test runner reporting plugin Django test runner reporting plugin Mar 29, 2020
@brymut
Copy link
Contributor

@brymut brymut commented May 21, 2020

May I please get assigned this?

@atodorov
Copy link
Member Author

@atodorov atodorov commented May 21, 2020

May I please get assigned this?

Go ahead please. As soon as you have something ready for review please post a link to your repository here and I will review it.

@atodorov
Copy link
Member Author

@atodorov atodorov commented May 21, 2020

@brymut I see in your profile that you are from Kenya. You may also help us with the Swahili translation if you want, see issues.

@brymut
Copy link
Contributor

@brymut brymut commented May 21, 2020

I’ll look into those too, no problem

@brymut
Copy link
Contributor

@brymut brymut commented Jun 2, 2020

Hi again @atodorov, took longer than expected but I think I've got something can be looked at for some initial feedback on tcms-django-plugin.

Still working on adding to testing, the README and compatibility with subtests later on today, however, any feedback would be appreciated on the current progress if you've got some time to spare.

Also working on the translations today too.

@atodorov
Copy link
Member Author

@atodorov atodorov commented Jun 3, 2020

I will review & comment/open issues directly at https://github.com/brymut/tcms-django-plugin

@atodorov
Copy link
Member Author

@atodorov atodorov commented Jun 25, 2020

@brymut I have released the plugin on PyPI https://pypi.org/project/kiwitcms-django-plugin/ and I consider it ready for consumption.

In order to close this PR and claim the bounty please update the relevant documentation section and close this issue via commit log message.

brymut added a commit to brymut/Kiwi that referenced this issue Jun 26, 2020
brymut added a commit to brymut/Kiwi that referenced this issue Jun 26, 2020
brymut added a commit to brymut/Kiwi that referenced this issue Jun 26, 2020
atodorov added a commit that referenced this issue Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants