Cypress axe report - cypress

Is it possible to generate a detailed report using cypress axe.
At present my tests have a mochawesome report but the details are pretty basic.
There seems to be something for selenium but not cypress axe as of yet.

Related

How does nyc istanbul pass instrumented code to test runners?

I've been trying to generate code coverage for a vanilla Typescript (no react or any web frameworks) project on Webpack 5 using Cypress for unit testing. I'm not able to generate code coverage for it as if I'm failing to tell Cypress that it needs to use the source instrumented by nyc.
In order to come up with ideas on solving this, I need to know: how exactly nyc passes the instrumented source to test runners?
In this documentation, it mentioned using nyc to instrument the code but it doesn't really show how the instrumented code is going to be picked up by Cypress. Following the provided command line does not allow your cypress test to generate code.
I have tried instrumenting by nyc but it did not work. What worked was transpiling the typescript code and then instrumenting. Once it is instrumented you can deploy by the same way you currently do and then run your tests against it.

How to generate unit test case code coverage report in .pdf for all components using angular9 and Jasmine

Angular support code coverage report in .html format(Index.html). The same code coverage report can it be possible to get in .pdf version using angular 9/Jasmine?
I had tried to modified some settings in Karma.config.js file but no luck. Is any plugin available for it? "Karma-jasmine-html-reporter" same for .pdf file?
How to write unit test cases automatically using SCURI in angular 8 onwards
run "ng test" to see coverage report for these unit tests

Mocha tests in browser to output xunit reports

I'm running a set of tests with mocha and i need the tests to run in the browser, therefore ; i'm doing this :
mocha.setup('bdd')
the tests do run fine in the browser, but i need this to be executed in jenkins. I must run the tests in the browser and i'm trying to get the reporter to output xunit reports .
i've tried the xunit-file package and another one called "mocha-multi" , it looks like browser tests only support the html reporter. Is there a way to output both the xunit and browser reports? or at least to execute the tests in the browser and report xunit results?
so there is no way to have two reporters if you're running the tests in the browsers and not in node js. After digging into mocha,i realized that there is a tests results variable as part of the mocha objects that you can instantiate in the browser. You need to use this to actually access the resutls and write the report yourself.

Mocha test report customize xunit reporter

In xunit reporter of mocha, it generates the report for attributes tests, failures, skipped, error. but i want for mocha's pending, dropped and blocked reports also. is these reports are generated using xunit? can we customize the xunit reporter to generate the report which has
pending
dropped
blocked
test cases report. please help me to find solution for this.
Looks like this is a known issue and pending tests have been added to the xunit reporter.
First are you using the latest version of mocha?
https://github.com/visionmedia/mocha/pull/1051/files that pull request has been merged into the latest version of mocha and should including pending requests in xunit?
You can always fork mocha and edit lib/reporters/xunit.js and add
runner.on('dropped', function(test){
tests.push(test);
});
runner.on('blocked', function(test){
tests.push(test);
});
Or instead of forking mocha. Copy Xunit and make a custom mocha reporter. You can use https://github.com/startswithaj/mocha-spec-cov as a template.

Can chutzpah run qunit tests from a url?

Can Chutzpah run qunit tests from a url? I need a lot of server-side injected markup and json data in my qunit tests, so I like to run the test suite within my visual studio project on localhost instead of mocking tons of test data in my test.js files.
As of version 2.4 Chutzpah now supports running against a remote url. See the documentation here.
Maybe it helps to share our testing strategy.
We use chutzpah for javascript unit tests. No dependency on a running server. The tests run very quickly as part of the build. (But we are not testing generated javascript code which is your scenario).
We test against running server by writing tests in JavaScript and running them with PhantonJS. See my answer for an example of one of our tests: automated functional web GUI testing frameworks (asp.net)
If you don't like writing the tests in Javascript like this (it is not as nice as using a unit testing framework - like qUnit or jasmine) you could checked out CasperJS.

Resources