-
Notifications
You must be signed in to change notification settings - Fork 502
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
RSpec incremental summarized output #708
Comments
I like the current simplicity of "run these commands and display their output", that seems very sturdy and won't break between different frameworks and their versions. Having an opt-in formatter that produce a more standardized output (that can later be expanded to all test frameworks) and a parser for that seems like a good enhancement though. The common format already exists with junit output https://github.com/sj26/rspec_junit_formatter + https://github.com/aespinosa/minitest-junit + https://github.com/cucumber/cucumber-ruby/blob/master/lib/cucumber/formatter/junit.rb so ideally reuse that / instruct users what gems to add and add |
It looks like we're in slightly different positions here: Discourse uses one version of one testing framework and we decide when to upgrade it, but In light of that, I definitely see the benefit of a common test suite format. Any summarizing and displaying becomes test-suite independent and it reduces the amount of test-framework specific code compared to my approach. However, for our purposes, junit xml is less than ideal because it's not incremental, but it looks like TAP-Y/J might work. There's https://github.com/rubyworks/rspec-ontap and https://github.com/rubyworks/minitap, but cucumber is missing. |
Oh yeah that looks interesting! :)
…On Thu, Jun 20, 2019 at 2:35 AM Daniel Waterworth ***@***.***> wrote:
It looks like we're in slightly different positions here:
Discourse uses one version of one testing framework and we decide when to
upgrade it, but parallel_tests supports many versions of many testing
frameworks and can't anticipate new versions.
In light of that, I definitely see the benefit of a common test suite
format. Any summarizing and displaying becomes test-suite independent and
it reduces the amount of test-framework specific code compared to my
approach.
However, for our purposes, junit xml is less than ideal because it's not
incremental, but it looks like TAP-Y/J
<https://github.com/rubyworks/tapout/wiki/TAP-Y-J-Specification> might
work. There's https://github.com/rubyworks/rspec-ontap and
https://github.com/rubyworks/minitap, but cucumber is missing.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#708?email_source=notifications&email_token=AAACYZ2IKIGZMVB76RKNDVDP3NFPBA5CNFSM4HZIIE22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYE34WA#issuecomment-503955032>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAACYZ5LLZWA2QCU37DRCGLP3NFPBANCNFSM4HZIIE2Q>
.
|
* DEV: Add a new way to run specs in parallel with better output This commit: 1. adds a new executable, `bin/interleaved_rspec` which works much like `rspec`, but runs the tests in parallel. 2. adds a rake task, `rake interleaved:spec` which runs the whole test suite. 3. makes autospec use this new wrapper by default. You can disable this by running `PARALLEL_SPEC=0 rake autospec`. It works much like the `parallel_tests` gem (and relies on it), but makes each subprocess use a machine-readable formatter and parses this output in order to provide a better overall summary. (It's called interleaved, because parallel was taken and naming is hard). * Make popen3 invocation safer * Use FileUtils instead of shelling out * DRY up reporter * Moved summary logic into Reporter * s/interleaved/turbo/g * Move Reporter into its own file * Moved run into its own class * Moved Runner into its own file * Move JsonRowsFormatter under TurboTests * Join on threads at the end * Acted on feedback from eviltrout
I would be really interested if this gets rolled into parallel_tests, very cool work |
I'm one of the developers working on Discourse and we have recently starting using
parallel_tests
. I've been tasked with making parallel rspec work more like regular rspec. We'd like to see progress as it happens and then see a single summary at the end (much like as is described in #411).The way I've chosen to go about doing this is to make each subprocess use a custom rspec formatter that produces a json object for each event (code). The main process then parses these events and does its own reporting (code). See this PR on discourse for more information.
This will work for us, but judging by some of the issues in this tracker (#411, #523, #704), there are other users of this gem that might also benefit from such changes. However, it's quite a substantial departure from the current behavior.
Would you be interested in receiving PRs that add this functionality?
The text was updated successfully, but these errors were encountered: