aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/testing.md
Commit message (Collapse)AuthorAgeFilesLines
* Fix testing guide typoJon Evans2018-06-011-1/+1
|
* Added a lot of Oxford commasAnthony Crumley2018-05-101-2/+2
| | | | | | | [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) "
* Fix url_helper examples in testing guide [ci skip]Chris Houhoulis2018-04-291-4/+4
|
* [ci skip] Fix typo in testing.mdPradyumna Shembekar2018-04-271-1/+1
|
* Update results of command in Testing guides [ci skip]Yoshiyuki Hirano2018-04-231-13/+14
| | | | | * Results of command in testing guides are different from actual ones. * Updated them.
* Merge pull request #32575 from ybakos/guides/testing/pluralize_class_namesRafael França2018-04-191-3/+3
|\ | | | | guides/testing: Pluralize controller and helper class names.
| * guides/testing: Pluralize controller and helper class names.Yong Bakos2018-04-141-3/+3
| | | | | | | | | | | | The Rails convention for controllers and helpers is plural, except where intentionally singular. Pluralize the controller and helper class names, to match convention.
* | [ci skip] Fix minor system testing documentation typo.Stephen2018-04-181-1/+1
|/
* Merge descriptions related to parallel test into one section [ci skip]yuuji.yaginuma2018-02-171-2/+2
|
* Add test parallelization to Railseileencodes2018-02-151-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* Merge pull request #31240 from PHedkvist/sys_test_mobile_guideEileen M. Uchitelle2018-02-061-0/+28
|\ | | | | Example of multiple configurations for system test in guide [ci skip]
| * Example of mobile configuration for system test in guide [ci skip]Pierre Hedkvist2017-12-041-0/+28
| |
* | Fix doc typo [ci-skip]Tom Copeland2018-01-121-1/+1
| |
* | Fix "the the " [ci skip]Ryuta Kamizono2018-01-101-1/+1
| |
* | Merge pull request #30474 from yhirano55/make_it_same_title_in_index_and_pageEileen M. Uchitelle2017-12-131-2/+2
|\ \ | | | | | | Make it same title in index and page [ci skip]
| * | Make it same title in index and page [ci skip]Yoshiyuki Hirano2017-08-311-2/+2
| | |
* | | Add headless firefox driver to System Testsbogdanvlviv2017-12-071-1/+2
| | |
* | | Add `assert_in_epsilon` to Testing guide [ci skip]Yoshiyuki Hirano2017-12-061-0/+2
| |/ |/| | | | | | | | | | | | | | | 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
* | Cosmetic changes [ci skip]Yauheni Dakuka2017-11-301-1/+1
| |
* | [ci skip] Added example for using headless_chrome with ↵Pierre Hedkvist2017-11-181-0/+10
| | | | | | | | ActionDispatch::SystemTestCase
* | [ci skip] Fix typo.Conrad Beach2017-09-281-1/+1
|/
* Merge pull request #30394 from ydakuka/fixing-indentationRyuta Kamizono2017-08-241-1/+1
|\ | | | | Fix indentation [ci skip]
| * Fix indentation [ci skip]Yauheni Dakuka2017-08-241-1/+1
| |
* | Use https instead of http in guide [ci skip]Yoshiyuki Hirano2017-08-231-2/+2
|/
* Fix testing guide [skip ci]Yoshiyuki Hirano2017-08-141-2/+4
|
* Update testing.mdYauheni Dakuka2017-08-111-2/+2
|
* Remove redundant instances of the word 'simply' from documentation, on the ↵Emma Barnes2017-07-151-4/+4
| | | | basis that if it was simple, the user wouldn't be reading the docs
* Tiny documentation fixes [ci skip]Robin Dupret2017-06-061-3/+3
|
* Merge pull request #29101 from ccarruitero/system_guideEileen M. Uchitelle2017-06-021-10/+8
|\ | | | | some typos and rephrasing in system test guide [ci skip]
| * some typos and rephrasing in system test guide [ci skip]Cesar Carruitero2017-05-161-10/+8
| |
* | SystemTesting::Driver can register capybara-webkit and poltergeistMario Alberto Chávez2017-06-021-2/+3
| | | | | | | | | | | | | | | | | | | | 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.
* | Remove extra block for `assert_changes` [ci skip]Ryuta Kamizono2017-05-301-1/+1
| |
* | List assert_{,no_}changes in the testing guideGenadi Samokovarov2017-05-291-0/+2
|/ | | | | This lists the `assert_changes` and `assert_no_changes` methods in the guides. [ci skip]
* Clarify documentation for system test argumentseileencodes2017-05-141-2/+2
| | | | | | | | 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.
* Use a more realistic use-case for system test generatoreileencodes2017-05-141-5/+5
| | | | | | | | 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.
* [ci skip] Mailer fixtures in Testing guide.Cody Boyko2017-05-121-1/+1
| | | | | Update guide to clarify that mailer fixtures are not created when using the mailer generator.
* Fix link to `assert_nothing_raised` doc [ci skip]yuuji.yaginuma2017-05-081-1/+1
| | | | The `assert_nothing_raised` was moved to `ActiveSupport::Testing::Assertions` in 3cece0b6574c496605df055a2ebf77177f5b6e7f.
* Should escape meta characters in regexpRyuta Kamizono2017-05-071-1/+1
|
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2017-03-251-3/+3
|\
| * Edits to Systems testing section [ci skip]Vipul A M2017-03-091-3/+3
| |
* | Improve readability of testing guide [ci skip]James Baer2017-03-101-1/+1
| | | | | | | | | | Small change to improve the readability in section 2.3 of the testing guide.
* | Remove `:on` option that does ot exist [ci skip]yuuji.yaginuma2017-03-071-2/+2
| | | | | | | | That option was removed in 0a683085b1db435b7371350b2799a0f248cd717a
* | Avoid running system tests by defaultRobin Dupret2017-03-051-0/+3
|/ | | | | | | | | | 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.
* Fx system test example [ci skip]yuuji.yaginuma2017-03-041-7/+9
| | | | | | Since test suffix is automatically granted, it is not necessary to specify it in generator. Also, updated the generated file to contents actually generated.
* Improve documentation for Testing Your Mailers [ci skip]James Baer2017-02-281-0/+4
| | | | | | | | | | | | | | 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.
* remove needless extension from system test example [ci skip]yuuji.yaginuma2017-02-221-1/+1
|
* [doc] Fix wrong class name in testing.mdCelso Fernandes2017-02-211-1/+1
| | | | As the specified command is `rails g system_test articles`, the generated class name is `ArticlesTest`, not `UsersTest`
* Tiny documentation edits [ci skip]Robin Dupret2017-02-211-16/+11
|
* Fix some grammar in docs [ci skip]kenta-s2017-02-211-3/+3
|
* Clean up documentationeileencodes2017-02-201-7/+7
| | | | | There were some grammar issues and incorrect information in the system tests documentation.