Creating an E2E Test

If you are new to creating Unit Tests or E2E Tests, there are just a few things you need to know go get started.

In this exercise you will learn how to create an E2E test. For in-depth documentation on Jasmine and Protractor, please refer to the following sites.

Terminology

Here are some common functions you will use in your Protractor specs.
Function Description
describe(desc:String, closure:Function):void Describes a suite or a group of tests.
beforeAll(closure:Function):void Called once before any expects() within suite have been invoked.
afterAll(closure:Function):void Called once after all expects() within suite have been invoked
beforeEach(closure:Function):void Called before each expect() is invoked within suite.
afterEach(closure:Function):void Called after each expect() has been invoked within suite.
it(desc:String, closure:Function):void (required) Description of condition that will be used for test.
expect(condition:*):JasmineExpectation Condition used to determine if test has passed.
element(DOMElement):ProtractorElement A protractor eference to DOM element

Example Test

Below is a breakdown of an example spec.

Example Config

Below is a breakdown of an example config.