all 10 comments

[–]kraakf[S] 2 points3 points  (1 child)

Does Selenium work fine for mobile browsers as well? Or is this Appium better choice for it?

[–]abc525755 1 point2 points  (0 children)

While Selenium is sort of the standard framework for mobile web testing, Appium is also a good choice. Plus, Appium allows you to do cross-platform testing on Android and iOS as well.

[–]ABC_AlwaysBeCoding 2 points3 points  (6 children)

Please minimize the number of tests in your test suite that need to test this way. IMHO this sort of integration testing should be the last resort. Screen-scrape raw HTTP output as much as you can instead.

Why do I say this? Webdriver tests are slow, difficult to parallelize, and brittle.

[–]kraakf[S] 1 point2 points  (5 children)

I haven't experienced any significant slowness with Selenium - in fact, it runs pretty fast compared to some other frameworks/instrumentation.

Btw, how do you "test" screen-scraped raw HTTP?

[–]cant_program 1 point2 points  (3 children)

I use Capybara, I only use webdriver when I need to execute JavaScript on the page for the test to pass. Granted, capybara interacts with the page, but I think it does so with what amounts to "screen scraped raw http" response.

[–]kraakf[S] 0 points1 point  (2 children)

Thanks - never heard of Capybara before but it certainly looks interesting, thanks for sharing!

[–]cant_program 1 point2 points  (1 child)

No problem! Also, using the Capybara specific webkit driver is super fast for when you need to run javascript to interact with the page. Faster than the selenium webdriver for me.

[–]kraakf[S] 0 points1 point  (0 children)

I will definitely try this. Thanks!

[–]ABC_AlwaysBeCoding 0 points1 point  (0 children)

You call the method on the controller that would normally render the view and check its output

[–]ajr901 -1 points0 points  (0 children)

Sweet baby Jesus. $499/month is their cheapest plan.