Comments (7)
+1
from meteor-mocha.
Yeah - plus one.
I get this error:
Load the app in a browser to run client tests, or set the TEST_BROWSER_DRIVER environment variable. See https://github.com/meteortesting/meteor-mocha/blob/master/README.md#run-app-tests
when calling via
SERVER_TEST_REPORTER=xunit XUNIT_FILE=$PWD/unit-integrationa-results.xml meteor test --once --driver-package meteortesting:mocha
from meteor-mocha.
This should be fixed in version 1.1.0
. When you now set the MOCHA_REPORTER
to xunit
(or separately via SERVER_TEST_REPORTER
and CLIENT_TEST_REPORTER
) you'll see, that the output of both test-environments will be in the xunit
format.
You then should also set SERVER_MOCHA_OUTPUT
(which replaces XUNIT_FILE
) and CLIENT_MOCHA_OUTPUT
to the path you want to see the test reports in.
In case it doesn't work, please make sure that this and the package meteortesting:browser-tests
are installed in the latest version and that you run the tests using a headless browser as described in https://github.com/meteortesting/meteor-browser-tests#dependencies (the documentation on this package regarding headless browsers is a bit outdated 😉 - that's why I linked directly to the package providing this feature).
from meteor-mocha.
Client-side tests don't seem to report properly for me. I can see the file on CircleCI being generated, and its content appears to be ok, but circleCI complains:
Would you have an idea what could be wrong with the file?
EDIT: It seems that the client test report is simply reading everything off the command line and dumping it into the xml file, so if there are any other logs than test results, the xml file will be invalid. Is there a way to filter for xml lines only maybe?
from meteor-mocha.
Well, the truth is, that all the test-results on the client are just written out to the console, which can be grabbed on the server-side.
If you want to dig into it, this is the repository used for getting in contact with the browsers in an abstract way: https://github.com/meteortesting/meteor-browser-tests
I see your problem here, but don't know how to fix it. Mainly because I can't differ between a result from a reporter and a usual console.log()
call. I could only do so for console.error()
and maybe console.warn()
, console.info()
or other methods as well listed here https://developer.mozilla.org/en-US/docs/Web/API/Console, but this highly depends on the implementation for each of the browsers.
from meteor-mocha.
Could we maybe clean up the xml file at the end? It's a bit hacky, but removing any "non-xml" content from the file could already be a coarse filter.
I think it might be safe to say very few people would ever console.log xml-valid content.
EDIT: xUnit xml seems to have a very simple syntax: https://xunit.github.io/docs/format-xml-v2
Removing any non-xml nodes might do the trick?
EDIT2: It looks like what you get from the console isn't even XML, it's formatted text. I'd be surprised if any xml parser can actually read it?
from meteor-mocha.
Could do that ... I'd prefer a separate issue for this, since the main purpose of this ticket is solved and this (to me) is a separate ticket.
If we would cut out some of the data returned by calling console.log()
I'd at least put it out on stdout
- not simply ignore it, but this is up for a discussion which I'd take in the new ticket. If you have time, I'd also welcome a PR. Otherwise you'd have to wait until someone else (e.g. me) finds time to pick it up.
from meteor-mocha.
Related Issues (20)
- browser-shim.js prevents nice console logs HOT 1
- Puppeteer app-test yields "TypeError: Cannot read property 'call' of undefined"
- texts from `describe` and `it` blocks are not printed when using browser `nightmare` HOT 3
- Tests are only re-run if I change a *.tests.* file, not if I change implementation files (e.g. server/...) HOT 3
- UnhandledPromiseRejectionWarning: Error: Protocol error (Runtime.callFunctionOn): Promise was collected HOT 1
- Running tests do not finish after the end inside CI HOT 3
- How to setup a global hook for database prefills (fixtures) HOT 2
- XML report output is missing for client tests
- Need upgrade to dependencies to work with Meteor 2.3 HOT 1
- Bump supported dependency versions of lmieulet:meteor-coverage to 4.0.0 HOT 2
- Error: Timeout of 2000ms exceeded
- CSS missing during client side tests due to brower-policy HOT 1
- No tests running in parallel HOT 1
- Allow running specific server tests or hooks after client tests in full app mode
- Run test for multiple specific filename
- Move tests from CI to GitHub actions HOT 3
- The meteor http package is deprecated HOT 3
- Client unit tests not working on Meteor3 with beta HOT 17
- Dependency on jquery? HOT 6
- Eager loading of tests does not work as described in the Meteor guide HOT 2
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 meteor-mocha.