Skip to content

fadc80/heroes-gauge-e2e

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tour of Heroes Gauge E2E Tests

This project ilustrates how to create E2E tests for Angular applications using Gauge. As most developers are familiar with the Tour of Heroes example, it was chosen to be the application under test.

In this repository you're going to find two folders:

  • heroes - Tour of Heroes
  • gauge - Gauge Project

Start running the E2E tests provided by the Gauge Project (see instructions below), then visit our wiki to learn how it works.

Requirements

Install Gauge

Follow Gauge Get Started instructions to install it.

Additionally, install js plugin:

gauge install js

Checkout repository

cd <INSTALL-FOLDER>
git clone https://github.com/fadc80/heroes-gauge-e2e.git

Run Tour of Heroes

cd <INSTALL-FOLDER>/heroes-gauge-e2e/heroes
npm install
npm start

Keep it running...

Run Gauge Project

cd <INSTALL-FOLDER>/heroes-gauge-e2e/gauge
npm install
npm run webdriver:update
npm run gauge:all

The output should look like this:

# Dashboard Heroes Search
  ## Scenario 1: Search Matching no Heroes       ✔ ✔ ✔ ✔
  ## Scenario 2: Search Matching one Hero        ✔ ✔ ✔ ✔
  ## Scenario 3: Search Matching Multiple Heroes        ✔ ✔ ✔ ✔ ✔ ✔ ✔

# List of Heroes
  ## Scenario 1: Add a new hero  ✔ ✔ ✔ ✔ ✔ ✔ ✔
  ## Scenario 2: Delete a hero   ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

Specifications: 2 executed      2 passed        0 failed        0 skipped
Scenarios:      5 executed      5 passed        0 failed        0 skipped

Total time taken: 21.278s

Actually, this output is produced twice because tests are run through Chrome and Firefox.

Check Generated Reports

Open Chrome and Firefox test results.

They are stored on the reports folder:  

gauge/reports/chrome/html-reporter/index.html
Quick preview

gauge/reports/firefox/html-reporter/index.html
Quick preview

That's all!