Automated E2E Test for a Commercial Angular Webapp
E2E testing on Narin web application
About the product
it’s an webapplication for managing and creating secure network
About E2E testing
The application uses angular, and to perform end-to-end tests we’re using protractor as tool which can be found by npm package management.
Full documentation from base and the whole performed procedure to run the test are provided on thisdocumentation. This will help you to install, run and have some optional features on protractor.
Test cases are besed on the scenarios which are available on thisgoogle doc. Details about this scenarios format is provided in
./scenarios/scenarios.mdfile. Raw scenarios are also available in docx files in
have the basic configuration to run the test.
directory that have all the specs and needed moudules
Directory that have all the basic module which are needed in different test cases
directory that have pageObject peer to any page on the website, each pageObject comes with elements and critical function in that page.
directory that contain which scenarios are handled, what are the stats and which format do the scenarios follow.
directory that holds the documentation of the E2E test project, documentation is accessible from the
every test run ended in result which will be kept in a directory by its run time, all of these test result are in this directory.
How these test are written
each test suite start with
testname.spec.jssaved under the
testnameshould indicate which page get tested by for example
objects->addressis to test the address page on the webApp.
due the page that is being tested, it need the matching page object that have all the page main elements and functions. page object should be import to the test files from the
page-objectdirectory. if the matching page object doesn’t exist, it should be created in the mentioned directory using
common elements and some global functions are available in
basic-modulesmodules. feel free to use them by importing to your test suite. some configuration for your test are in
enviromentVariablesmodule that you can modify.
set the desired protractor configuration in
protractor.conf.jsand then you’re good to go.
protractor is suppose to test angular web pages, but due to (maybe zone.js) problem protractor can’t find angular on the Narin webApllication so we turn the
waitForAngularEnabledoff by change its value
falsewhich basically turn the protractor main feature off, so we’re doing these test in a nonAngular manner and so many difficulty in angular rendering are expected.