1 / 14

A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH

A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH. Panacea. Adonis Celestine. ABOUT THE SPEAKER. Adonis Celestine. Adonis has more than 10 years of industry experience in Software Testing. He has good expertise on Software Test automation and consultation.

upshaw
Download Presentation

A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Panacea Adonis Celestine

  2. ABOUT THE SPEAKER Adonis Celestine Adonis has more than 10 years of industry experience in Software Testing. He has good expertise on Software Test automation and consultation. Adonis is passionate about test innovations and making testing simpler and more interesting. He has implemented this framework for multiple projects on a large scale and in this presentation he shares the experience, best practices and challenges in using this framework. email : adonis.sheeban@gmail.com 0617468887 Adonis Celestine

  3. THE TOOLS CUCUMBER Cucumber is a leading BDD tool which lets software development teams describe how software should behave in a business readable domain specific language. PROTRACTOR Protractor is an E2E test tool developed by google to test Angular applications. CUCUMBER SANDWICH Cucumber Sandwich generates awesome html reports on the fly. It monitors your Cucumber json report directory for changes & generates the report.

  4. WHY NEW FRAMEWORK Gaps in the current process Technology changes & responsive design Something light and free What are you testing Test Reporting

  5. BEHAVIOUR DRIVEN DEVELOPMENT BDD A programmers mind Travel(“market”); If(isPresent(“egg”)){ buyMilk(6); } else { buyMilk(1); } WHEN– an event occurs GIVEN– Some preconditions THEN– you see an outcome Automated Acceptance Tests More Collaboration Faster & High Quality

  6. CUCUMBER & GHERKIN Feature:Search on internet @Regression @SmokeScenario Outline:Searchkeywordsprotractor & cucumberGivenI open the search <engine> WhenI type <keyword> AndI click searchThenI see the search resultsExamples: |engine|keyword| |google|protractor| |google|angularjs| |bing|protractor| Feature:Descriptive text of what is desired Scenario Outline: Some determinable business situation Given some precondition And some other precondition When some action by the actor And some other action Then some testable outcome is achieved And something else we can check happens too Examples: Test Data BDD IS TDD doneright It’s the language the business understands

  7. PROTRACTOR TestReporting BDD The glue code BrowserDriver SystemUnderTest Angular locators Multi browser capabilities E2E Test the whole chain ng-binding, ng-repeat, ng-textarea, ng-model , WaitForAngular

  8. PROTRACTOR IN AN ANGULAR PAGE The Feature file Feature: Check the weather @chainScenario Outline:Check the weather of AmsterdamGiven I open weather.com WhenI type Amsterdam in the search box And I click searchThen I must beabletosee the weather <overview> Examples: |overview| |Today| |5 Day| |10 Day| |Weekend| |Monthly| The Config file exports.config = {specs: ['test/SystemTest/features/*.feature' ], framework: 'cucumber', cucumberOpts: { require: ['features/step_definitions/*_steps.js', 'features/support/*.js'], format: 'pretty' },capabilities: { browserName: 'firefox‘ }}; Demo The Spec file this.When(/^I type Amsterdam in the search box$/, function(callback) {browser.element(by.xpath(“(//input[@name=‘search’])”).sendKeys(“Amsterdam”).then(callback);});

  9. PROTRACTOR IN A NON ANGULAR PAGE Demo

  10. PROTRACTOR ON MOBILE The Config file Doesn’t support native apps Install android SDK capabilities: { browserName: 'chrome', 'appium-version': '1.0', platformName: 'Android', platformVersion: '4.4.2‘ , deviceName: 'Android Emulator', } Mobile browsers Configure Protractor Appium Install Appium Selendroid

  11. CUCUMBER SANDWICH Demo

  12. CHALLENGES

  13. THE BEST PRACTICES & TIPS

  14. THANK YOU! FOR YOUR ATTENTION REFERENCES https://angular.github.io/protractor/ https://cucumber.io/ https://www.linkedin.com/profile/view?id=AAMAAAbro_EBdKrNNLuUAOzF3KxGRpDkWydxpuE&trk=hp-identity-name http://testautomation.applitools.com/post/94994807787/protractor-vs-selenium-which-is-easier

More Related