gogreenkmfk.blogg.se

Free download puppeteer documentation
Free download puppeteer documentation




free download puppeteer documentation

Basically it is a web scraper based on Chromium. In particular, to perform e2e tests, a fairly recent tool, Puppeteer, comes to the rescue. To test javascript code, one of the most common frameworks for assertions is Jest, which allows you to perform all kinds of comparisons for your functions and code, and even testing React components. Here it is a nice article talking about what e2e tests are and their importance. They test from the front-end to the back-end, treating the application as a whole and simulating real case scenarios. Tha means testing that the outcome, behavior or data presented from the application is as expected for a given user interaction with it. In this article we are gonna talk about yet another type of tests, the End-To-End (e2e) tests.Įnd-to-end tests are great in order to test the whole application as a user perspective. There are many types of test, from Unit tests where you test the individual components that compound your application, to Integration tests where you test how these components interact with eachother.

free download puppeteer documentation

So you got your wonderful web application up and running, and the time for testing has come. We will learn how to automate user action on the browser, wait for the server to return data and for our application to process and render it, to actually retrieving information from the website and comparing it to the data to see if our application actually works as expected for a given user action. In this article we present an overview on how to deal with asynchrony when performing end-to-end tests, using Puppeteer as a web scraper and Jest as an assertion library.






Free download puppeteer documentation