SlideShare a Scribd company logo
1 of 9
An introduction to PhantomJS: A
headless browser for automation test.
A headless WebKit which offers native and quick support for a number of
web standards. PhantomJS is scriptable with a JavaScript API and permits
webpage capturing, pages manipulation, access to the file system and
page settings. Also it contend with mobile Webkit, which supports touch
events.
Headless web testing with JavaScript
PhantomJS has a whole set of features that testers love and use for many
purposes. It is primarily used for a headless testing of web applications.
PhantomJS fits for both as a part of a constant integration system and
universal command-line based testing. It is important to recall that
PhantomJS itself is not a testing framework, it is only engaged to launch
the tests through a suitable test runner.
It is a headless WebKit which means that it delivers the layout engine
related to those that are used by Firefox, Safari, Chrome or other niche
browsers. Basically PhantomJS is a browser itself where pages are never
actually displayed even though it is a headless one. PhantomJS code
targets at directing browser automation at high level. Many other widely
used testing libraries can run on top of PhantomJS, even though it is not
a testing library including Jasmine, Mocha, Capybara, WebDriver, QUnit,
FuncUnit, YUI Test, BusterJS, Robot Framework etc. In state when the
framework does not need an external runner, it is marked as "built-in".
PhantomJS advantages are
1. Screen capture: Since PhantomJS uses a real rendering and layout
engine, it can be used to seizure web contents, convert it not only in CSS
and HTML but also into Canvas and SVG and build server-side web
graphics apps from a screenshot service to a vector chart rasterizer.
2. Network monitoring: PhantomJS licenses the examination of network
traffic and it is possible to automate track page loading, performance
analysis and export as standard HAR format.
3. Page automation: It is quite easy to manipulate web pages and load
with the with usual libraries like jQuery or with the standard DOM API.
4. Continuous Integration: Integration and Support with the CI systems
(e.g. Jenkins and TeamCity) does not request for special setup since it is
virtuously headless on Linux and the agent can run on an installation with
any GUI which means that a barebone Linux system without X11 is not a
problem for PhantomJS. It makes it likely to spawn light build agents on
Heroku instances or Amazon EC2.
5. PhantomJS testing: Since it is possible to manipulate and access web
pages with PhantomJS, it is appropriate to carry out various page
automations. Furthermore, some projects are built on top of this WebKit
so as to provide high-level functionality for testing purposes. For
Example:- js(suitable to testing and build scripted navigation),
WebSpecter (BDD-style acceptance test framework for web applications),
Lotte (contains jQuery-like chaining, more assertion logic and methods).
PhantomJS also comprises of run-jasmine and run-qunit in its
example subdirectory. These lack important reporting features which are
necessary for real-world uses and are for design purposes.
Pros and cons of using PhantomJS instead of real
browsers
Pros:
1. Most of the people use PhantomJS to avoid additional overhaul with
real browser and it's headless.
2. You can avoid Grid Hub relationship(or other similar mechanism) by
running the tests on CI directly using this which is sometimes little
messy to handle.
3. Runs multiple test cases faster in automation testing so run-time can
be reduced by up to 50% for most tasks.
4. Best suited for smoke testing of applications.
5. It require lesser number of resources.
6. Able to run far more instances simultaneously than non-headless
drivers.
Cons:
1. There are large amount of pending issue in PhantomJS.
2. While UI and e2e testing are frequently used to imitate the user
behavior PhantomJs does not exactly do that.
3. There are some cases where PhantomJS fails but other drivers work
perfectly.
4. Hard to debug inconsistent failures on locating elements due to too
fast page loading.
5. For non-headless drivers the code will not always work when the
driver switches to HtmlUnit i.e. the switching between ChromeDriver and
FirefoxDriver is usually consistent in success rate with same code, but
same is not the case with HtmlUnit.
An introduction to PhantomJS: A headless browser for automation test.

More Related Content

What's hot

20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testingVladimir Roudakov
 
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
 
CasperJs Enjoy Functional Testing
CasperJs Enjoy Functional TestingCasperJs Enjoy Functional Testing
CasperJs Enjoy Functional TestingFabien POMEROL
 
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
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)Nicholas Zakas
 
