> I think running the test suite twice is possible, could this be good solution though
What I mean is I don't see a way to implement this that wouldn't start 2 servers and run the tests twice, once in Chrome and once in FF for example. > I cant find where you instantiate system test from when starting it. When you run `rails test:system` https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/system_test_case.rb#L145 starts the server and boots the Rails application. `driven_by` is initialized when the test starts which is why you if you want multiple drivers you need to have multiple classes that call `driven_by` and inherit from that class (https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/system_test_case.rb#L136-L138). That calls `setup` which initializes Capybara and then Capybara takes over from there. https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/system_testing/driver.rb#L78 -Eileen On Friday, December 15, 2017 at 4:17:39 PM UTC-5, Pierre Hedkvist wrote: > > Thanks for the reply, > > I have tried to find a solution, I think running the test suite twice is > possible, could this be good solution though? Downside is that it might be > slow to start selenium multiple times? > I cant find where you instantiate system test from when starting it. I am > familiar with your code from this PR > <https://github.com/rails/rails/pull/26703> inside of ActionDispatch. But > when rails test:system is entered in the terminal, > from where does rails start the test? > > > > Den fredag 15 december 2017 kl. 14:12:52 UTC+1 skrev eileencodes: >> >> Hi Pierre, >> >> That does sound like a useful feature. That would require your test suite >> to run twice though, is that desirable? If you'd like to implement this >> feature cc me when you open the PR. >> >> -Eileen (eileencodes) >> >> On Thursday, December 14, 2017 at 7:23:19 AM UTC-5, Pierre Hedkvist wrote: >>> >>> Hi, >>> >>> I think it could be useful to run System Test with multiple browsers >>> when using Selenium, in order to get better testing coverage for different >>> browsers. >>> >>> For instance if you could put an array of browsers inside the using >>> variable: >>> >>> require "test_helper" >>> >>> >>> class ApplicationSystemTestCase < ActionDispatch::SystemTestCase >>> driven_by :selenium, using: [:chrome, :firefox], screen_size: [1000, >>> 1000] >>> end >>> >>> >>> I know its possible to run capybara with multiple browser using RSpec, >>> like this: >>> https://stackoverflow.com/questions/39955782/capybara-rspec-how-to-set-up-multi-browser-tc-running >>> >>> What are your thoughts? >>> >> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.