How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

11
Functional Testing and Continuous Delivery at Yahoo! Mail Neil Manvar Front-End Developer

description

Learn how one Engineer helped transform internet giant Yahoo! Mail's quality engineering process through functional testing and continuous delivery. Over the last two years, Front End Developer Neil Manvar's most important contribution to Yahoo! has been developing a modern functional testing framework that is based on open-source technologies, plays well with legacy code, supports many browsers, does not need maintenance, is readable to product managers, and makes writing a pleasure. Webinar recording: https://saucelabsreview.webex.com/saucelabsreview/lsr.php?RCID=45e1df88fd4b492984a60d7c5fd121b8

Transcript of How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Page 1: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Functional Testing and Continuous Delivery at

Yahoo! MailNeil Manvar

Front-End Developer

Page 2: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

About Me

- 2 years with Yahoo! Mail- Bachelors in Computer Science &

Engineering from UC Davis.- Hobbies include UFC/MMA, cycling, and

video games.- CS Interests include in-browser functional

testing and exploring new FE technologies

Page 3: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Role of Browser Testing in Mail

- No more dedicated QA’s- Need to make sure Mail works on various

different configurations- Going towards CD Model

- need automated tests to certify product

Page 4: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Ycuke - Functional Testing Framework

- Cucumber- Watir-Webdriver- Page-Object- Parallel_tests- Saucelabs (get a free trial here!)

Page 5: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Sample Testcase - Feature file

Scenario: Composing a new message and saving as draft Given I am logged in to Yahoo! Mail as User1 And I open compose And I fill out the subject field with “someRandomContent” And I fill out the email message body with “someBodyContent” And I save draft by pressing Control + S Then I should see the save draft confirmation notification

Page 6: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Sample Testcase - Step Definition

step_definitions/Compose_steps.rb:

And /^I fill out the subject field with “(.*)”$/ do | content |on_page Compose do | page |

page.subject_field.when_present.set(content)end

end

Page 7: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Sample Testcase - Page Object

page_objects/Compose_page.rb

class Compose include PageObject

...def subject_field

@browser.text_field(:id => “to-field”)end

...end

Page 8: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Complications

Parallelism- Account Problems- Abuse / Anti-Spam

Page 9: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Continuous Delivery Pipeline

1. Developer submits pull requests- Unit tests are run against pull request.2. Code is reviewed and merged in if PR build

passes.- Unit and Functional Tests are run3. Code is pushed to test servers, and pushed

to prod after “integration” functional tests passes

Page 10: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Trying to run functional tests on Pull Request build.

Challenge: Will get flagged as abusive / spam since we have > 20 pull requests

Solution:Mock backend (record and replay)

Page 11: How Yahoo! Mail Transformed Its Functional Testing and Continuous Delivery Process

Q & A

Try Sauce Labs free! Click here and get a free account!