This is the migration guide for [email protected] bump from any previous release.
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.
- Middle layer between magellan and test framework
- Bridge to connect magellan and plugins
- 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
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
.
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"
]
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).
./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.
./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
- Run it
./node_modules/.bin/magellan --local_browser chrome
or
./node_modules/.bin/magellan --local_browsers chrome,firefox