In this world of asynchronicity, where it is easy to build applications using single page application frameworks, people struggle at the writing functional tests for such applications.

Understanding this asynchronous nature of newer tools and frameworks needs efforts. In this talk we will talk about our journey from writing test with callback (hell) to using Promises and finally achieving nirvana with the power of async/await in JavaScript.

This is a time travel of asynchronous programming and where does the future lie. The discussion will include:

  • Callbacks and their nested nature
  • Removing callbacks with Promises
  • And migrating to async/await


Outline/Structure of the Talk

The session will cover the following aspects:

  • Efficient way to write functional tests for asynchronous applications
  • How to manage asynchronous operations in your tests
  • How to handle errors in asynchronous operations
  • Writing and debugging tests using async/await

Learning Outcome

Learning from my experiments (what worked, or didn’t):

  • Understanding problems with callbacks and how to handle nested callbacks
  • Better way to manage callbacks
  • Approach to migrate to async/await

Though not directly intended, but we will also share some practices to make your automation code more readable.

Target Audience

Developers, Testers, Test Managers

schedule Submitted 4 years ago

Public Feedback

    • Sanjay Kumar

      Sanjay Kumar - ChroPath - a smarter way to get locators and verify them.

      Sanjay Kumar
      Sanjay Kumar
      ChroPath Creator
      schedule 4 years ago
      Sold Out!
      20 Mins

      still writing relative xpath manually ?

      Do you want to save 20-30% time of automation script writing ?

      Feeling frustrated while writing unique locators ?

      looking for firepath replacement ?

    • Smriti Tuteja

      Smriti Tuteja / Krunal Patel - Join the Night's Watch

      45 Mins

      As ReactJS is overpowering AngularJS as the go-to framework for front end development, testers tend to find the best tool which suits all of their needs in the javascript world.

      Join this talk to learn about "Why and How to use the Power of NightWatch" as compared to other existing popular automation frameworks in the testing industry today such as Protractor, CasperJS :

      • how NightWatch makes test code highly transparent and readable
      • how NightWatch adds layer of abstraction separating the HTML selectors from the page objects, thus, enabling reuse and promoting general tidiness in comparison to other testing tools
      • how running tests against specific browsers/environments in parallel is relatively easy with NightWatch
      • how it solves the problem of tests re-write (say login for use in multiple cases)
      • how you can extend/enhance your tests using custom commands, custom assertions and custom reporters
      • how you can automate mobile apps integrating NightWatch with Appium
    • Smriti Tuteja

      Smriti Tuteja - Migrate to Headless Chrome with Protractor

      Smriti Tuteja
      Smriti Tuteja
      Sr. Consultant
      schedule 4 years ago
      Sold Out!
      20 Mins
      Experience Report

      In this era of automation where everyone is focused on Agile and DevOps, learn how you can migrate from xvfb (X virtual framebuffer which enabled you to run browser tests without a display on a CI server) to Headless Chrome while you use Protractor.
      Attend this talk to understand how I migrated to headless chrome and the pain points. The discussion will include:

      • things you can take care of when migrating
      • checking versions compatibility for migration
      • things you will need to fix