-
Notifications
You must be signed in to change notification settings - Fork 500
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
support running a tests in batches in a single process #984
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually as long as we have some option to avoid the command line too long I am fine with either file based batching or command length based batching, which ever is best for the product.
Usage wise I am still not sure how I will use the command line option ..
This is the current call ..
'bundle exec parallel_cucumber'
" -o '--tags @regression_test -p parallel'"
' features/ --first-is-1 --group-by scenarios -n 8'
so after this fix, I should run like this?
'bundle exec parallel_cucumber'
" -o '--tags @regression_test -p parallel' --test-file-limit 100"
' features/ --first-is-1 --group-by scenarios -n 8'
yeah that would be how to use it
|
I am getting error when i run bundle update fatal: unable to access 'https://github.com/grosser/parallel_tests/': SSL certificate problem: unable to get local issuer certificate can i only update cli.rb and runner.rb and try ? will it work ? |
yeah updating these 2 should also works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in my cli.rb i see this implementation of run_tests
def run_tests(group, process_number, num_processes, options)
if group.empty?
{ stdout: '', exit_status: 0, command: nil, seed: nil }
else
@runner.run_tests(group, process_number, num_processes, options)
end
end
So I am trying it out after adding the new code as an elsif ..
def run_tests(group, process_number, num_processes, options)
if group.empty?
{ stdout: '', exit_status: 0, command: nil, seed: nil }
elsif (limit = options[:test_file_limit])
# TODO: will have some bugs with summarizing results and last process
results = group.each_slice(limit).map do |slice|
@runner.run_tests(slice, process_number, num_processes, options)
end
result = results[0]
results[1..].each do |res|
result[:stdout] = result[:stdout].to_s + res[:stdout].to_s
result[:exit_status] = [res[:exit_status], result[:exit_status]].max
# adding all files back in, not using original cmd to show what was actually run
result[:command] |= res[:command]
end
result
else
@runner.run_tests(group, process_number, num_processes, options)
end
end
and did it work ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late response. I got busy with some other tasks. Today I tested lib/parallel_tests/cli.rb changes.
There are no errors and it completed in two batches.
But I think there are less scenarios in the final report.
Also we have the following in the cucumber.yaml file:
parallel:
--format json --publish-quiet --out output/report/json_output/output_regression_<%= ENV['TEST_ENV_NUMBER'].to_s.rjust(2, '0') %>.json --format ParallelTests::Cucumber::FailuresLogger --out output/cucumber_failures.log
so after the first batch maybe the output file is getting overwritten ?
i will add a timestamp to the output file name and retry the test.
thx! |
4.8.0 |
so how can we install after this fix with normal 'gem parallel_tests' ? |
just |
No description provided.