Slide 1

Slide 1 text

Web Testing

Slide 2

Slide 2 text

Challenge

Slide 3

Slide 3 text

Things will break and no one noticed.

Slide 4

Slide 4 text

Platforms x Browsers  IE 8

Slide 5

Slide 5 text

It's ok to fail but it's better to fix it before others know.

Slide 6

Slide 6 text

Unit Tests From inside out Developer's perspective Focus on components

Slide 7

Slide 7 text

Acceptance Tests From outside in User's perspective Focus on features

Slide 8

Slide 8 text

Live Demo

Slide 9

Slide 9 text

Selenium Browser automation

Slide 10

Slide 10 text

Selenium WebDriver InternetExplorerDriver RemoteWebDriver

Slide 11

Slide 11 text

Remote Testing Server 4 Server host windows VMs 4 VM contains Selenium server 4 Connect ports between Macbook & VM using SSH tunnels via Server 4 Run test from Macbook, execute on VM, save screenshot on Macbook.

Slide 12

Slide 12 text

Capybara Sampe Code describe "the signin process", :type => :feature do before :each do User.make(:email => '[email protected]', :password => 'caplin') end it "signs me in" do visit '/sessions/new' within("#session") do fill_in 'Login', :with => '[email protected]' fill_in 'Password', :with => 'password' end click_link 'Sign in' expect(page).to have_content 'Success' end end

Slide 13

Slide 13 text

Navigating visit('/projects') expect(current_path).to eq(post_comments_path(post))

Slide 14

Slide 14 text

Clicking click_link('id-of-link') click_link('Link Text') click_button('Save') click_on('Link Text') # clicks on either links or buttons click_on('Button Value')

Slide 15

Slide 15 text

Interacting with forms fill_in('First Name', :with => 'John') fill_in('Password', :with => 'Seekrit') fill_in('Description', :with => 'Really Long Text...') choose('A Radio Button') check('A Checkbox') uncheck('A Checkbox') attach_file('Image', '/path/to/image.jpg') select('Option', :from => 'Select Box')

Slide 16

Slide 16 text

Querying page.has_selector?('table tr') page.has_selector?(:xpath, '//table/tr') page.has_xpath?('//table/tr') page.has_css?('table tr.foo') page.has_content?('foo')

Slide 17

Slide 17 text

Finding find_field('First Name').value find_link('Hello').visible? find_button('Send').click find(:xpath, "//table/tr").click find("#overlay").find("h1").click all('a').each { |a| a[:href] }

Slide 18

Slide 18 text

Scripting page.execute_script("$('body').empty()") and more...

Slide 19

Slide 19 text

SauceLabs Run your web and mobile app tests across hundreds of real browsers and platforms instantly. Basically the same thing.

Slide 20

Slide 20 text

Features 4 304 Device/OS/Browser Platforms. 4 Screenshot, video recording by default. 4 Live Share cooperation.

Slide 21

Slide 21 text

No content