QA Automation using JavaScript, Nightwatch.js and TestArmada
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
conf
drydock
lib
tests
README.md
_travis.yml
magellan.json
package-lock.json
package.json
tunnel.json

README.md

Testony Test Automation Project

This project was created from the boilerplate-nightwatch

Prerequisites

Check that you have at least npm version 3 or above (required by appium@1.6.x):

npm --version

If not, run:

npm install -g npm@3

Install and Run

Installation

1. Clone qa-testony into an isolated place outside of your project:

cd ~
git clone git@github.com:socialsweetheartsgmbh/qa-testony.git
cd qa-testony

2. Install npm modules

npm install

Export following variables for Browserstack

export BROWSERSTACK_USER=<your-user-name>
export BROWSERSTACK_ACCESS_KEY=<your-api-key>

Test environment and Quiz variables

export TESTONY_PROTOCOL=<http|https>
export TESTONY_LANG=<en|fr|..>
export TESTONY_TEST_ENV=testony.com

These environment variables are not mandatory, the test has a default one.

Run with npm

npm test

Run with more options

Local

  1. Chrome
DPRO=local ./node_modules/.bin/magellan --local_browser chrome --test tests/play-quiz.js --serial
  1. Firefox
DPRO=local ./node_modules/.bin/magellan --local_browser firefox --test tests/play-quiz.js --serial
  1. Appium

iOS

PLEASE NOTE To run test with iOS, Xcode and correct version of iOS simulator have to be installed.

DPRO=local ./node_modules/.bin/magellan --local_browser appiummweb --test tests/play-quiz.js --serial

Android

PLEASE NOTE To run test with Android, Android SDK, AVD and currect version of emulator have to be installed and created.

ANDROID_OPEN_URL=http://10.0.2.2 DPRO=local ./node_modules/.bin/magellan --local_browser appiumandroidmweb --test tests/play-quiz.js --serial

Browserstack

This is to run magellan with Magellan-browserstack-executor

Help

1. Magellan help

All magellan command line arguments, together with its plugin's and executors', can be found by.

./node_modules/.bin/magellan --help

2. Plugin help

Command line arguments for plugin could be found by scanning Framework-specific keyward in magellan help output.

Help from testarmada-magellan-nightwatch-plugin

Framework-specific (testarmada-magellan-nightwatch-plugin)
   --tags=tag1,tag2                     Run all tests that match a list of comma-delimited tags (eg: tag1,tag2)
   --group=prefix/path                  Run all tests that match a path prefix like ./tests/smoke
   --test=path/to/test.js               Run one test with a path like ./tests/smoke/test2.js
   --nightwatch_config=path             Specify nightwatch.json location (magellan-nightwatch)
   --sync_browsers=safari:10,chrome:54  Specify which browser will run in sync mode for javascript execution

You can also implement your own plugin in order to make magellan talk to more test frameworks. Find more here to implement your own magellan plugin

Configuration

Magellan reads from both command line arguments and magellan.json. Please refer to help section to get the full list of magellan command line arguments.

Please use ./magellan.json as example to customize your magellan.json.