Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Latest commit

 

History

History
87 lines (60 loc) · 4.22 KB

migration.md

File metadata and controls

87 lines (60 loc) · 4.22 KB

Migration Guide

This is the migration guide for [email protected] bump from any previous release.

What is changed in Magellan@10

Magellan@10 has an significant architecture change, which not only includes changes in Magellan itself but also its plugins, reporters and the most important part, executors.

Executor is the new concept that we bring into Magellan in version 10.0.0.

What is an executor

  • Middle layer between magellan and test framework
  • Bridge to connect magellan and plugins

What can an executor do

  • Resolve profiles (env info, test info, capabilities for selenium test)
  • Patch setup and teardown event on the magellan test runner
  • Patch setup and teardown event on a magellan worker
  • Do some extra work in test's lifecycle
  • Communicate to a specific test env

What should I update to use Magellan@10

Dependencies

To update dependencies to correct versions, please follow the table below

Dependency Name Description Readme Is Required Minimum Version for Magellan@10
testarmada-magellan-local-executor run Nightwatch test in local link Yes ^1.0.0
testarmada-magellan-saucelabs-executor run Nightwatch test on saucelabs link Yes ^4.11.0
testarmada-magellan-nightwatch-plugin drive Nightwatch test run in Magellan link Yes ^6.0.0
testarmada-nightwatch-extra Nightwatch addon for extra commands and assertions link Yes ^4.0.0
testarmada-magellan-admiral-plugin Magellan reporter for Admiral link No ^3.0.0
testarmada-magellan-admiral2-plugin Magellan reporter for Admiral@2 link No ^3.0.0
testarmada-time-stats-reporter Magellan test execution time reporter link No ^2.0.0

Please note: Nightwatch-extra@4 also has breaking changes. Please refer to here for the migration guide of Nightwatch-extra@4.

Configuration files

In Magellan@10 you are free to choose executors (at lease one) per you need. You can tell which executor(s) will be in use by setting it(them) in magellan.json

"executors": [
    "testarmada-magellan-local-executor",
    "testarmada-magellan-saucelabs-executor"
]

Command line arguments

Since [email protected] magellan itself no longer read --browser or --browsers from command line. Instead the executor(s) you configured in magellan.json will do it.

--browser and --browsers will no longer be available for you to use. You'll need to run the following command to check how to pass the corresponding arguments into the executor(s) that you choose. Please follow the three-step template (We'll use magellan-local-executor for example, all executors are implemented in the similar way).

  1. ./node_modules/.bin/magellan --help

Magellan help gives you the command line arguments that executor wants.

Executor-specific (testarmada-magellan-local-executor)
   --local_browser=browsername          Run tests in chrome, firefox, etc (default: phantomjs).
   --local_browsers=b1,b2,..            Run multiple browsers in parallel.
   --local_list_browsers                List the available browsers configured.
  1. ./node_modules/.bin/magellan --xxx_list_browsers
./node_modules/.bin/magellan --local_list_browsers

[INFO] [Local Executor] Available browsers from file ./conf/nightwatch.json: phantomjs,safari,firefox,chrome,appiummweb

phantomjs,safari,firefox,chrome and appiummweb are supported

  1. Run it
./node_modules/.bin/magellan --local_browser chrome

or

./node_modules/.bin/magellan --local_browsers chrome,firefox