Front-end Automated Testing
Front-end Automated TestingFront-end Automated Testing
Front-end Automated TestingRuben Teijeiro
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验yiditushe
 
Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJSStephan Hochhaus
 
Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Deutsche Post
 
Puppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing ToolPuppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing ToolMiki Lombardi
 
Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)Kazuaki Matsuo
 
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"Игорь Фесенко "Web Apps Performance & JavaScript Compilers"
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"Fwdays
 
Service Worker 201 (en)
Service Worker 201 (en)Service Worker 201 (en)
Service Worker 201 (en)Chang W. Doh
 
Your Script Just Killed My Site
Your Script Just Killed My SiteYour Script Just Killed My Site
Your Script Just Killed My SiteSteve Souders
 
Integration Test Cucumber + Webrat + Selenium
Integration Test Cucumber + Webrat + SeleniumIntegration Test Cucumber + Webrat + Selenium
Integration Test Cucumber + Webrat + Seleniumtka
 

What's hot (20)

Webdriver.io
Webdriver.io Webdriver.io
Webdriver.io
 
Fav
FavFav
Fav
 
20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing20160905 - BrisJS - nightwatch testing
20160905 - BrisJS - nightwatch testing
 
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
 
CasperJs Enjoy Functional Testing
CasperJs Enjoy Functional TestingCasperJs Enjoy Functional Testing
CasperJs Enjoy Functional Testing
 
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
 
High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)High Performance JavaScript (CapitolJS 2011)
High Performance JavaScript (CapitolJS 2011)
 
Front-end Automated Testing
Front-end Automated TestingFront-end Automated Testing
Front-end Automated Testing
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验
 
Sxsw 20090314
Sxsw 20090314Sxsw 20090314
Sxsw 20090314
 
Testing MeteorJS using CasperJS
Testing MeteorJS using CasperJSTesting MeteorJS using CasperJS
Testing MeteorJS using CasperJS
 
Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)Javascript Test Automation Workshop (21.08.2014)
Javascript Test Automation Workshop (21.08.2014)
 
Puppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing ToolPuppeteer - A web scraping & UI Testing Tool
Puppeteer - A web scraping & UI Testing Tool
 
Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)Chrome Devtools Protocol via Selenium/Appium (English)
Chrome Devtools Protocol via Selenium/Appium (English)
 
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"Игорь Фесенко "Web Apps Performance & JavaScript Compilers"
Игорь Фесенко "Web Apps Performance & JavaScript Compilers"
 
AppengineJS
AppengineJSAppengineJS
AppengineJS
 
Service Worker 201 (en)
Service Worker 201 (en)Service Worker 201 (en)
Service Worker 201 (en)
 
Your Script Just Killed My Site
Your Script Just Killed My SiteYour Script Just Killed My Site
Your Script Just Killed My Site
 
Integration Test Cucumber + Webrat + Selenium
Integration Test Cucumber + Webrat + SeleniumIntegration Test Cucumber + Webrat + Selenium
Integration Test Cucumber + Webrat + Selenium
 

Viewers also liked

Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick startji guang
 
Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Wesley Hales
 
Introduction to PhantomJS
Introduction to PhantomJSIntroduction to PhantomJS
Introduction to PhantomJSErol Selitektay
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriverAnuraj S.L
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumDev9Com
 
Automated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and JenkinsAutomated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and JenkinsWork at Play
 
Robot Framework Dos And Don'ts
Robot Framework Dos And Don'tsRobot Framework Dos And Don'ts
Robot Framework Dos And Don'tsPekka Klärck
 

Viewers also liked (9)

Phantom js quick start
Phantom js quick startPhantom js quick start
Phantom js quick start
 
Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016Owning Web Performance with PhantomJS 2 - Fluent 2016
Owning Web Performance with PhantomJS 2 - Fluent 2016
 
Introduction to PhantomJS
Introduction to PhantomJSIntroduction to PhantomJS
Introduction to PhantomJS
 
