Testing NodeJS, REST APIs and MongoDB with UFT
-
Upload
ori-bendet -
Category
Software
-
view
189 -
download
1
Transcript of Testing NodeJS, REST APIs and MongoDB with UFT
“Testing NodeJS, REST APIs and MongoDB with UFT”January 19, 2016
Brought to you by
Hosted By
Bernard P. SzymczakOhio Chapter Leader
HP Software Education SIG LeaderTQA SIG Leader
Today’s Speakers
Ori BendetInbound Product Manager
Hewlett Packard Enterprise
Yossi NeemanTechnologies Group Leader-UFT
Hewlett Packard Enterprise
• This “LIVE” session is being recorded Recordings are available to all Vivit members
• Session Q&A: Please type questions in the Questions Pane
Housekeeping
Webinar Control Panel
Toggle View Window between Full screen/window mode.
Questions
Testing Complex Applications
Ori Bendet | Inbound Product Manager, UFTYossi Neeman | Technology Group Leader, UFT
Testing NodeJS, REST APIs and MongoDB with UFT
Have a Question?Tweet to @bendet_ori with #UFTWebinarduring the session and we’ll answer your question
Agenda
Market Dynamics & Trends
Complex Application Architecture
Pros & Cons of Testing at Each Level
Best Practices
Live Demo
The HPE Advantage
The new style of ITMega-trends create demands on modern applications
MODERN APPLICATION DEVELOPMENT
Reduce costs
Increase customer attraction/retention
Increase the value of your brand
Get to market faster
300,000tweets
200 million+emails sent
220,000new photos posted
50,000 appsdownloaded
$80,000in online sales
72 hoursof new video content uploaded
2.5 millionpieces of content shared
Mobile
Agile
Dev Ops
Cloud
Every minute*…
* Source: “The Data Explosion in 2014 Minute-by-Minute” by ACI Information Group.http://aci.info/2014/07/12/the-data-explosion-in-2014-minute-by-minute-infographic/
Today’s Testing Challenges
• Need to test as early in the cycle as possible
• Execution time is critical: tests must run as part of the CI/CD
• Multiple platforms, devices, languages, etc.
• Shorter than ever stabilization time (if any at all)
• Applications are becoming more complex and fragmented than ever• User Experience (UX) expectations have raised – users expect nothing less than
perfection• Increased usage of 3rd party integrations (Twitter, Facebook, PayPal, AWS, etc.)
Agenda
Market Dynamics & Trends
Complex Application Architecture
Pros & Cons of Testing at Each Level
Best Practices
Live Demo
The HPE Advantage
Database activity
Security validation
Inventory query
Database activity
3rd party ship
service
Logistical services
Acc’t info
3rd party database
3rd party reporting
Security validation
3rd party payment services
Account authorization
Shopping app(web or mobile)
Purchase
receivedAdd to cart
Shipping detail
Delivery tracking
Customer login Checkou
t
A Retailer Real-Life ScenarioA Modern, Complex Architecture User’s
geographical location?
User type?
Env type?(Mobile, Web, OS,
Browser)
Service availability and
cost?Single vs. Multiple?
Network connection
type?
Data saved accurately?
Is it secure?
Does it work?
Functional
Development
USE CASE:
Performance
DevOps
Security
Mobile
Quit Scenario
One level downComplex Application Architecture
3rd Party
Service Layer
IoT Sensors
UI Layer
REST APIs Web
Services
JS XML-RPC
Storage Layer
Agenda
Market Dynamics & Trends
Complex Application Architecture
Pros & Cons of Testing at Each Level
Best Practices
Live Demo
The HPE Advantage
UI Testing
Pros• Tests the actual interface as the real user• Covers Business Flows• Can be easily covered in manual testing• Automate once, run all the time• Covers application areas that don’t have unit
tests• Detects differences in behavior between
platforms
Cons• UI Stability: usually stabilized late in the cycle• Maintaining UI objects in case of change• Increased support matrix
• OSs, browsers• Mobile: devices, platforms
• Execution time longer compared to API testing
What am I testing?
UI/Mobile
TECHNOLOGIES
SERVICE INTERFACE
Trading Rules Engines Reservations
HTML5 CSS3
REST SOAP JSON
JAVA WCF JMSLogisticsFix/SwiftNGINX Telerik
NodeJS .NET
APIs Today
70%
21%
5%
2%
2%
RESTSOAPJavaScriptXML-RPCOther
* Source: Programmableweb.com
Protocol Usage by APIs
APIs, Micro-Services, IoT, Sensors, Beacons, etc.UI-less Testing is on the Rise
• Teams are required to test early in the cycle, when the UI is not ready• 20% want to involve testers earlier (World Quality Report 2015)• Public APIs (and the API business model) are being exposed as part of the
product offering• Raise of 53% in Public APIs available since 2013 (programmableweb.com)
• Your front-end may be a device with no monitor• Single-page apps• APIs will become the actual product• IoT, computing everywhere
Today
Tomorrow
API Testing
• Can be done earlier in the cycle• Early feedback for the core business logic• More stable than the UI• Same services can be used across all devices and
platforms. Device specific tests can be completed later.
• Runs faster than UI tests• Can be used for quick data population • Tests & validates functionality that might not be
exposed in the UI
Cons• Requires a more technical skill set • Harder to build the business flow• Testing without a business context• Still need to test the UI
Pros Cons
Database Engine Ranking
Source: http://db-engines.com/en/rankingCopyright © 2015 solid IT gmbh.
Database Testing
• Data is an important asset in the system• Some code (functions, procedures) is stored and
run in the database itself• Populate your databases as part of your tests• Easily extract tokens and information to be used
in UI testing
• Scripting, query, and DB specific skills are needed• Testing without a business context• Harder to build the business flow• Databases are not always accessible • NoSQL databases are more complicated to access
Pros Cons
Agenda
Market Dynamics & Trends
Complex Application Architecture
Pros & Cons of Testing at Each Level
Best Practices
Live Demo
The HPE Advantage
The Forrester Wave™: Modern Application Functional Test Automation Tools, Q2 2015
by Diego Lo Giudice, April 17, 2015
“Target 80% Functional Test Automation and 20% manual testing.
To reach around 80% of FTA, Agile teams test at the API level. ……Ratchet down UI test automation in favor of API test automation. Modern applications require a shift of the current 80% UI automation down to 5% to 10% approximately, shifting about 80% of that test automation to be replaced by API test automation. “
Our Own Best Practices
• Focus on API testing early in the cycle. Complete the UI coverage only when it is stabilized.
• Don’t work on an “empty” system. Populate it using your DB and APIs.• Each test should be independent of other tests (for parallelism, easier
investigation, etc.). • Use the APIs as the test setup and continue with the UI for the core
functionality test only.• Run your tests as part of your CI/CD process: the entire suite should run for
no more than a couple of minutes, preferably API testing only, and provide core functionally feedback.
• Run your complete suits as part of the nightly build.
Agenda
Market Dynamics & Trends
Complex Application Architecture
Pros & Cons of Testing at Each Level
Best Practices
Live Demo
The HPE Advantage
HPE continuous to be the leader in software test automation!
“Hewlett Packard Enterprise continues as the overall market share leader, and has worked to expand its breadth of coverage to deal with agile practices and mobile application delivery. Organizations should consider HPE if they seek a comprehensive portfolio of integrated products with broad technology and community support, covering packaged applications, client/server, mobile and web applications for functional testing.”- Gartner
Reduced Time To Market
Increased ROI
HPE Advantage
HPE Service Virtualization
Benefit from advantages of each of the different layers together in one testing flowVirtualize services that are not yet available to match the expected behavior of the real serviceMake sure your application functions under real world conditions too
Seamless integration to HPE’s Mobile Center
The complete, industry-standard solution for automation of web, mobile, API & packaged apps
Easily combine UI/API/DB tests in one flow
Over 30 different technologies
Extend your tests into the mobile world
HPE Network Virtualization
Agenda
Market Dynamics & Trends
Complex Application Architecture
Pros & Cons of Testing at Each Level
Best Practices
Live Demo
The HPE Advantage
Live Demo
• UI testing• API testing (REST APIs)• MongoDB flow• Complex flow
• Run the business flow using the API test• Validate in the UI
Demo
Additional Resources
• HPE ‘All About the Apps’ blog: http://tinyurl.com/uft-blog • “HPE Functional Testing Solutions” on LinkedIn: https://
www.linkedin.com/groups/55772
Social
• UFT: https://saas.hpe.com/software/uftTry us!
• UFT: Cross Browser Testing / Git Integration / Web2mobile
Our channel: https://www.youtube.com/user/HewlettPackardVideos
33
Q&A
HP Confidential – Do Not Distribute
Thank you • Complete the short survey and opt-in for more information from
Hewlett Packard Enterprise.www.hpe.com
www.vivit-worldwide.org