SlideShare a Scribd company logo
1 of 29
Protractor: End-to-end Testing for AngularJS
By Thuy Nguyen
www.axon.vnfb.com/AxonActiveVietNam
Warm Up
1.The basics of Selenium (Either Java/c#)
2.Selenium Architecture
3.Element locators available in Selenium
4.Cucumber
5.POM (Page-Object-Model)
www.axon.vnfb.com/AxonActiveVietNam
1. Protractor introduction
2. Building up and write a simple test
3. Getting familiar with Cucumber
4. Using POM with protractor and cucumber
Agenda
www.axon.vnfb.com/AxonActiveVietNam
Protractor introduction
Protractor
www.axon.vnfb.com/AxonActiveVietNam
Protractor introduction
PROTRACTOR SELENIUM
Locators By.repeater, By.model,
…. (Selenium locators)
By.name, By.id, By.css,
By.xpath ….
Programming
language
Javascript only C#, Java, Python, Ruby
Browser
Support
(No different from Selenium) Chrome, Mozilla, Safari,
MSEdge
Package Whole range of NPM
packages
Limited to jar’s and assemblies
in JAVA and C#
www.axon.vnfb.com/AxonActiveVietNam
Protractor introduction
PROTRACTOR SELENIUM
Test frameworks Jasmine, Mocha,Chai TestNG, Junit for Java, Nunit,
Mstest for C#.
BDD support Cucumber Cucumber, SpecFlow
Programming Asynchronous Object oriented
Browsers Both real and headless
browsers
Only on real browsers
Speed About 20-30% faster than
Selenium
Normal
• Why we use protractor
Protractor introduction
<input type="text" ng-model="vm.username"
id="username" name="username">
• Why we use protractor
Protractor introduction
Protractor and webdriver architecture
Protractor introduction
Protractor introduction
Work Flow
Install below three things firstly
- Node.js
- Protractor
- Selenium Webdriver
Use npm to install Protractor globally with:
- npm install -g protractor
- webdriver-manager update
- webdriver-manager start
Building up and write a simple test
<input type="text" ng-model=“person.name”>
element(by.model(‘person.name’));
<span ng-bind=“person.email"></span>
element(by.binding(‘person.name’));
Full list of available methods :
angular.github.io/protractor/#/api
• Object Locators
Building up and write a simple test
• Work Flow Diagram
Building up and write a simple test
• Creating a simple test script
• conf.js: the configuration file
• spec.js: the spec file
• customConfig.js: customize speed for protractor tests
Building up and write a simple test
exports.config = {
framework: ‘jasmine',
seleniumAddress:
‘http://localhost:4444/wd/hub',
specs: [‘customConfig.js','spec.js']
}
• Creating a simple test
Building up and write a simple test
• Creating a simple test
Building up and write a simple test
describe('Protractor Demo App', function() {
var registerBtn =
element.all(by.linkText('Register')).get(0);
var firstname
= element(by.model('vm.user.firstName'));
beforeEach(function() {
browser.get(‘http://localhost/demo');
});
it('register a user', function() {
expect(browser.getTitle()).toEqual('Dashbo
ard');
………………
});
});
Building up and write a simple test
var origFn = browser.driver.controlFlow().execute;
browser.driver.controlFlow().execute =
function () {
var args = arguments;
origFn.call(browser.driver.controlFlow(),function ()
{
return protractor.promise.delayed(400);
});
return origFn.apply(browser.driver.controlFlow(),
args);
};
Building up and write a simple test
• webdriver-manager update
• sudo webdriver-manager start
• protractor conf.js
(cd to project folder)
Run scripts:
Building up and write a simple test
(15’)
Write simple test scripts:
• Register an account (First Name, Last
Name, Username, Password)
• Login into system(Username, Password)
DEMO & PRACTICE
Feature: Register Account
As a user of Fusion website,
I want to create an account
So that I have to login the system
Scenario: Register an account successfully
Given I open the website http://localhost/demo/
Then I verify that welcome page is appeared
When I click Register button
Then I verify that register page is appeared
When I register with first name as Thuy, last name as
Nguyen, username as tixiuthu, password as 123456
Then I verify that system shows the Registration successful
Getting familiar with Cucumber
Getting familiar with Cucumber
Feature: Register Account
As a user of Fusion website,
I want to create an account
So that I have to login the system
Background:
Given I open the website <website>
Then I verify that add customer screen appears
Scenario Outline: Register an account successfully
When I click Register button
Then I verify that register page is appeared
When I register with first name as <firstname>, lastname as <lastname>, username as
<username>, password as <password>
Then I verify that system shows the <message>
Examples:
| website | firstname | lastname | username | password | message
|
| http://localhost/demo/ | Thuy | Nguyen | tixiuthu | 123456 | Registration successful |
| http://localhost/demo/ | Khue | Tran | ketr | 123456 | Registration successful |
• Code Structure
Using POM with protractor and cucumber
• package.jscon, package-lock.json :
get the dependences
• conf.js: the configuration file
• add_customer.feature: feature file
• add_customer_steps.js: definition file
• add_customer_page.js: page file
• Report
Using POM with protractor and cucumber
(25’)
In each team, we can implement more
features based on the existed features
in codes. Our supporters will guide and
explain more codes.
After finishing, each team has a short
demo
PRACTICE
Using POM with protractor and cucumber
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)

More Related Content

What's hot

Dalek.js - Automated cross browser testing with JavaScript
Dalek.js - Automated cross browser testing with JavaScriptDalek.js - Automated cross browser testing with JavaScript
Dalek.js - Automated cross browser testing with JavaScriptNir Elbaz
 
Superfast Automated Web Testing with CasperJS & PhantomJS
Superfast Automated Web Testing with CasperJS & PhantomJS Superfast Automated Web Testing with CasperJS & PhantomJS
Superfast Automated Web Testing with CasperJS & PhantomJS Hervé Vũ Roussel
 
DalekJS Workshop at T3DD14
DalekJS Workshop at T3DD14DalekJS Workshop at T3DD14
DalekJS Workshop at T3DD14Peter Foerger
 
An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.BugRaptors
 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTudor Barbu
 
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumScraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumRoger Barnes
 
Site Testing with CasperJS
Site Testing with CasperJSSite Testing with CasperJS
Site Testing with CasperJSJoseph Scott
 
Automated Testing With Watir
Automated Testing With WatirAutomated Testing With Watir
Automated Testing With WatirTimothy Fisher
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and RubyYnon Perek
 
Php vulnerability presentation
Php vulnerability presentationPhp vulnerability presentation
Php vulnerability presentationSqa Enthusiast
 
Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJSStephan Hochhaus
 
Introduction To Ruby Watir (Web Application Testing In Ruby)
Introduction To Ruby Watir (Web Application Testing In Ruby)Introduction To Ruby Watir (Web Application Testing In Ruby)
Introduction To Ruby Watir (Web Application Testing In Ruby)Mindfire Solutions
 
What is the taste of the Selenide
What is the taste of the SelenideWhat is the taste of the Selenide
What is the taste of the SelenideRoman Marinsky
 
Build RESTful API Using Express JS
Build RESTful API Using Express JSBuild RESTful API Using Express JS
Build RESTful API Using Express JSCakra Danu Sedayu
 
Internals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScriptInternals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScriptfpatton
 

What's hot (20)

Dalek.js - Automated cross browser testing with JavaScript
Dalek.js - Automated cross browser testing with JavaScriptDalek.js - Automated cross browser testing with JavaScript
Dalek.js - Automated cross browser testing with JavaScript
 
Superfast Automated Web Testing with CasperJS & PhantomJS
Superfast Automated Web Testing with CasperJS & PhantomJS Superfast Automated Web Testing with CasperJS & PhantomJS
Superfast Automated Web Testing with CasperJS & PhantomJS
 
DalekJS Workshop at T3DD14
DalekJS Workshop at T3DD14DalekJS Workshop at T3DD14
DalekJS Workshop at T3DD14
 
Write php deploy everywhere
Write php deploy everywhereWrite php deploy everywhere
Write php deploy everywhere
 
An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.An introduction to PhantomJS: A headless browser for automation test.
An introduction to PhantomJS: A headless browser for automation test.
 
Code ceptioninstallation
Code ceptioninstallationCode ceptioninstallation
Code ceptioninstallation
 
Testing frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabsTesting frontends with nightwatch & saucelabs
Testing frontends with nightwatch & saucelabs
 
Scraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & SeleniumScraping recalcitrant web sites with Python & Selenium
Scraping recalcitrant web sites with Python & Selenium
 
CasperJS
CasperJSCasperJS
CasperJS
 
Site Testing with CasperJS
Site Testing with CasperJSSite Testing with CasperJS
Site Testing with CasperJS
 
Automated Testing With Watir
Automated Testing With WatirAutomated Testing With Watir
Automated Testing With Watir
 
Introduction to Selenium and Ruby
Introduction to Selenium and RubyIntroduction to Selenium and Ruby
Introduction to Selenium and Ruby
 
Php vulnerability presentation
Php vulnerability presentationPhp vulnerability presentation
Php vulnerability presentation
 
Palestra VCR
Palestra VCRPalestra VCR
Palestra VCR
 
Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJS
 
Web ui testing
Web ui testingWeb ui testing
Web ui testing
 
Introduction To Ruby Watir (Web Application Testing In Ruby)
Introduction To Ruby Watir (Web Application Testing In Ruby)Introduction To Ruby Watir (Web Application Testing In Ruby)
Introduction To Ruby Watir (Web Application Testing In Ruby)
 
What is the taste of the Selenide
What is the taste of the SelenideWhat is the taste of the Selenide
What is the taste of the Selenide
 
Build RESTful API Using Express JS
Build RESTful API Using Express JSBuild RESTful API Using Express JS
Build RESTful API Using Express JS
 
Internals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScriptInternals - Exploring the webOS Browser and JavaScript
Internals - Exploring the webOS Browser and JavaScript
 

Similar to [DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)

Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkSusannSgorzaly
 
Using protractor to build automated ui tests
Using protractor to build automated ui testsUsing protractor to build automated ui tests
Using protractor to build automated ui tests🌱 Dale Spoonemore
 
Whys and Hows of Automation
Whys and Hows of AutomationWhys and Hows of Automation
Whys and Hows of AutomationvodQA
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with exampleshadabgilani
 
Getting up and running with selenium for automated Code palousa
Getting up and running with selenium for automated  Code palousaGetting up and running with selenium for automated  Code palousa
Getting up and running with selenium for automated Code palousaEmma Armstrong
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupDave Haeffner
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Ondřej Machulda
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsNick Belhomme
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor🌱 Dale Spoonemore
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...Amazon Web Services
 
Cross platform browser automation tests sdp
Cross platform browser automation tests   sdpCross platform browser automation tests   sdp
Cross platform browser automation tests sdpOren Ashkenazy
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
Performance Metrics in a Day with Selenium
Performance Metrics in a Day with SeleniumPerformance Metrics in a Day with Selenium
Performance Metrics in a Day with SeleniumMark Watson
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaEr. Sndp Srda
 
Watir Presentation Sumanth Krishna. A
Watir Presentation   Sumanth Krishna. AWatir Presentation   Sumanth Krishna. A
Watir Presentation Sumanth Krishna. ASumanth krishna
 

Similar to [DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen) (20)

Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP framework
 
Using protractor to build automated ui tests
Using protractor to build automated ui testsUsing protractor to build automated ui tests
Using protractor to build automated ui tests
 
Selenium
SeleniumSelenium
Selenium
 
Whys and Hows of Automation
Whys and Hows of AutomationWhys and Hows of Automation
Whys and Hows of Automation
 
Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver Selenium testing - Handle Elements in WebDriver
Selenium testing - Handle Elements in WebDriver
 
Protractor framework architecture with example
Protractor framework architecture with exampleProtractor framework architecture with example
Protractor framework architecture with example
 
Getting up and running with selenium for automated Code palousa
Getting up and running with selenium for automated  Code palousaGetting up and running with selenium for automated  Code palousa
Getting up and running with selenium for automated Code palousa
 
Selenium
SeleniumSelenium
Selenium
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
Selenium & PHPUnit made easy with Steward (Berlin, April 2017)
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor
 
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
AWS December 2015 Webinar Series - Continuous Delivery to Amazon EC2 Containe...
 
Cross platform browser automation tests sdp
Cross platform browser automation tests   sdpCross platform browser automation tests   sdp
Cross platform browser automation tests sdp
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Selenium training
Selenium trainingSelenium training
Selenium training
 
Performance Metrics in a Day with Selenium
Performance Metrics in a Day with SeleniumPerformance Metrics in a Day with Selenium
Performance Metrics in a Day with Selenium
 
Selenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep ShardaSelenium Introduction by Sandeep Sharda
Selenium Introduction by Sandeep Sharda
 
Watir Presentation Sumanth Krishna. A
Watir Presentation   Sumanth Krishna. AWatir Presentation   Sumanth Krishna. A
Watir Presentation Sumanth Krishna. A
 

More from Scrum Breakfast Vietnam

[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...Scrum Breakfast Vietnam
 
Zero to hero in agile automation testing
Zero to hero in agile automation testingZero to hero in agile automation testing
Zero to hero in agile automation testingScrum Breakfast Vietnam
 
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019Scrum Breakfast Vietnam
 
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019Scrum Breakfast Vietnam
 
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019Scrum Breakfast Vietnam
 
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019Scrum Breakfast Vietnam
 
Working as a remote team - HCM Scrum Breakfast - May 25, 2019
Working as a remote team - HCM Scrum Breakfast - May 25, 2019Working as a remote team - HCM Scrum Breakfast - May 25, 2019
Working as a remote team - HCM Scrum Breakfast - May 25, 2019Scrum Breakfast Vietnam
 
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018Scrum Breakfast Vietnam
 
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...Scrum Breakfast Vietnam
 
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...Scrum Breakfast Vietnam
 
Automation Testing in Agile - HCM Scrum Breakfast - July 2018
Automation Testing in Agile - HCM Scrum Breakfast - July 2018Automation Testing in Agile - HCM Scrum Breakfast - July 2018
Automation Testing in Agile - HCM Scrum Breakfast - July 2018Scrum Breakfast Vietnam
 
[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber
[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber
[DN Scrum Breakfast] API Automation Testing Using Retrofit & CucumberScrum Breakfast Vietnam
 
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)Scrum Breakfast Vietnam
 
[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud Computing[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud ComputingScrum Breakfast Vietnam
 
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
[HCM Scrum Breakfast - January 2018] ElasticSearch In ActionScrum Breakfast Vietnam
 
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIOScrum Breakfast Vietnam
 
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016Scrum Breakfast Vietnam
 
[HCM Scrum Breakfast - June 2017] Distributed Team
[HCM Scrum Breakfast - June 2017] Distributed Team[HCM Scrum Breakfast - June 2017] Distributed Team
[HCM Scrum Breakfast - June 2017] Distributed TeamScrum Breakfast Vietnam
 

More from Scrum Breakfast Vietnam (20)

[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
 
Zero to hero in agile automation testing
Zero to hero in agile automation testingZero to hero in agile automation testing
Zero to hero in agile automation testing
 
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
 
UI/UX Design in Agile process
UI/UX Design in Agile process  UI/UX Design in Agile process
UI/UX Design in Agile process
 
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
 
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
 
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
 
Working as a remote team - HCM Scrum Breakfast - May 25, 2019
Working as a remote team - HCM Scrum Breakfast - May 25, 2019Working as a remote team - HCM Scrum Breakfast - May 25, 2019
Working as a remote team - HCM Scrum Breakfast - May 25, 2019
 
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
 
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
 
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
 
Automation Testing in Agile - HCM Scrum Breakfast - July 2018
Automation Testing in Agile - HCM Scrum Breakfast - July 2018Automation Testing in Agile - HCM Scrum Breakfast - July 2018
Automation Testing in Agile - HCM Scrum Breakfast - July 2018
 
[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber
[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber
[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber
 
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
 
[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud Computing[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud Computing
 
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
 
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
 
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
 
[Da Nang Scrum Breakfast] Angular Tour
[Da Nang Scrum Breakfast] Angular Tour[Da Nang Scrum Breakfast] Angular Tour
[Da Nang Scrum Breakfast] Angular Tour
 
[HCM Scrum Breakfast - June 2017] Distributed Team
[HCM Scrum Breakfast - June 2017] Distributed Team[HCM Scrum Breakfast - June 2017] Distributed Team
[HCM Scrum Breakfast - June 2017] Distributed Team
 

Recently uploaded

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 

Recently uploaded (20)

why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 

[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)

  • 1.
  • 2. Protractor: End-to-end Testing for AngularJS By Thuy Nguyen
  • 3. www.axon.vnfb.com/AxonActiveVietNam Warm Up 1.The basics of Selenium (Either Java/c#) 2.Selenium Architecture 3.Element locators available in Selenium 4.Cucumber 5.POM (Page-Object-Model)
  • 4. www.axon.vnfb.com/AxonActiveVietNam 1. Protractor introduction 2. Building up and write a simple test 3. Getting familiar with Cucumber 4. Using POM with protractor and cucumber Agenda
  • 6. www.axon.vnfb.com/AxonActiveVietNam Protractor introduction PROTRACTOR SELENIUM Locators By.repeater, By.model, …. (Selenium locators) By.name, By.id, By.css, By.xpath …. Programming language Javascript only C#, Java, Python, Ruby Browser Support (No different from Selenium) Chrome, Mozilla, Safari, MSEdge Package Whole range of NPM packages Limited to jar’s and assemblies in JAVA and C#
  • 7. www.axon.vnfb.com/AxonActiveVietNam Protractor introduction PROTRACTOR SELENIUM Test frameworks Jasmine, Mocha,Chai TestNG, Junit for Java, Nunit, Mstest for C#. BDD support Cucumber Cucumber, SpecFlow Programming Asynchronous Object oriented Browsers Both real and headless browsers Only on real browsers Speed About 20-30% faster than Selenium Normal
  • 8. • Why we use protractor Protractor introduction
  • 9. <input type="text" ng-model="vm.username" id="username" name="username"> • Why we use protractor Protractor introduction
  • 10. Protractor and webdriver architecture Protractor introduction
  • 12. Install below three things firstly - Node.js - Protractor - Selenium Webdriver Use npm to install Protractor globally with: - npm install -g protractor - webdriver-manager update - webdriver-manager start Building up and write a simple test
  • 13. <input type="text" ng-model=“person.name”> element(by.model(‘person.name’)); <span ng-bind=“person.email"></span> element(by.binding(‘person.name’)); Full list of available methods : angular.github.io/protractor/#/api • Object Locators Building up and write a simple test
  • 14. • Work Flow Diagram Building up and write a simple test
  • 15. • Creating a simple test script • conf.js: the configuration file • spec.js: the spec file • customConfig.js: customize speed for protractor tests Building up and write a simple test
  • 16. exports.config = { framework: ‘jasmine', seleniumAddress: ‘http://localhost:4444/wd/hub', specs: [‘customConfig.js','spec.js'] } • Creating a simple test Building up and write a simple test
  • 17. • Creating a simple test Building up and write a simple test
  • 18. describe('Protractor Demo App', function() { var registerBtn = element.all(by.linkText('Register')).get(0); var firstname = element(by.model('vm.user.firstName')); beforeEach(function() { browser.get(‘http://localhost/demo'); }); it('register a user', function() { expect(browser.getTitle()).toEqual('Dashbo ard'); ……………… }); }); Building up and write a simple test
  • 19. var origFn = browser.driver.controlFlow().execute; browser.driver.controlFlow().execute = function () { var args = arguments; origFn.call(browser.driver.controlFlow(),function () { return protractor.promise.delayed(400); }); return origFn.apply(browser.driver.controlFlow(), args); }; Building up and write a simple test
  • 20. • webdriver-manager update • sudo webdriver-manager start • protractor conf.js (cd to project folder) Run scripts: Building up and write a simple test
  • 21. (15’) Write simple test scripts: • Register an account (First Name, Last Name, Username, Password) • Login into system(Username, Password) DEMO & PRACTICE
  • 22. Feature: Register Account As a user of Fusion website, I want to create an account So that I have to login the system Scenario: Register an account successfully Given I open the website http://localhost/demo/ Then I verify that welcome page is appeared When I click Register button Then I verify that register page is appeared When I register with first name as Thuy, last name as Nguyen, username as tixiuthu, password as 123456 Then I verify that system shows the Registration successful Getting familiar with Cucumber
  • 23. Getting familiar with Cucumber Feature: Register Account As a user of Fusion website, I want to create an account So that I have to login the system Background: Given I open the website <website> Then I verify that add customer screen appears Scenario Outline: Register an account successfully When I click Register button Then I verify that register page is appeared When I register with first name as <firstname>, lastname as <lastname>, username as <username>, password as <password> Then I verify that system shows the <message> Examples: | website | firstname | lastname | username | password | message | | http://localhost/demo/ | Thuy | Nguyen | tixiuthu | 123456 | Registration successful | | http://localhost/demo/ | Khue | Tran | ketr | 123456 | Registration successful |
  • 24. • Code Structure Using POM with protractor and cucumber • package.jscon, package-lock.json : get the dependences • conf.js: the configuration file • add_customer.feature: feature file • add_customer_steps.js: definition file • add_customer_page.js: page file
  • 25. • Report Using POM with protractor and cucumber
  • 26. (25’) In each team, we can implement more features based on the existed features in codes. Our supporters will guide and explain more codes. After finishing, each team has a short demo PRACTICE
  • 27. Using POM with protractor and cucumber

Editor's Notes

  1. Hi everyone, Today, I am so happy to share you the topic “Protractor: End-to-end Testing for AngularJS”. Firstly, I will be introduced the short demo which created to be based on protractor, mocha, jasmine …
  2. Did you know some definitions below: - The basics of Selenium (Either Java/c#) Selenium IDE, Selenium Remote Control, - Selenium Architecture - Element locators available in Selenium - Cucumber POM (Page-Object-Model) As you know, In this topic I will introduce some sessions related to some things but my point of protractor’s view. Honestly, in case you have a good knowledge about that ones , you will adapt with protractor faster because protractor is also based on some thing such as Selenium, locators, Cucumber, POM which can be built in Selenium
  3. In this topic, we will work together with some sessions below: Protractor introduction: having some definition of protractor and will give some ideas why we use protractor in Angular JS Building up and creating a simple test script: how the protractor works in your computer, I also explain/guide how to build the simple test script in protractor. We have a short practice for this one to familiar (config,spec files, locator, running …) Cucumber: as you know, Cucumber is working as BDD Style (based on Gherkin language), supporting for all team members to know the business faster and collaborate between testers, devs, customers. In this session, I just introduce the main contents to work in protractor POM: the page object model we can make non-brittle test code and reduce or eliminate duplicate test code. Beside of that it improves the readability and allows us to create interactive documentation (It’s a small script, the maintenance looks easy but with time test suite will grow. More and more line codes, things becomes tough.
  4. Protractor is a Node.js program that supports the Jasmine, Mocha, and Cucumber test frameworks. Protractor is an automated testing framework for testing AngularJS applications in the browser. Protractor is an open source functional automation framework Protractor uses Selenium WebDriver to drive browsers and simulate user’s interaction with an AngularJs application running in a browser. Similarities and differences between Protractor and Selenium with Java/C#: Locators:
  5. Protractor is an Open Source, End-to-End test framework specifically built for AngularJS apps. It’s a wrapper around Selenium WebDriverJS and Selenium Server. You no longer need to add waits and sleeps to your test. Protractor can automatically execute the next step in your test the moment the webpage finishes pending tasks, so you don’t have to worry about waiting for your test and webpage to sync. Having new locator strategies and functions specifically for Angular apps. Automatic waiting can execute the next step in your test the moment the web page finishes pending tasks. Protractor uses Jasmine (which is a behavior-driven development framework for testing JavaScript code) for its test syntax. Protractor is built on top of WebDriverJS, which uses native events and browser-specific drivers to interact with your application as a user would.
  6. Protractor is a Node.js (Node.js is an open source, cross-platform runtime environment for server-side and networking applications) program that supports the Jasmine, Mocha, and Cucumber test frameworks. The framework integrated with Jasmine can be used to create and organize tests and user expectations. Jasmine is compatible with Protractor due to which all resources that are extracted from browsers can be used to make tests as promises. Those promises are resolved internally by using the “expect” command from Jasmine. That way the promises work smoothly while creating tests.
  7. This configuration tells Protractor where your test files (specs) are, and where to talk to your Selenium Server (seleniumAddress). It will use the defaults for all other configuration. Chrome is the default browser.
  8. The describe and it syntax is from the Jasmine framework. browser is a global created by Protractor, which is used for browser-level commands such as navigation with browser.get.
  9. Cucumber is a tool based on Behavior Driven Development (BDD) framework which is used to write acceptance tests for web application. It allows automation of functional validation in easily readable and understandable format (like plain English) to Business Analysts, Developers, Testers, etc.