You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on an Angular 19 project, and one issue I'm facing is that we have no code coverage for our Angular HTML templates. The out-of-the-box, Angular-generated test renders the component, and our code coverage tool reports that component as fully covered. They TypeScript is fully covered, but if we deleted all the HTML the test would still pass.
I was thinking I could detect components with no coverage for the component HTML by doing mutation testing on the HTML. The first trivial step would be to remove all the HTML, run the tests, and make sure one fails. That would help us identify components that we missed entirely. Even better would be to properly generate mutants for the HTML so we could get more granular feedback about what parts of the HTML template are not covered.
I thought I might be able to write a stryker plugin to generate the HTML mutations, but in the docs for creating a plugin I did not see a "custom mutation" option.
I have not used stryker before, so I can't tell if this is a reasonable question to be asking. Is there any way -- either through writing a plugin, or forking and tweaking, or anything else -- that I could extend stryker to mutate my Angular HTML templates?
My alternative is to roll my own rudimentary mutation testing tool specific to Angular HTML templates. That is not a small task. So I would be open to doing some heavy lifting to fit it in to stryker instead of creating the whole thing myself.
I'd appreciate and suggestions you can give 🙏🏻.
The text was updated successfully, but these errors were encountered:
I'm working on an Angular 19 project, and one issue I'm facing is that we have no code coverage for our Angular HTML templates. The out-of-the-box, Angular-generated test renders the component, and our code coverage tool reports that component as fully covered. They TypeScript is fully covered, but if we deleted all the HTML the test would still pass.
I was thinking I could detect components with no coverage for the component HTML by doing mutation testing on the HTML. The first trivial step would be to remove all the HTML, run the tests, and make sure one fails. That would help us identify components that we missed entirely. Even better would be to properly generate mutants for the HTML so we could get more granular feedback about what parts of the HTML template are not covered.
I thought I might be able to write a stryker plugin to generate the HTML mutations, but in the docs for creating a plugin I did not see a "custom mutation" option.
I have not used stryker before, so I can't tell if this is a reasonable question to be asking. Is there any way -- either through writing a plugin, or forking and tweaking, or anything else -- that I could extend stryker to mutate my Angular HTML templates?
My alternative is to roll my own rudimentary mutation testing tool specific to Angular HTML templates. That is not a small task. So I would be open to doing some heavy lifting to fit it in to stryker instead of creating the whole thing myself.
I'd appreciate and suggestions you can give 🙏🏻.
The text was updated successfully, but these errors were encountered: