winterbe / jest-teamcity-reporter Goto Github PK
View Code? Open in Web Editor NEWTeamcity Reporter for Jest Unittest Results
Home Page: https://www.npmjs.com/package/jest-teamcity-reporter
License: Other
Teamcity Reporter for Jest Unittest Results
Home Page: https://www.npmjs.com/package/jest-teamcity-reporter
License: Other
it.skip(....
This test is still reported as passed.
I use 0.6.2 version.
I think the name is a bit misleading, as jest does not support custom reporters at this time. But we're getting closer: jestjs/jest#2115
And also, a reporter would report progress to teamcity as the tests are running, while this reports nothing until the test run is complete, which is not optimal if there are a lot of tests.
from this line https://github.com/winterbe/jest-teamcity-reporter/blob/master/index.js#L3
i read that the reporter is called if the env var is set, even if the --teamcity flag is not set.
This could be specified in the docs
Following the instructions on the main page of this github has no effect whatsoever. There are obviously steps missing in the docs, but which ones?
With Jest 18.0.1, there is some console output like this:
Unrecognized options: teamcity
But then the tests are executed without any further problems.
With Jest 19.0.0, a more impressive error is produced, and the tests don't run at all:
/my/project/path/node_modules/jest-util/build/validateCLIOptions.js:59
throw createCLIValidationError(unrecognizedOptions, allowedOptions);
^
โ Unrecognized CLI Parameter:
Unrecognized option "teamcity".
CLI Options Documentation:
http://facebook.github.io/jest/docs/cli.html
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/7.4.0/bin/node" "/usr/local/bin/npm" "run" "test:teamcity"
npm ERR! node v7.4.0
npm ERR! npm v4.1.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] test:teamcity: `jest --teamcity`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] test:teamcity script 'jest --teamcity'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ReactMain package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! jest --teamcity
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ReactMain
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls ReactMain
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /my/project/path/reactmain/npm-debug.log
Even though this seems like the most frequently updated package for Jest teamcity reporters, this repo has not been updated since 2018, PRs are lying dormant and the docs are outdated. It would be better if this was clearly marked on the front page, possibly linking to alternatives like an actively updated alternative like jest-teamcity (15 K downloads/week) or a package that simply uses the JUnit compatible output (like jest-junit (about 1.6 M downloads/week)
Hello!
I have the following failing test:
describe("test suite", () => {
it("test", () => {
expect(1).toEqual(2);
});
});
But TeamCity thinks that this is two tests: https://goo.gl/KxR5De
I use TeamCity 10.0.4 and Jest 19.0.0.
Hi,
I am using Docker and passing TEAMCITY_VERSION env variable in either way(empty or not).
I would like the package to check if it is empty or not and not only existing of it.
I tried to push my changes and open pull request but got 403 with permissions error.
Can you help ?
I'm using jest through stenciljs and this reporter isn't working.
We're on TeamCity Professional 2017.2.4 (build 51228)
I've followed your instructions. The only strange thing is that there was not any TEAMCITY_VERSION environmental variable on our server. I've added "2017.2.4 (build 51228)" as our version number but when I run the jest tests it doesn't report the success/failure rate to teamcity.
Hey,
I've noticed in our CI that number of tests reported by TeamCity is different than number of tests reported when running them on your local, and the reason is I believe that TC is overriding the results for duplicated names of the tests?
So if there are 2 tests suites:
describe('Component A', () => {
describe('in default variant', () => {
it('renders correctly', () => {})
});
describe('in complex variant', () => {
it('renders correctly', () => {})
})
});
Local run will report 2 tests, while for TeamCity it seems to be picked up as 1 test (as the name being used is renders correctly
without the describe prefixes.
This issue could be solved if we would start using fullName
instead of current title
field from testResult.
Any thoughts @winterbe ? I Could create a PR if that's a correct way of addressing this issue
I originally reported here before I realized it was this plugin that made it not work:
Any ideas why?
Hello, thanks for the plugin!
Can it be used to report code coverage as metrics on build statistics in TeamCity? If not, is that something that would fall under the scope of this plugin or should it be done some other way?
I'm trying to use this and I see:
npm run test:teamcity
> jest --teamcity
Unrecognized options: teamcity
PASS static/js/materials/button.test.js
PASS static/js/materials/header.test.js
PASS static/js/materials/card.test.js
PASS static/js/materials/message.test.js
PASS static/js/api/index.test.js
Test Suites: 5 passed, 5 total
Tests: 6 passed, 6 total
Snapshots: 0 total
Time: 5.477s
Ran all test suites.
##teamcity[testSuiteStarted name='materials/button.test.js']
##teamcity[testStarted name='renders minimally without exploding']
##teamcity[testFinished name='renders minimally without exploding']
##teamcity[testStarted name='renders with props without exploding']
##teamcity[testFinished name='renders with props without exploding']
##teamcity[testSuiteFinished name='materials/button.test.js']
##teamcity[testSuiteStarted name='materials/header.test.js']
##teamcity[testStarted name='renders minimally without exploding']
##teamcity[testFinished name='renders minimally without exploding']
##teamcity[testSuiteFinished name='materials/header.test.js']
##teamcity[testSuiteStarted name='materials/card.test.js']
##teamcity[testStarted name='renders minimally without exploding']
##teamcity[testFinished name='renders minimally without exploding']
##teamcity[testSuiteFinished name='materials/card.test.js']
##teamcity[testSuiteStarted name='materials/message.test.js']
##teamcity[testStarted name='renders minimally without exploding']
##teamcity[testFinished name='renders minimally without exploding']
##teamcity[testSuiteFinished name='materials/message.test.js']
##teamcity[testSuiteStarted name='api/index.test.js']
##teamcity[testStarted name='Can generate querystring from object']
##teamcity[testFinished name='Can generate querystring from object']
##teamcity[testSuiteFinished name='api/index.test.js']
It does seem to recognize the option because I see the teamcity log lines but it does report Unrecognized options: teamcity
which is weird. My other concern is that I see the logs for passing/failing before any of the teamcity logging. How can I get it to report pass/fail within it?
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.