New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test-tap-file npm script that outputs results to a separate file. #2359
Conversation
This allows continuous integration platforms to retrieve and parse tests results easily.
This PR is a discussion starter. We have a job setup on Node.js' Jenkins platform that tests several large and popular Node applications against Node's v0.12 branch to make sure that nothing obvious is broken prior release. In order for Jenkins to be able to present tests results in a meaningful way to us so that we can investigate potential tests failures, we need to retrieve and parse tests results. Currently, express' npm test scripts output tests results to standard err and out and use an output format that is not easily parsed by a computer. What we'd like to have is:
We could run the mocha command line manually, or we could change the package.json file on the fly before running the tests, but ideally we'd like to be able to run a command such as The changes in this PR are not ideal because:
Please let me know what you think. |
Use There is no need to bring |
As for duplication, maybe add a makefile that runs stuff which you can configure using env variables, i.e.: REPORTER ?= spec
test:
mocha --require test/support/env --reporter ${REPORTER} --bail --check-leaks test/ test/acceptance/ |
@rlidwka Thank you for looking into this and for your suggestions. The problem with using a |
We're talking about CI integration, right? Those things don't run on windows. |
I don't have a problem adding a test-tap script so you can do
Do you only test master or do you also test the supported and active 3.x branch?
Um, yes they do. They even have a Travis CI that is Windows available for free like Travis. |
@misterdjules let me know if you need this on the 3.x branch; that branch is actually used even more by people than the master branch, so you should probably be testing that to, especially since those tests are drastically different. |
I have implemented this. You can make your test command to be |
@dougwilson Thank you very much for your help, I really appreciate it. Also thank you for the advice on the 3.x branch. I'm going to test all this on Jenkins and I'll let you know how it goes. |
No problem. Also, I forgot to mention, the timeline for the 3.x into master merge with your testing changes is sometime tonight with a express 4.9.1 release (it's morning for me, so that means probably in about 12 hours). |
@dougwilson All good thank you. |
@misterdjules just remembered I should have pinged you when the change landed on the master branch. It's on the master branch now :) |
@dougwilson Great, thank you for the heads up! |
This allows continuous integration platforms to retrieve and parse tests
results easily.