End to End Testing Single Page Apps & APIs with Cucumber.js and Puppeteer - LNUG - April 2018

Sdílet
Vložit
  • čas přidán 22. 08. 2024
  • End-to-end testing Single Page Apps and APIs with Cucumber.js & Puppeteer
    Paul Jensen
    Developing web applications as separate front end and back end parts is a common practice, but brings with it the challenge of how to test those parts together in an end-to-end fashion.
    In this talk, I will show you a strategy for being able to test your web application with Cucumber.js and Puppeteer, a library for running Google Chrome in headless mode. We'll also explore how to handle things like seeding the database for the API before running tests, how to select elements in the DOM via Cucumber step definitions, and how to do this in a nice fashion using Node 8's async/await feature.
    My name is Paul Jensen, I'm the author of Manning's Cross Platform Desktop Applications, and I'm the Lead Innovation Engineer at Starcount. My twitter handle is paulbjensen.

Komentáře • 12

  • @arturmuradov3740
    @arturmuradov3740 Před 4 lety +2

    still relevant in 2020. Thank you so much!

    • @pauljensen9511
      @pauljensen9511 Před 4 lety +1

      Glad you liked it - I've been using Cucumber since 2010 and it feels like one of those technologies that will stand the test of time whilst tech stacks change - ask anyone who used to use jQuery back then and now uses React.

  • @jasonellington2157
    @jasonellington2157 Před 6 lety +13

    is there a repo where you implemented cucumber and puppeteer available?

    • @pauljensen9511
      @pauljensen9511 Před 4 lety +1

      @@saurabhkapoor16 That's the one. Thanks for sharing that.

  • @Epro95
    @Epro95 Před 5 lety +2

    Puppeteer now supports firefox (experimental)
    Works well in all of my tests

    • @pauljensen9511
      @pauljensen9511 Před 4 lety

      I will have to give that a try - also want to give Playwright a spin as well.

  • @szarkul
    @szarkul Před 2 lety

    I cannot find part related to API...

  • @jonyzhu6531
    @jonyzhu6531 Před 4 lety +1

    The presumption of the "Product Guy" has a clear mind doesn't exit. The GAP is not between users or product manages with the developers, IT IS the users or product managers themselves: no clear ideas. This is not a complain, just telling the truth of the real world.

    • @pauljensen9511
      @pauljensen9511 Před 4 lety +1

      I know exactly what you mean - good product managers talk to real potential customers and test out ideas with them via prototypes, whereas some startup types tend to just make assumptions about what customers want and then blame sales reps when the product that was built doesn't sell (I saw that first-hand at a previous company).
      Some good books that can help avoid these problems are Eric Ries' "The Lean Startup" (a well-known and highly-regarded book), and "Customers Included" by Mark Hurst - which has an jaw-dropping tale of an expensive and wasteful approach to monitoring the US-Mexico border on the state of Arizona, and demonstrates the importance of talking to customers.

  • @jitenderchand656
    @jitenderchand656 Před 5 lety

    Multiple scenario on single feature file?

    • @pauljensen9511
      @pauljensen9511 Před 4 lety

      Yes, I tend to group a set of scenarios for a particular user flow in one file. That particular project (Dashku) currently has 79 scenarios, so it helps to group related scenarios.