mutation-testing-elements
mutation-testing-elements copied to clipboard
Adaptable table columns
The table of the mutation testing elements have fixed headers now, while the headers in the json schema are not fixed. This results in "useless" table columns. For example:
Stryker.NET does not support:
- No coverage
- Runtime errors
- Transpile errors
Thus "total undetected" is always the same as "killed" and can also be left out.
For us it would be ideal if the components would display only the columns that are passed with the json.
For us it would be ideal if the components would display only the columns that are passed with the json.
@richardwerkman no columns are passed in the json anymore (with the new flat file syntax). We shouldn't confuse the report json format with the html web component.
We could choose to not show columns that have 0 results, but that can result in strange behavior. For example: missing a "Survived" column (because you have awesome tests and 0 survived mutants).
How about configuring columns using the mutation-test-report-app
web component. For example:
<mutation-test-report-app
disabled-states="NoCoverage, RuntimeError, TranspileError"
title-postfix="Stryker report"></mutation-test-report-app>
This isn't particularly elegant. I'm open to suggestions.
We could use an attribute to pass column information like:
<mutation-test-report-app
states="[{'name': 'Killed', 'json-key': 'killed', 'description': 'A mutant is marked as killed if at least one test failed with the mutation active'}, {...}]"
title-postfix="Stryker report"></mutation-test-report-app>
Where the name is diplayed in the table, the json-key is used to look into the passed json and the description can be shown on hover over the column header.
This gives each report generator complete flexability in naming. A java generator might want to use the term "murdered" instead of "killed" for example. This is of course exaggerated but it gives a lot of freedom in what the report will display.
This gives each report generator complete flexibility in naming. A java generator might want to use the term "murdered" instead of "killed" for example. This is of course exaggerated but it gives a lot of freedom in what the report will display.
This is exactly what we want to avoid IMHO. We want to create synergy between mutation testing libraries. It doesn't make sense for me to keep multiple naming policies for mutant states.
If someone wants a column to be called "murdered" instead of "killed", we should discuss it here and, if we agree, change it for all mutation testing frameworks at once. That way, all mutation testing libraries will benefit from naming/description improvements.
About column descriptions in general, please take a look at: https://github.com/stryker-mutator/mutation-testing-elements/issues/7#issuecomment-466934979. I think we should add a definition of each state to the stryker-handbook and link to that from the html report.
@richardwerkman do you agree with my previous comment? If so, can we close this issue? Or do we want to go for the disabled-states
solution?
I can see why we want to keep the columns the same. But still I'd like to see them hidden if not needed. And we can't assume that a row with 0 value should be hidden, so my preference goes to the disabled-states
solution yes!