Skip to content

Latest commit

 

History

History
118 lines (90 loc) · 5.97 KB

File metadata and controls

118 lines (90 loc) · 5.97 KB

shieldsIO shieldsIO shieldsIO

WideImg

Máster en Programación FullStack con JavaScript y Node.js

JS, Node.js, Frontend, Backend, Firebase, Express, Patrones, HTML5_APIs, Asincronía, Websockets, Testing

Clase 88

End To End (E2E) con Nodejs

IMG

Librerías Clásicas

  • WebDriverJs - WebDriverJs is the Official javascript implementation of selenium. It uses to Selenium’s Json-wire-protocol to interact with browser. It is written by selenium guys.
  • WebdriverIO - Webdriver IO is a selenium wrapper written in javascript and runs on node.js. It is a custom implementation of W3C webdriver protocol.
  • Protractor - Protractor is an End-to-End test framework for Angular Js applications. It is packaged under npm and runs on NodeJs.
  • Nightwatch.js - Nightwatch.js is a Node.js based End-to-End (E2E) testing solution. It uses the powerful W3C WebDriver API to perform actions on DOM elements.
  • Dalek.js - Automated cross browser testing with JavaScript
  • Nemo - Launch your web sites & applications with confidence
  • TestCafe - A node.js tool to automate end-to-end web testing
  • Nightmare - A high-level browser automation library.
  • Hermione - Browser test runner based on mocha and wdio
  • Chromeless - 🖥 Chrome automation made simple. Runs locally or headless on AWS Lambda.
  • Chrominator - high level api to the chrome remote debugger
  • Chromy - Chromy is a library for operating headless chrome. 🍺🍺🍺
  • Navalia - A bullet-proof, fast, and reliable headless browser API
  • Lambdium - headless chrome + selenium webdriver in AWS Lambda using the serverless application model
  • GhostJS - ghostjs provides modern UI testing with async functions
  • CasperJS - Navigation scripting & testing for PhantomJS and SlimerJS
  • Cypress.io - Fast, easy and reliable testing for anything that runs in a browser.

Recursos

La revolución

img

Uso soluciones clásicas (Selenium, etc...)?

  • Necesito testear en más de un navegador
  • Necesito testear en un único navegador pero no es Chrome

Uso Puppeteer?

Otros Test con Nodejs

Librerias y utlilidades

  • Supertest - Super-agent driven library for testing node.js HTTP servers using a fluent API
  • Faker.js - generate massive amounts of fake data in Node.js and the browser
  • Frisby - The Easiest REST API Testing Framework Out There
  • Gemini - Gemini is a utility for regression testing the visual appearance of web pages.
  • Gremlins.js - Monkey testing library for web apps and Node.js
  • Mailosaur - Mailosaur Node.js Client Library
  • Differencify - Differencify is a library for visual regression testing
  • CodeceptJS - Modern era acceptance testing for Nodejs

Benchmarking

img

Librerias

  • Benchmark.js - Benchmarking library that supports high-resolution timers and returns statistically significant results.
  • matcha - Simplistic approach to benchmarking.

Ejemplo

const suite = new Benchmark.Suite;

// add tests
suite.add('RegExp#test', () => {
  /o/.test('Hello World!');
})
.add('String#indexOf', () => {
  'Hello World!'.includes('o');
})
.add('String#match', () => {
  !!'Hello World!'.match(/o/);
})
// add listeners
.on('cycle', event => {
  console.log(String(event.target));
})
.on('complete', function() {
  console.log(`Fastest is ${this.filter('fastest').pluck('name')}`);
})
// run async
.run({ 'async': true });

Mobile test automation

IMG

Librerías

UI test automation

IMG

Librerías

Ejercicio

1 - Inspecciona el código detras de tastejs/todomvc/tree/master/tests para entender como testear todas las apps de TODOMVC.