An overview of selenium webdriver
An overview of selenium webdriverAn overview of selenium webdriver
An overview of selenium webdriver
 
Automated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and SeleniumAutomated Testing with Cucumber, PhantomJS and Selenium
Automated Testing with Cucumber, PhantomJS and Selenium
 
Automated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and JenkinsAutomated Testing With Jasmine, PhantomJS and Jenkins
Automated Testing With Jasmine, PhantomJS and Jenkins
 
Introduction to Selenium Web Driver
Introduction to Selenium Web DriverIntroduction to Selenium Web Driver
Introduction to Selenium Web Driver
 
Automation Testing by Selenium Web Driver
Automation Testing by Selenium Web DriverAutomation Testing by Selenium Web Driver
Automation Testing by Selenium Web Driver
 
Robot Framework Dos And Don'ts
Robot Framework Dos And Don'tsRobot Framework Dos And Don'ts
Robot Framework Dos And Don'ts
 

Similar to An introduction to PhantomJS: A headless browser for automation test.

Paper published on web application testing with sahi tool
Paper published on web application testing with sahi toolPaper published on web application testing with sahi tool
Paper published on web application testing with sahi toolLalit Choudhary
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentRandy Connolly
 
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Building Blocks
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet backdoor
 
Panther loves Symfony apps
Panther loves Symfony appsPanther loves Symfony apps
Panther loves Symfony appsSimone D'Amico
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaSandeep Tol
 
Latest Web development technologies 2021
 Latest Web development technologies 2021 Latest Web development technologies 2021
Latest Web development technologies 2021SWATHYSMOHAN
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development ToolsSofiaCarter4
 
Top 20 best automation testing tools
Top 20 best automation testing toolsTop 20 best automation testing tools
Top 20 best automation testing toolsQACraft
 
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...pCloudy
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To ChooseAlbiorix Technology
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web developmentMohammed Safwat
 
key performance metrics to track node.js applications
key performance metrics to track node.js applicationskey performance metrics to track node.js applications
key performance metrics to track node.js applicationsForceBolt
 
Headless browser a stepping stone towards developing smarter web applicatio...
Headless browser   a stepping stone towards developing smarter web applicatio...Headless browser   a stepping stone towards developing smarter web applicatio...
Headless browser a stepping stone towards developing smarter web applicatio...Bala Murugan
 

Similar to An introduction to PhantomJS: A headless browser for automation test. (20)

Paper published on web application testing with sahi tool
Paper published on web application testing with sahi toolPaper published on web application testing with sahi tool
Paper published on web application testing with sahi tool
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
 
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
Technical Tips: Visual Regression Testing and Environment Comparison with Bac...
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
 
Php Web Frameworks
Php Web FrameworksPhp Web Frameworks
Php Web Frameworks
 
Panther loves Symfony apps
Panther loves Symfony appsPanther loves Symfony apps
Panther loves Symfony apps
 
NodeJs Frameworks.pdf
NodeJs Frameworks.pdfNodeJs Frameworks.pdf
NodeJs Frameworks.pdf
 
Using HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in JavaUsing HttpWatch Plug-in with Selenium Automation in Java
Using HttpWatch Plug-in with Selenium Automation in Java
 
Latest Web development technologies 2021
 Latest Web development technologies 2021 Latest Web development technologies 2021
Latest Web development technologies 2021
 
Node.js Development Tools
 Node.js Development Tools Node.js Development Tools
Node.js Development Tools
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
Top 20 best automation testing tools
Top 20 best automation testing toolsTop 20 best automation testing tools
Top 20 best automation testing tools
 
Lamp Zend Security
Lamp Zend SecurityLamp Zend Security
Lamp Zend Security
 
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
Headless Browser – A Stepping Stone Towards Developing Smarter Web Applicatio...
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
 
Introduction to web development
Introduction to web developmentIntroduction to web development
Introduction to web development
 
key performance metrics to track node.js applications
key performance metrics to track node.js applicationskey performance metrics to track node.js applications
key performance metrics to track node.js applications
 
