End to End application testing

We talk about JavaScript. Each month in Warsaw, Poland.

End to End application testing

Robert Gurgul@rgurgul

Testing internet Application (E2E)

What we test with E2E?

Advantages of automated tests

Disadvantages of automated tests




How does it work in practice?

The tools we will use




Here we go!

Setup

  1. Use npm to install Protractor globally with:
    npm install -g protractor
  2. The webdriver-manager is a helper tool to get an instance of a Selenium Server running
    webdriver-manager update
  3. Now start up a server with:
    webdriver-manager start

Protractor needs two files to run




Protractor configuration file



Jasmine syntax





more complex test




Debugging

Protractor tools

browser is a global created by Protractor, which is used for browser-level commands such as navigation with browser.get
  • browser.pause();
  • browser.sleep(10000);
  • console.log(el);

Elementor

Elementor lets you test Protractor selectors from your browser and IDE. You can enter a protractor locator or expression and elementor will test it against a live protractor instance.

Screenshots

Useful links:

Thanks and see you next month at WarsawJS

Fork me on Github