This migration guide explains how to upgrade major versions of ScenariooJS.
This section explains how to switch from ScenariooJS 3.x to ScenariooJS 4.x
ScenariooJS is no longer using WebDriver Control Flow. This means you should set SELENIUM_PROMISE_MANAGER
to 0
in your protractor config file.
For a complete example where SELENIUM_PROMISE_MANAGER
has been configured correctly, see Example protractor.conf.js
This section explains how to switch from ScenariooJS 1.x to ScenariooJS 2.x
Version 2.x of scenarioo-js will depend on jasmine 2. jasmine 1.x support will be dropped. Check the Examples for a working example.
The configuration of the reporter has become more easier and has to be changed accordingly in the preparation code of your end-2-end tests.
The scenarioo.reporter
is not available anymore. Instead you just have to call the setup function scenarioo.setupJasmineReporter
to setup the reporter for you with jasmine 2.
See documentation above for Configuration
to see how this works now.
The scenarioo.describeScenario
and scenarioo.describeUseCase
functions are not defined anymore out of the box,
and have either to be replaced by pure jasmine, a custom written DSL or by one of the out of the box provided DSLs.
We recommend to use the new Fluent DSL
or your own defined Application-Specific DSL
but for a fast migration it might be most easy to use the Backwards DSL
, that is provided only for fast migration.
Using Backwards DSL you can use the same old functions, that you had in ScenariooJS 0.x and 1.x.
The Backwards DSL
can be activated as follows:
// call this in your protractor onPrepare code to activate backwards DSL functions
scenarioo.setupBackwardsDsl();
This brings you the old 1.x style DSL with describeUseCase
and describeScenario
functions back, for easier migration
(with or without scenarioo.
in front, both works).
You can then later migrate those tests to the new Fluent DSL
or even your own defined DSL or the pure vanilla jasmine 2 syntax.
We recommend to have a look at the new Examples to see what style fits best for your project.
The "saveStep" function is now directly exposed on scenarioo:
scenarioo.describeUseCase('Example Usecase', function () {
scenarioo.describeScenario('Example Scenario ', function () {
scenarioo.saveStep('start'); // instead of scenarioo.docuWriter.saveStep
});
});