+ All Categories
Home > Documents > A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

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

Date post: 03-Jan-2016
Category:
Upload: chad-wilkinson
View: 251 times
Download: 0 times
Share this document with a friend
14
A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea
Transcript
Page 1: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH

Adonis Celestine

Panacea

Page 2: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

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.

ABOUT THE SPEAKER

0617468887email : [email protected] Adonis Celestine

Page 3: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

THE TOOLS

CUCUMBERCucumber is a leading BDD tool which lets software development teams describe how software should behave in a business readable domain specific language.

PROTRACTORProtractor is an E2E test tool developed by google to test Angular applications.

CUCUMBER SANDWICHCucumber Sandwich generates awesome html reports on the fly. It monitors your Cucumber json report directory for changes & generates the report.

Page 4: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

Technology changes & responsive design

WHY NEW FRAMEWORK

Gaps in the current process

Something light and free

What are you testing

Test Reporting

Page 5: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

A programmers mind

Travel(“market”);If(isPresent(“egg”)){ buyMilk(6);} else { buyMilk(1);}

More Collaboration

BEHAVIOUR DRIVEN DEVELOPMENT

Automated Acceptance Tests

WHEN– an event occursBDD

GIVEN– Some preconditions

THEN– you see an

outcome

Faster & High Quality

Page 6: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

CUCUMBER & GHERKIN

Feature: Search on internet@Regression @SmokeScenario Outline:Search keywords protractor & cucumber

Given I open the search <engine> When I type <keyword> And I click search Then I see the search results

Examples:

|engine|keyword| |google|protractor| |google|angularjs| |bing|protractor|

BDD IS TDD done right It’s the language the business understands

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

Page 7: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

ng-binding, ng-repeat, ng-textarea, ng-model , WaitForAngular

PROTRACTOR

Multi browser capabilitiesAngular locators E2E Test the whole chain

System Under Test

Browser Driver

The glue code

Test ReportingBDD

Page 8: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

The Feature file

Feature: Check the weather @chainScenario Outline:Check the weather of Amsterdam Given I open weather.com When I type Amsterdam in the search box And I click search Then I must be able to see the weather <overview>

Examples:

|overview| |Today| |5 Day| |10 Day| |Weekend| |Monthly|

PROTRACTOR IN AN ANGULAR PAGE

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);});

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‘ }};

Page 9: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

PROTRACTOR IN A NON ANGULAR PAGE

Demo

Page 10: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

PROTRACTOR ON MOBILE

capabilities: { browserName: 'chrome', 'appium-version': '1.0', platformName: 'Android', platformVersion: '4.4.2‘, deviceName: 'Android Emulator', }

The Config file

Appium

Selendroid

Mobile browsers

Doesn’t support native apps

Install Appium

Configure Protractor

Install android SDK

Page 11: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

CUCUMBER SANDWICH

Demo

Page 12: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

CHALLENGES

Page 13: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

THE BEST PRACTICES & TIPS

Page 14: A TEST FRAMEWORK USING PROTRACTOR, CUCUMBER & CUCUMBER SANDWICH Adonis Celestine Panacea.

THANK YOU!FOR YOUR ATTENTION

https://angular.github.io/protractor/https://cucumber.io/https://www.linkedin.com/profile/view?id=AAMAAAbro_EBdKrNNLuUAOzF3KxGRpDkWydxpuE&trk=hp-identity-namehttp://testautomation.applitools.com/post/94994807787/protractor-vs-selenium-which-is-easier

REFERENCES


Recommended