full stack testing toshare - qualityworks consulting group€¦ · webdriver.io jasmine is a...

Post on 30-May-2020

8 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Full Stack Testing of Node.js Applications Presented by Stacy Kirk, QualityWorks Consulting Group and nodeqa.io

Dynamic, single, independent tests of methods, functions, and stand alone components

Unit Testing

Web services, database, contract, and APIAPI/Integration Testing

End-to-End Tests, Acceptance Tests, Performance, Functional, System, Regression, and Compatibility

Automated UI/Functional Tests

Usability, Look-and-Feel, Exploratory, UAT, and BetaManual User Acceptance Testing

The Full Stack of Testing

Ideal Testing Pyramid

Challenges of Test AutomationWe Need a Hero

TEST AUTOMATION

Tests are time-consuming

Hard to maintain/fragile

Unit tests are enough, right?

Not Reliable: Too many failures

Different tools, languages, process,& teams

Build

Integrate

Deploy

Dependency on Automated, Reliable, Maintainable Tests

Building for Continuous Delivery

TEST

Integrated Test Structure

Shared Test Data

Simplicity of Execution

git clone https://github.com/QualityWorksCG/qualityworks-full-stack-testing.git

Clone

npm install

npm test

01

02

03Runs full stack of tests, sending results to reporting dashboards, triggered through CI

Makes front end testing simple to start with clear test results and ease of Continuous Integration.

Nightwatch

Utilizing Selenium Driver’s API, it is a top contender especially when coupled with Appium for mobile front end testing in JavaScript

Webdriver.io

Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks.

Jasmine

Headless webkit for scripting web browser testing. Leveraged with Casper for browser navigation.

PhantomJS

One of the newest and most promising test frameworks. Feature rich functionality including unit testing, code coverage, and mobile/browser testing.

Intern.io

Karma is a test runner for JavaScript that runs on Node.js. It is very well suited to testing AngularJS.

Karma

REST API testing framework offering a BDD testing style and fully exploiting promises.

Chakram

Mocha is a feature-rich JavaScript test framework running on Node.js making synchronous and asynchronous testing simple and fun.

Mocha

Node.js CI/CD test reporting dashboard that provides executive and detailed test results in one clean view.

QualityWatcher.io

FE FE FE

FE TF TF

TF TF==

R

Identify Your Tools

TF- Test Framework FE- Front End Test Tool R- Reporter

Simple API Test

Mocha

Chakram

JSON Schema and Value Assertion

Custom Methods with Chakram

form-data

vMocha Chakram

Data Driven API Tests

data-driven

Chakram

Page Object Design Pattern

Separation of test code from page specific code

Low maintenance

Increase reusability

Better test readability

Design UI for Automation

#welcome-toolbar a.new-offer

table tbody tr:nth-child(1) td:nth-child(1) table tbody tr:nth-child(1) td:nth-child(4) div span

#dashboard-table div.offer-data span

//div[contains(@id,’editcampaign')]/div[starts-with(@id,'toolbar')]/div[starts-with(@id,'toolbar')]/div[starts-with(@id,'toolbar')]/a[starts-with(@id,'button')][1]

FirePath

Firebug

Technologies

Front End Web Testing CheatSheet

Nightwatch.js

Simple Front End Web Test

Nightwatch.js

Data Driven Front End Test

Nightwatch.js

Automated Front End Mobile Testing

WebdriverIO

Appium

Cheatsheet

Simple Front End Mobile Test

WebdriverIO

Appium

Mobile & Web Cloud Testing

Saucelabs

Value of Reporting

QualityWatcher

Detailed Reporting

QualityWatcher

Integrate Continuous Performance Testing

npm run performance

QualityMeter

Phantomas

QualityMeter

Track performance over time

Continous Test

Execution

ID, Class Names, Labels

Embrace Failures

Leverage Page Objects

Historical Dashboard

Recommendations

Integrate App Code and

Tests

@queenofagileqa

Github: QualityWorksCG/qualityworks-full-stack-testing

skirk@nodeqa.io

www.qualityworkscg.com

top related