“testing nodejs, rest apis and mongodb with uft”c.ymcdn.com/sites/ · “testing nodejs, rest...

35
“Testing NodeJS, REST APIs and MongoDB with UFT” January 19, 2016

Upload: vutuong

Post on 28-Apr-2018

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

“Testing NodeJS, REST APIs and MongoDB with UFT”January 19, 2016

Page 2: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Brought to you by

Page 3: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Hosted By

Bernard P. Szymczak

Ohio Chapter Leader

HP Software Education SIG Leader

TQA SIG Leader

Page 4: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Today’s Speakers

Ori Bendet

Inbound Product Manager

Hewlett Packard Enterprise

Yossi Neeman

Technologies Group Leader-UFT

Hewlett Packard Enterprise

Page 5: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

• This “LIVE” session is being recorded

Recordings are available to all Vivit members

• Session Q&A:

Please type questions in the Questions Pane

Housekeeping

Page 6: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Webinar Control Panel

Toggle View Window between

Full screen/window mode.

Questions

Page 7: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Testing Complex Applications

Ori Bendet | Inbound Product Manager, UFTYossi Neeman | Technology Group Leader, UFT

Page 8: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Have a Question?

Tweet to @bendet_ori with #UFTWebinarduring the session and we’ll answer your question

Page 9: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Agenda

Market Dynamics & Trends

Complex Application Architecture

Pros & Cons of Testing at Each Level

Best Practices

Live Demo

The HPE Advantage

Page 10: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

The new style of IT

Mega-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/

Page 11: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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.)

Page 12: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Agenda

Market Dynamics & Trends

Complex Application Architecture

Pros & Cons of Testing at Each Level

Best Practices

Live Demo

The HPE Advantage

Page 13: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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

loginCheckout

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

Page 14: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

One level down

Complex Application Architecture

3rd Party

Service Layer

IoT Sensors

UI Layer

Storage Layer

Page 15: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Agenda

Market Dynamics & Trends

Complex Application Architecture

Pros & Cons of Testing at Each Level

Best Practices

Live Demo

The HPE Advantage

Page 16: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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

Page 17: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

What am I testing?

UI/Mobile

TECHNOLOGIES

SERVICE INTERFACE

Trading Rules Engines Reservations

HTML5 CSS3

REST SOAP JSON

JAVA WCF JMS

LogisticsFix/SwiftNGINX Telerik

NodeJS .NET

Page 18: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

APIs Today

70%

21%

5%

2%

2%

REST

SOAP

JavaScript

XML-RPC

Other

* Source: Programmableweb.com

Protocol Usage by APIs

Page 19: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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

• 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

Page 20: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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

• Still need to test the UI

• Testing without a business context

Pros Cons

Page 21: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Database Engine Ranking

Source: http://db-engines.com/en/ranking

Copyright © 2015 solid IT gmbh.

Page 22: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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

Page 23: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Agenda

Market Dynamics & Trends

Complex Application Architecture

Pros & Cons of Testing at Each Level

Best Practices

Live Demo

The HPE Advantage

Page 24: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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 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. “

Page 25: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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.

Page 26: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Agenda

Market Dynamics & Trends

Complex Application Architecture

Pros & Cons of Testing at Each Level

Best Practices

Live Demo

The HPE Advantage

Page 27: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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

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

Page 28: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Reduced Time To Market

Increased ROI

HPE Advantage

HPE Service

Virtualization

Benefit from advantages of each of the different layers together in one testing flow

Virtualize services that are not yet available to match the expected behavior of the real service

Make 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

Page 29: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Agenda

Market Dynamics & Trends

Complex Application Architecture

Pros & Cons of Testing at Each Level

Best Practices

Live Demo

The HPE Advantage

Page 30: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Live Demo

• UI testing

• API testing (REST APIs)

• MongoDB flow

• Complex flow

• Run the business flow using the API test

• Validate in the UI

Page 31: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Demo

Page 32: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Additional Resources

• HPE ‘All About the Apps’ blog: http://tinyurl.com/uft-blog

• UFT & LeanFT LinkedIn Group

More info

• UFT: https://saas.hpe.com/software/uft

Try us!

• UFT: Cross Browser Testing / Git Integration / Web2mobile

Movies

Page 33: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Q&A

33

Page 34: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

Thank you

Contact Us: [email protected]

Page 35: “Testing NodeJS, REST APIs and MongoDB with UFT”c.ymcdn.com/sites/ · “Testing NodeJS, REST APIs and MongoDB with UFT ... 2.5 million pieces of content shared Mobile ... •

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