Closed adiherzog closed 9 years ago
Removed the checks so that it is also possible to run the tests without Scenarioo documentation generation. Fixed in version 0.1.9.
Hi @adiherzog. I see the need for disabling docu generation.
But is this not already possible? your protractor configuration file is just javascript, why not evaluate a ENV variable in order to enable/disable scenarioo?
this would look something like this:
onPrepare: function () {
if (!process.env.DISABLE_SCENARIOO) {
require('jasmine-reporters');
var scenariooReporter = require('../lib/scenarioo-js')
.reporter('./scenariodocu', 'master', 'the master branch', 'build_' + new Date(), '1.0.0');
jasmine.getEnv().addReporter(scenariooReporter);
}
},
You're right, that's more or less what I'm doing (actually we just have two different protractor config files, one with and one without scenarioo enabled, see here: https://github.com/scenarioo/scenarioo/tree/develop/scenarioo-client).
The issue was, that there was a check in the saveUseCase / saveScenario / saveStep methods that checked for the scenarioo reporter to be initialized. So I removed this check in commit https://github.com/scenarioo/scenarioo-js/commit/b481d5f5ba3e5778ba1a3e4d5419377982eff9bd. I hope that's ok for you. Or do you propose another approach?
I fixed that on the current develop branch. Only saveStep is called even if scenarioo is disabled. So i re-added the checks in saveUsecase and saveScenario
Adrian Herzog notifications@github.com schrieb am So., 21. Feb. 2016 21:14:
You're right, that's more or less what I'm doing (actually we just have two different protractor config files, one with and one without scenarioo enabled, see here: https://github.com/scenarioo/scenarioo/tree/develop/scenarioo-client).
The issue was, that there was a check in the saveUseCase / saveScenario / saveStep methods that checked for the scenarioo reporter to be initialized. So I removed this check in commit b481d5f https://github.com/scenarioo/scenarioo-js/commit/b481d5f5ba3e5778ba1a3e4d5419377982eff9bd. I hope that's ok for you. Or do you propose another approach?
— Reply to this email directly or view it on GitHub https://github.com/scenarioo/scenarioo-js/issues/12#issuecomment-186904469 .
Currently
saveUseCase
,saveScenario
andsaveStep
all throw an exception if the Scenarioo reporter was not initialized. It should somehow be possible to run the e2e tests without generating the documentation.Probably it's best to introduce a flag that can be set in order to switch off documentation generation. This would allow for having only one protractor config file that can be used with or without Scenarioo data generation.