karma_web_test
karma_web_test should provide junit reporting output to be consumed by tooling.
karma_web_test should automatically create junit reporting outputs.
I would expect that it is possible to provide a karma config which triggers junit reporting, it seems that it makes the most sense to have the reporting automatically created.
I think @jvanallen93 is going to take a stab at this
I think I might be overthinking this, this seems pretty straight forward and just setting the outputFile property to XML_OUTPUT_FILE.
I'm curious though, how would we want to test this, if it needs to be tested at all?
@jvanallen93 yes it should have some testing.
We want to assert that you run bazel test and afterwards you get something in the dist/testlogs folder (note the test.xml file is already there for some of our tests e.g. dist/testlogs/internal/npm_install/compile_generate_build_file_check_compiled/test.xml)
That means we need a test that runs Bazel, so there are two options:
examples/web_testing looks like it already does some karma-*-reporter stuff. So I would expect that bazel test //examples:examples_web_testing would do the things it does today and then also assert on what's in the test.xml output file. I think internal/bazel_integration_test/test_runner.js is the spot where we've just finished running Bazel and have a chance to look around the disk before exiting zero or one.Thanks for the insight and feedback @alexeagle!
Is there any progress on this?
Could this solution be reused for the "jasmine_test" rule as well?
This here: https://github.com/bazelbuild/rules_nodejs/pulls/Toxicable
This provides a proper integration with bazel coverage. What it currently does is takes in v8 coverage .json files produced by the v8 runtime and converts them into lcov which bazel knows how to make combined reports with.
We could extend it to take in whatever format karma can give us, convert it to lcov, let bazel process it.
Once you have a combined report from bazel then you can run whatever tool on that to go to some other format.
Happy to take PR's on this extending from my curren work
Sorry, it thought this ticket was for junior test reports, not coverage per se. Or does your PR handle writing junit reports to show the tests run?
Ah right, my mistake I misunderstood junit reporting.
I was thinking it was a format for coverage reporting not your test runner reporting.
With that in mind I don't think that PR will help at all with this issue :P
Yeah sorry peepz....life got busy. I believe I had it working, at least for Karma, just needed to spend time getting the tests in place. Now I think I'm getting some free time that I can pick this up again.
This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs in two weeks. Collaborators can add a "cleanup" or "need: discussion" label to keep it open indefinitely. Thanks for your contributions to rules_nodejs!
This is still an issue that would be nice to have solved, I don't think it should be closed...
@jvanallen93 are you still working on this?