It and ej
It and ejIt and ej
It and ej
 
Headless browser a stepping stone towards developing smarter web applicatio...
Headless browser   a stepping stone towards developing smarter web applicatio...Headless browser   a stepping stone towards developing smarter web applicatio...
Headless browser a stepping stone towards developing smarter web applicatio...
 

More from BugRaptors

Performance Testing - A Catalyst In Software Testing Landscape
Performance Testing - A Catalyst In Software Testing LandscapePerformance Testing - A Catalyst In Software Testing Landscape
Performance Testing - A Catalyst In Software Testing LandscapeBugRaptors
 
13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design
13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design 13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design
13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design BugRaptors
 
Why Companies Need to Leverage ERP Testing Services?
Why Companies Need to Leverage ERP Testing Services?Why Companies Need to Leverage ERP Testing Services?
Why Companies Need to Leverage ERP Testing Services?BugRaptors
 
BFSI Testing Solutions - To Streamline BFSI Sector
BFSI Testing Solutions - To Streamline BFSI SectorBFSI Testing Solutions - To Streamline BFSI Sector
BFSI Testing Solutions - To Streamline BFSI SectorBugRaptors
 
Media Streaming App Testing - Knowing The Significance
Media Streaming App Testing - Knowing The SignificanceMedia Streaming App Testing - Knowing The Significance
Media Streaming App Testing - Knowing The SignificanceBugRaptors
 
Manual Testing - Developing A Quick Perspective
Manual Testing - Developing A Quick Perspective Manual Testing - Developing A Quick Perspective
Manual Testing - Developing A Quick Perspective BugRaptors
 
Regression Testing - An Overview
Regression Testing - An OverviewRegression Testing - An Overview
Regression Testing - An OverviewBugRaptors
 
Cloud Testing - Reinforcing Cloud Technology
Cloud Testing - Reinforcing Cloud TechnologyCloud Testing - Reinforcing Cloud Technology
Cloud Testing - Reinforcing Cloud TechnologyBugRaptors
 
Importance of Performance Testing.pptx
Importance of Performance Testing.pptxImportance of Performance Testing.pptx
Importance of Performance Testing.pptxBugRaptors
 
Media & Entertainment Testing Services –BugRaptors
Media & Entertainment Testing Services –BugRaptorsMedia & Entertainment Testing Services –BugRaptors
Media & Entertainment Testing Services –BugRaptorsBugRaptors
 
Usability Testing - Connect With Target Audience With Perfect UX
Usability Testing - Connect With Target Audience With Perfect UXUsability Testing - Connect With Target Audience With Perfect UX
Usability Testing - Connect With Target Audience With Perfect UXBugRaptors
 
Tips To Follow For A Simple QA Process
Tips To Follow For A Simple QA ProcessTips To Follow For A Simple QA Process
Tips To Follow For A Simple QA ProcessBugRaptors
 
CRM Testing Services - Ensure Smooth Functioning of Complex CRM Workflows
CRM Testing Services - Ensure Smooth Functioning of Complex CRM WorkflowsCRM Testing Services - Ensure Smooth Functioning of Complex CRM Workflows
CRM Testing Services - Ensure Smooth Functioning of Complex CRM WorkflowsBugRaptors
 
Test Automation - Everything You Need To Know
Test Automation - Everything You Need To KnowTest Automation - Everything You Need To Know
Test Automation - Everything You Need To KnowBugRaptors
 
Stress testing ERP frameworks
Stress testing ERP frameworksStress testing ERP frameworks
Stress testing ERP frameworksBugRaptors
 
Top 10 Automation Testing Tools
Top 10 Automation Testing ToolsTop 10 Automation Testing Tools
Top 10 Automation Testing ToolsBugRaptors
 
Software Testing Trends For 2021
Software Testing Trends For 2021Software Testing Trends For 2021
Software Testing Trends For 2021BugRaptors
 
Banking App Testing - To Evaluate Performance
Banking App Testing - To Evaluate PerformanceBanking App Testing - To Evaluate Performance
Banking App Testing - To Evaluate PerformanceBugRaptors
 
