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

Cricket should support testing on tox #42

Open
hawkowl opened this issue Mar 10, 2016 · 2 comments
Open

Cricket should support testing on tox #42

hawkowl opened this issue Mar 10, 2016 · 2 comments

Comments

@hawkowl
Copy link
Member

hawkowl commented Mar 10, 2016

tox is heavily used in many major projects for the ease of testing multiple Python configurations, versions of packages, and the like. Cricket should support using tox, because then it's usefulness is amplified in projects that use tox, as it can put a nice face on running lots of different tests on different tox envs from one spot.

Things that need to be taken into consideration:

  • Test discovery will have to be per-environment. Test suites do not stay the same on 2.6, 2.7, 3.3, etc, especially in the case of Twisted. We have entire test files that are not on 3.3, some test classes are deleted because they can't be run, and therefore won't show up on test discovery for all platforms. We also generate some test classes depending on what reactors are available, and not all Pythons have the same reactors available. Therefore, during startup, a "discovery" run will have to happen, possibly in a env called something like "py27-tests-discovery" for the "py27-tests" env, which just executes the test runner in a "dry run" configuration (-n for Twisted Trial).
  • Cricket can't just access the raw unittest results -- it'll have to use something like subunit, which is a machine-readable streaming output format. Trial has built-in support for subunit, and there is a py.test plugin available for it. So, cricket will have to understand this subunit output, but that shouldn't be too difficult.
  • Cricket will have to execute tox itself, and have some way of knowing when the tests start and what's tox's output. Tox has --result-json but I have no idea if it is streaming (unlikely). Running tests in parallel environments may be desirable, but it may also not be.
@freakboy3742
Copy link
Member

Integrating with Tox definitely seems like a good idea to me. It will probably require some UI changes, but they shouldn't be too dramatic.

More generally, I wasn't aware of subunit and it's protocol - from what you describe, that sounds like a much better option than my current bespoke protocol.

@Christena421
Copy link

I will try this , then i can think cricket support texting on tox.

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

No branches or pull requests

3 participants