Comments (11)
I verified this again from a clean environment. I can't get multiple formats
to work in any way.
@gkushang any idea what might be (or might I be doing) wrong?
from grunt-cucumberjs.
Hi @SirLenz0rlot
Did you try with below options? It works for us. Plus, our cucumber version is "cucumber": "0.9.5",
which has multi-formatter support,
return {
options: {
formats: ['html', 'pretty'],
output: 'test/acceptance/report/cucumber_report.html',
Let us know if it does not work.
from grunt-cucumberjs.
I was on cucumber 0.9.2, but even upgrading cucumber to 0.10.2 didn't help.
It doesn't throw errors, but it doesn't print any 'pretty' output when running either.
The spawn arguments when spawning cuucmber seem to be ok.
When I do
node_modules/cucumber/bin/cucumber.js -t @signoff -f pretty -f json:reports/cucumber.html.json
I get both a json and the pretty print.
from grunt-cucumberjs.
I think I found the cause, in processHandler.js
, options.isHtml
is being used as a flag to
'eat up' console logging.
This makes things bettter for me, but may pollute the terminal for other users (?):
cucumber.stdout.on('data', function(data) {
grunt.log.write(data);
if (options.isHtml) {
if (options.debug) {
process.stdout.write(data);
}
buffer.push(data);
}
});
The current code:
cucumber.stdout.on('data', function(data) {
if (options.isHtml) {
if (options.debug) {
process.stdout.write(data);
}
buffer.push(data);
} else {
grunt.log.write(data);
}
});
from grunt-cucumberjs.
@SirLenz0rlot Did you try providing multi-formatters in your CucumberJs options as shown below,
return {
options: {
formats: ['html', 'pretty'],
It should pretty print the console when you run the tasks without Parallel executions. Let us know if that does not work for you.
from grunt-cucumberjs.
Yes, of course I did :), as in the first post.
It doesn't for me.
Op 26 apr. 2016 5:38 PM schreef "Kushang Gajjar" [email protected]:
@SirLenz0rlot https://github.com/SirLenz0rlot Did you try providing
multi-formatters in your CucumberJs options as shown below,return { options: { formats: ['html', 'pretty'],
It should pretty print the console when you run the tasks without Parallel
executions. Let us know if that does not work for you.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#62 (comment)
from grunt-cucumberjs.
@SirLenz0rlot We are able to pretty print with [email protected]
. It would be very helpful to debug if you could share any errors you see, the command you use to run tasks and cucumberjs.js
options.
from grunt-cucumberjs.
This is one of the many grunt configurations I tried in my Gruntfile.js.
I call it with grunt cucumberjs:signoff
cucumberjs: {
options: {
tags: [ "~@Pending "],
formats: ["html", "pretty"],
templateDir: "template",
output: "reports/cucumber.html",
saveJSon: "true"
},
features: [],
signoff: {
options: {
tags: [ "~@Pending", "@signoff" ]
}
},
}
As mentioned before, I'm not seeing any errors, it just doesn't print any cucumber output to the terminal.
Oh, and I'm on Ubuntu 14.04.
If you run yourself with formats: ["html", "pretty"]
. Does your code hits the callback on cucumber.stdout.on('data',
in processHandler.js
??
The code in processHandler.js
seems to only log to the terminal (like pretty print) if options.isHtml
is not set to true, which is the case, because I use 'html' too as a formatter.
from grunt-cucumberjs.
@SirLenz0rlot I had the same issue as you. As a workaround I added debug: true in the options and it seems to print the output to console log and html report.
cucumberjs: {
options: {
tags: [ "~@Pending "],
formats: ["html", "pretty"],
debug: "true",
templateDir: "template",
output: "reports/cucumber.html",
saveJSon: "true"
},
features: [],
signoff: {
options: {
tags: [ "~@Pending", "@signoff" ]
}
},
}
from grunt-cucumberjs.
@vidz2 Thanks, I'm glad I'm not the only one struggling.
I'm using the debug
flag too, for now.
from grunt-cucumberjs.
closing the issue since "debug: true" prints the console with pretty formatter
from grunt-cucumberjs.
Related Issues (20)
- Issue downloading latest grunt-cucumberjs version [V1.0.0] HOT 2
- Issues resolved in fork, waiting on response to PR HOT 4
- Cucumber 2 support HOT 1
- Global variables not persisted through cucumberjs task HOT 1
- {prod} --> npm publish HOT 1
- support for node 0.12
- Breasks with cucumber@4 HOT 1
- Command Injection - Vulnerabilities Observed in dependent package
- Npm audit- Vulnerabilities Observed in dependent package
- html report broken HOT 5
- Submit HTML reporting to cucumber-js HOT 2
- formats html+pretty, pretty won't output HOT 3
- 'Output' option not creating folder structure HOT 1
- Parallel option not working with latest version of plugin HOT 5
- Html report wont open some scenario details but opens others HOT 3
- peerDependencies: 0.4.5
- rerun HOT 1
- Report is overwritten when using re-run option HOT 2
- Issue in '--tags' parameter work logic HOT 1
- Cannot run some feature from cli (Ubuntu) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grunt-cucumberjs.