Test Automation Trends For 2021
Test Automation Trends For 2021Test Automation Trends For 2021
Test Automation Trends For 2021BugRaptors
 
ERP Testing Strategy For Large Scale Organizations
ERP Testing Strategy For Large Scale OrganizationsERP Testing Strategy For Large Scale Organizations
ERP Testing Strategy For Large Scale OrganizationsBugRaptors
 

More from BugRaptors (20)

Performance Testing - A Catalyst In Software Testing Landscape
Performance Testing - A Catalyst In Software Testing LandscapePerformance Testing - A Catalyst In Software Testing Landscape
Performance Testing - A Catalyst In Software Testing Landscape
 
13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design
13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design 13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design
13 Things To Keep In Mind For Enhanced Mobile App UI/UX Design
 
Why Companies Need to Leverage ERP Testing Services?
Why Companies Need to Leverage ERP Testing Services?Why Companies Need to Leverage ERP Testing Services?
Why Companies Need to Leverage ERP Testing Services?
 
BFSI Testing Solutions - To Streamline BFSI Sector
BFSI Testing Solutions - To Streamline BFSI SectorBFSI Testing Solutions - To Streamline BFSI Sector
BFSI Testing Solutions - To Streamline BFSI Sector
 
Media Streaming App Testing - Knowing The Significance
Media Streaming App Testing - Knowing The SignificanceMedia Streaming App Testing - Knowing The Significance
Media Streaming App Testing - Knowing The Significance
 
Manual Testing - Developing A Quick Perspective
Manual Testing - Developing A Quick Perspective Manual Testing - Developing A Quick Perspective
Manual Testing - Developing A Quick Perspective
 
Regression Testing - An Overview
Regression Testing - An OverviewRegression Testing - An Overview
Regression Testing - An Overview
 
Cloud Testing - Reinforcing Cloud Technology
Cloud Testing - Reinforcing Cloud TechnologyCloud Testing - Reinforcing Cloud Technology
Cloud Testing - Reinforcing Cloud Technology
 
Importance of Performance Testing.pptx
Importance of Performance Testing.pptxImportance of Performance Testing.pptx
Importance of Performance Testing.pptx
 
Media & Entertainment Testing Services –BugRaptors
Media & Entertainment Testing Services –BugRaptorsMedia & Entertainment Testing Services –BugRaptors
Media & Entertainment Testing Services –BugRaptors
 
Usability Testing - Connect With Target Audience With Perfect UX
Usability Testing - Connect With Target Audience With Perfect UXUsability Testing - Connect With Target Audience With Perfect UX
Usability Testing - Connect With Target Audience With Perfect UX
 
Tips To Follow For A Simple QA Process
Tips To Follow For A Simple QA ProcessTips To Follow For A Simple QA Process
Tips To Follow For A Simple QA Process
 
CRM Testing Services - Ensure Smooth Functioning of Complex CRM Workflows
CRM Testing Services - Ensure Smooth Functioning of Complex CRM WorkflowsCRM Testing Services - Ensure Smooth Functioning of Complex CRM Workflows
CRM Testing Services - Ensure Smooth Functioning of Complex CRM Workflows
 
Test Automation - Everything You Need To Know
Test Automation - Everything You Need To KnowTest Automation - Everything You Need To Know
Test Automation - Everything You Need To Know
 
Stress testing ERP frameworks
Stress testing ERP frameworksStress testing ERP frameworks
Stress testing ERP frameworks
 
Top 10 Automation Testing Tools
Top 10 Automation Testing ToolsTop 10 Automation Testing Tools
Top 10 Automation Testing Tools
 
Software Testing Trends For 2021
Software Testing Trends For 2021Software Testing Trends For 2021
Software Testing Trends For 2021
 
Banking App Testing - To Evaluate Performance
Banking App Testing - To Evaluate PerformanceBanking App Testing - To Evaluate Performance
Banking App Testing - To Evaluate Performance
 
Test Automation Trends For 2021
Test Automation Trends For 2021Test Automation Trends For 2021
Test Automation Trends For 2021
 
