-
Notifications
You must be signed in to change notification settings - Fork 108
Running End to End Tests for Jazz UI
We use Protractor for running UI end-to-end tests. Protractor is an end-to-end test framework for Angular and AngularJS applications. Read more about Protractor here.
Protractor being a Node.js program can be installed easily using npm
. Follow these instructions to install it in your machine. Or, execute these commands locally.
npm install -g protractor
webdriver-manager update
webdriver-manager start
This will start up a Selenium Server locally. Your Protractor test will send requests to this server to control a local browser. You can see information about the status of the server here.
Jazz UI code is located in core/jazz_ui
folder. To get the code,
-
Clone jazz repository from Github
git clone https://github.com/tmobile/jazz.git
-
Go to the folder that contains angular code
cd jazz/core/jazz_ui
-
Install the dependencies for the project
npm install
Jazz comes with set of automation tests that you can run on your stack. They are located at jazz/core/jazz_ui/e2e
folder. You can add more tests to this location and have protractor run them as part of the test suite. Existing tests follow naming convention -spec.ts
, you can follow the same convention to run your new tests along with the existing test suite.
-
protractor.conf.js
: This configuration tells Protractor where your test files (specs) are, and where to talk to your Selenium Server (seleniumAddress). It will use the defaults for all other configuration. Chrome is the default browser. This can be located atjazz/core/jazz_ui/protractor.conf.js
in this project. -
configuration.ts
: This file contains Jazz specific configurations. Default (blank) template is provided already. This can be located atjazz/core/jazz_ui/src/config/configuration.ts
in this project. Update this file with information specific to your Jazz stack. Example below -e2e: { "EMAIL_ID": "", // Your email id - optional field "USER_NAME": "JazzAdmin", // Any registered username for Jazz application "PASSWORD": "", // Password for the username above "REG_USER_NAME": "", // Username to use for Jazz registration "REG_PASS_WORD": "", // Password to use for the username above "REG_CODE": "", // Jazz registration code to use "APPLN_URL": "" // Jazz Application Url }
You are all set! Run the test suite in the location - jazz/core/jazz_ui/
using the command below -
protractor protractor.conf.js
Create! Manage! Self-service!