| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
* 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.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
Small change to improve the readability in section 2.3 of the testing
guide.
|
| |
| |
| |
| | |
That option was removed in 0a683085b1db435b7371350b2799a0f248cd717a
|
|/
|
|
|
|
|
|
|
|
| |
These tests may be expansive so let's only allow users to run them
through `bin/rails test:system` or by passing a path to the `test`
command.
The same applies for `bin/rake test`.
Refs #28109.
|
|
|
|
|
|
| |
Since test suffix is automatically granted, it is not necessary to
specify it in generator.
Also, updated the generated file to contents actually generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current Basic Test Case example has the following assertion
```
assert_equal read_fixture('invite').join, email.body.to_s
```
email.body.to_s returns an empty string if both HTML and text templates
exist for a given mailer. This commit adds a note to section 11.2.2
explaining this and also suggests using email.text_part.body.to_s
and email.html_part.body.to_s as alternatives.
|
| |
|
|
|
|
| |
As the specified command is `rails g system_test articles`, the generated class name
is `ArticlesTest`, not `UsersTest`
|
| |
|
| |
|
|
|
|
|
| |
There were some grammar issues and incorrect information in the system
tests documentation.
|
|
|
|
|
|
| |
This renames the system test helper file to be application system test
case to match what the rest of Rails does. In the future we should
consider changing the test_helper to match.
|
|
|
|
|
|
|
|
|
|
| |
* Move system tests back into Action Pack
* Rename `ActionSystemTest` to `ActionDispatch::SystemTestCase`
* Remove private base module and only make file for public
`SystemTestCase` class, name private module `SystemTesting`
* Rename `ActionSystemTestCase` to `ApplicationSystemTestCase`
* Update corresponding documentation and guides
* Delete old `ActionSystemTest` files
|