| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the machine (#34735)
* Add option to set parallel test worker count to the physical core count of the machine
Also, use the physical core count of the machine as
the default number of workers, and generate the `test_helper.rb` file
with `parallelize(workers: :number_of_processors)`
Closes #34734
* Ensure that we always test parallel testing
Since #34734 we decided to use the physical core count of the machine as
the default number of workers in the parallel testing, we need to
ensure that some tests use at least 2 workers because we could
run those tests on VM that has only 1 physical core.
It also fixes tests failures on the CI since Travis server we are using
has only one physical core.
See https://travis-ci.org/rails/rails/jobs/469281088#L2352
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
| |
- Fix formatting
- Don't repeat "Active Record automatically handles creating and migrating a new
database for each worker to use."
- Tell that AR loads the schema to a database for each process(Related to #33479)
- Clarify that `parallelize_teardown` is executed for each process
|
| |
|
| |
|
|
|
|
|
|
| |
Since `assigns` is not placed by default with Rails, we suggested to
test if the right information was displayed instead of suggesting to
test if the right object was stored in the template.
|
| |
|
|
|
|
|
|
|
|
|
| |
This has been around as far back as I can
[see](https://github.com/rails/rails/blob/5137d03cc5b2a5f0820bdcf11b0fffe5bf461470/guides/source/testing.md).
No need to specify the obvious.
[ci skip]
|
|\
| |
| |
| |
| | |
albertoalmagro/albertoalmagro/prefer-rails-command-over-bin-rails
Prefer rails command over bin/rails
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As discussed in #33203 rails command already looks for, and runs,
bin/rails if it is present.
We were mixing recommendations within guides and USAGE guidelines,
in some files we recommended using rails, in others bin/rails and
in some cases we even had both options mixed together.
|
|/
|
|
|
| |
http links will be redirected to the https version, but still better to
just directly link to the https version.
|
| |
|
|
|
|
|
|
|
| |
[ci skip] A regular expression was used to find a lot of missing Oxford
commas and add them. The regular expression was as follows.
", ([a-zA-Z0-9.\`:'\"]+ ){1,6}(or|and) "
|
| |
|
| |
|
|
|
|
|
| |
* Results of command in testing guides are different from actual ones.
* Updated them.
|
|\
| |
| | |
guides/testing: Pluralize controller and helper class names.
|
| |
| |
| |
| |
| |
| | |
The Rails convention for controllers and helpers is plural, except where
intentionally singular. Pluralize the controller and helper class names,
to match convention.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provides both a forked process and threaded parallelization options. To
use add `parallelize` to your test suite.
Takes a `workers` argument that controls how many times the process
is forked. For each process a new database will be created suffixed
with the worker number; test-database-0 and test-database-1
respectively.
If `ENV["PARALLEL_WORKERS"]` is set the workers argument will be ignored
and the environment variable will be used instead. This is useful for CI
environments, or other environments where you may need more workers than
you do for local testing.
If the number of workers is set to `1` or fewer, the tests will not be
parallelized.
The default parallelization method is to fork processes. If you'd like to
use threads instead you can pass `with: :threads` to the `parallelize`
method. Note the threaded parallelization does not create multiple
database and will not work with system tests at this time.
parallelize(workers: 2, with: :threads)
The threaded parallelization uses Minitest's parallel exector directly.
The processes paralleliztion uses a Ruby Drb server.
For parallelization via threads a setup hook and cleanup hook are
provided.
```
class ActiveSupport::TestCase
parallelize_setup do |worker|
# setup databases
end
parallelize_teardown do |worker|
# cleanup database
end
parallelize(workers: 2)
end
```
[Eileen M. Uchitelle, Aaron Patterson]
|
|\
| |
| | |
Example of multiple configurations for system test in guide [ci skip]
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Make it same title in index and page [ci skip]
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| | |
I found `assert_in_epsilon` is not be in "2.4 Available Assertions".
So I Added them.
MiniTest::Assertions#assert_in_epsilon:
https://github.com/seattlerb/minitest/blob/master/lib/minitest/assertions.rb#L204-L210
|
| | |
|
| |
| |
| |
| | |
ActionDispatch::SystemTestCase
|
|/ |
|
|\
| |
| | |
Fix indentation [ci skip]
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
basis that if it was simple, the user wouldn't be reading the docs
|
| |
|
|\
| |
| | |
some typos and rephrasing in system test guide [ci skip]
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
drivers.
When using `driver_by` with capybara-webkit or poltergeist,
SystemTesting::Driver will register the driver while passing
`screen_size` and `options` parameteres.
`options` could contain any option supported by the underlying driver.
|
| | |
|
|/
|
|
|
| |
This lists the `assert_changes` and `assert_no_changes` methods in the
guides. [ci skip]
|
|
|
|
|
|
|
|
| |
Previously this implied that system tests provided other non-headless
drivers when Selenium is the only driver that uses `:using`,
`:screen_size` or `:options` arguments.
This change clarifies that Selenium is the only non-headless driver.
|
|
|
|
|
|
|
|
| |
It's more likely you'll generate a test for testing users than a users
creates test. This is a better example of a real world test.
Additionally the users create view is unlikely to have the text
"UserCreates" since that is likely generated as well. This is now an
example of visiting the users index.
|
|
|
|
|
| |
Update guide to clarify that mailer fixtures are not created when
using the mailer generator.
|
|
|
|
| |
The `assert_nothing_raised` was moved to `ActiveSupport::Testing::Assertions` in 3cece0b6574c496605df055a2ebf77177f5b6e7f.
|
| |
|
|\ |
|