igniteram / protractor-cucumber-allure Goto Github PK
View Code? Open in Web Editor NEWe2e kickstarter framework for using protractorJS with cucumberJS and allure jenkins CI reports
License: MIT License
e2e kickstarter framework for using protractorJS with cucumberJS and allure jenkins CI reports
License: MIT License
When tried to run tests in parallel via multiConfig.js, 4 instances are launched with console message "I/launcher - Running 4 instances of WebDriver" and protractor execution hangs indefinitely.
Node: v8.11.2
npm: 5.6.0
Please add support for cucumberjs-allure2-reporter as allure2 reports are compatible with cucmberjs versions till 4.2.1
The report is not generated as it is trying to read to cucumber JSON report being generated!
I upgraded to below
"cucumber": "^2.0.0",
"protractor": "^5.0.0",
"protractor-cucumber-framework": "^2.0.0"
and tests now break with error below
Unhandled rejection Error: Not empty
at TagExpressionParser.parse (C:\code\protractor-cucumber-allure-master\node
_modules\cucumber-tag-expressions\lib\tag_expression_parser.js:49:13)
at new ScenarioFilter (C:\code\protractor-cucumber-allure-master\node_module
s\cucumber\lib\scenario_filter.js:44:52)
at Cli. (C:\code\protractor-cucumber-allure-master\node_modules\c
ucumber\lib\cli\index.js:145:30)
at next (native)
at undefined.tryCatcher (C:\code\protractor-cucumber-allure-master\node_modu
les\bluebird\js\release\util.js:16:23)
at PromiseSpawn._promiseFulfilled (C:\code\protractor-cucumber-allure-master
\node_modules\bluebird\js\release\generators.js:97:49)
at Promise._settlePromise (C:\code\protractor-cucumber-allure-master\node_mo
dules\bluebird\js\release\promise.js:574:26)
at Promise._settlePromise0 (C:\code\protractor-cucumber-allure-master\node_m
odules\bluebird\js\release\promise.js:614:10)
at Promise._settlePromises (C:\code\protractor-cucumber-allure-master\node_m
odules\bluebird\js\release\promise.js:693:18)
at Async._drainQueue (C:\code\protractor-cucumber-allure-master\node_modules
\bluebird\js\release\async.js:133:16)
at Async._drainQueues (C:\code\protractor-cucumber-allure-master\node_module
s\bluebird\js\release\async.js:143:10)
at Immediate.Async.drainQueues (C:\code\protractor-cucumber-allure-master\no
de_modules\bluebird\js\release\async.js:17:14)
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
protractor-cucumber-allure.zip
Hi,
I am able to create POM using your framework, but the problem is when i run " NPM Test". It is just opening the web browser and directly giving the results with out interacting with the web elements.So i have added CallBack in my each step def function. Then i am getting "function timed out after 5000 milliseconds" error message.
If i remove callBack it is running with out errors but giving results directly without interacting with application.
If i add callBack it is throwing ""function timed out after 5000 milliseconds".
Please could you help me with the solution.
``
While executing , I am getting following error :
[17:14:37] E/launcher - CucumberHtmlReport is not a constructor
[17:14:37] E/launcher - TypeError: CucumberHtmlReport is not a constructor
This issue is due to a method in allure-cucumberjs API which checks for it , this has to corrected!
Add a new cucumber - protractor reporter with examples
Hi Ram,
Script is not getting executed on changing the browser in config.js from "firefox" to "chrome".
The issue here was that you need to specify the path to your selenium jar and chrome driver exe in your protractor config file. Mine was installed globally in AppData folder so i have mentioned the path of both the variables i.e chrome driver and selenium standalone server in config.js and things started working for me as expected.
OR
Copy the selenium folder from the AppData folder and place it within the solution explorer under "protractor-cucumber-allure-master\node_modules\protractor\node_modules\webdriver-manager".
Hi Ram,
The json report get generated based on the option json:./reports/json/cucumber_report.json in Cucumber opts section result in json file gernated like cucumber_report1234.json(some additional number in the file name),so HTML report genrateion get failed as the Traget json name mismatch.
Tracking this issue here as currently some work has to be done on cucumberjs-allure-reporter to support cucumber 2.0
when trying to run test after doing npm install, i am getting following error:
[23:42:12] I/launcher - Running 1 instances of WebDriver
[23:42:12] I/direct - Using ChromeDriver directly...
[23:42:12] E/direct - Error code: 135
[23:42:12] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[23:42:12] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
at IError (/Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/protractor/built/exitCodes.js:5:1)
at ProtractorError (/Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/protractor/built/exitCodes.js:10:9)
at BrowserError (/Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/protractor/built/exitCodes.js:51:9)
at Direct.getNewDriver (/Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/protractor/built/driverProviders/direct.js:62:31)
at Runner.createBrowser (/Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/protractor/built/runner.js:194:43)
at q.then.then (/Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/protractor/built/runner.js:338:29)
at _fulfilled (/Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/q/q.js:796:13)
at /Users/vijaysingh/Desktop/cucumber/protractor-cucumber-allure-master/node_modules/q/q.js:556:49
[23:42:12] E/launcher - Process exited with error code 135
I have tried running webdriver-manager update, but no luck.
Please suggest a way to fix as soon as possible.
Thank you
Vijay
@igniteram When i try to run the tests in parallel using shards it looks like the generated report just has the last run feature file . In short the cucumber.json file is overridden when the shards:true
Hi again!
I am facing a problem when trying to implement a restart between scenarios.
Changes I done :
registerHandler("BeforeScenario", { timeout: 10 * 1000 }, function() {
return browser.get(conf.baseUrl);
});
After(function(scenario) {
if (scenario.isFailed()) {
var attach = this.attach; // cucumber's world object has attach function which should be used
return browser.takeScreenshot().then(function(png) {
var decodedImage = new Buffer(png, "base64");
attach(decodedImage, "image/png");
return browser.restart();
})
}
});
And this restarts the browser between tests, but strangely I am getting exception same as mentioned in this ticket :
Can you please help here to understand what's happening. And how I can utilie the world object as explained in above solution (if really thats the only option )
I really want to close the browser in case of failure of the tests.
When a test fails it doesn't capture screenshot
The problem is that some errors stop the process and I am unable to get the final report.
One example of error that stop the process https://github.com/aluzardo/protractor-cucumber-allure/tree/not-found-element-stop-process
The issue looks very similar than this angular/protractor#876
Failing example https://travis-ci.org/aluzardo/protractor-cucumber-allure
PD. Maybe it is because I am using the framework in a wrong way.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.