ERP Testing Strategy For Large Scale Organizations
ERP Testing Strategy For Large Scale OrganizationsERP Testing Strategy For Large Scale Organizations
ERP Testing Strategy For Large Scale Organizations
 

Recently uploaded

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Recently uploaded (20)

Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

An introduction to PhantomJS: A headless browser for automation test.

  • 1. An introduction to PhantomJS: A headless browser for automation test.
  • 2. A headless WebKit which offers native and quick support for a number of web standards. PhantomJS is scriptable with a JavaScript API and permits webpage capturing, pages manipulation, access to the file system and page settings. Also it contend with mobile Webkit, which supports touch events.
  • 3. Headless web testing with JavaScript PhantomJS has a whole set of features that testers love and use for many purposes. It is primarily used for a headless testing of web applications. PhantomJS fits for both as a part of a constant integration system and universal command-line based testing. It is important to recall that PhantomJS itself is not a testing framework, it is only engaged to launch the tests through a suitable test runner.
  • 4. It is a headless WebKit which means that it delivers the layout engine related to those that are used by Firefox, Safari, Chrome or other niche browsers. Basically PhantomJS is a browser itself where pages are never actually displayed even though it is a headless one. PhantomJS code targets at directing browser automation at high level. Many other widely used testing libraries can run on top of PhantomJS, even though it is not a testing library including Jasmine, Mocha, Capybara, WebDriver, QUnit, FuncUnit, YUI Test, BusterJS, Robot Framework etc. In state when the framework does not need an external runner, it is marked as "built-in".
  • 5. PhantomJS advantages are 1. Screen capture: Since PhantomJS uses a real rendering and layout engine, it can be used to seizure web contents, convert it not only in CSS and HTML but also into Canvas and SVG and build server-side web graphics apps from a screenshot service to a vector chart rasterizer. 2. Network monitoring: PhantomJS licenses the examination of network traffic and it is possible to automate track page loading, performance analysis and export as standard HAR format. 3. Page automation: It is quite easy to manipulate web pages and load with the with usual libraries like jQuery or with the standard DOM API.
  • 6. 4. Continuous Integration: Integration and Support with the CI systems (e.g. Jenkins and TeamCity) does not request for special setup since it is virtuously headless on Linux and the agent can run on an installation with any GUI which means that a barebone Linux system without X11 is not a problem for PhantomJS. It makes it likely to spawn light build agents on Heroku instances or Amazon EC2. 5. PhantomJS testing: Since it is possible to manipulate and access web pages with PhantomJS, it is appropriate to carry out various page automations. Furthermore, some projects are built on top of this WebKit so as to provide high-level functionality for testing purposes. For Example:- js(suitable to testing and build scripted navigation), WebSpecter (BDD-style acceptance test framework for web applications), Lotte (contains jQuery-like chaining, more assertion logic and methods). PhantomJS also comprises of run-jasmine and run-qunit in its example subdirectory. These lack important reporting features which are necessary for real-world uses and are for design purposes.
  • 7. Pros and cons of using PhantomJS instead of real browsers Pros: 1. Most of the people use PhantomJS to avoid additional overhaul with real browser and it's headless. 2. You can avoid Grid Hub relationship(or other similar mechanism) by running the tests on CI directly using this which is sometimes little messy to handle. 3. Runs multiple test cases faster in automation testing so run-time can be reduced by up to 50% for most tasks. 4. Best suited for smoke testing of applications. 5. It require lesser number of resources. 6. Able to run far more instances simultaneously than non-headless drivers.
  • 8. Cons: 1. There are large amount of pending issue in PhantomJS. 2. While UI and e2e testing are frequently used to imitate the user behavior PhantomJs does not exactly do that. 3. There are some cases where PhantomJS fails but other drivers work perfectly. 4. Hard to debug inconsistent failures on locating elements due to too fast page loading. 5. For non-headless drivers the code will not always work when the driver switches to HtmlUnit i.e. the switching between ChromeDriver and FirefoxDriver is usually consistent in success rate with same code, but same is not the case with HtmlUnit.