Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Pending status to mutation-testing-report-schema.json #2424

Closed
xandervedder opened this issue Apr 4, 2023 · 2 comments · Fixed by #2425
Closed

Add Pending status to mutation-testing-report-schema.json #2424

xandervedder opened this issue Apr 4, 2023 · 2 comments · Fixed by #2425
Assignees

Comments

@xandervedder
Copy link
Contributor

Motivation

To give some background information: I am currently doing my internship at the company behind Stryker. The goal of my internship is to make the mutation testing report realtime, because currently the user has to wait before the complete mutation testing proces is done to see any feedback in the report.

To make this possible, a new status type should be added to the status property in the mutation-testing-report-schema.json. This new status will be called Pending. Pending means that the mutant is generated, but not yet run.

The reason why this is needed, is because of the following idea:

  1. Every Stryker tool already knows what mutants are generated. This can be used to display the "empty" mutation report. This empty mutation report will be called the "initial state".
  2. In the "empty" report, every mutant will have the state Pending.
  3. To make the report realtime, we supply updates to the report from a Stryker tool using Server Sent Events. The only thing that would be sent is the mutant id and the new state of said mutant.
    • The reason for using Server Sent Events, is because the protocol is simpler and the communication direction is unidirectional. This makes it perfect for this usecase.
  4. Using these events, everything will be updated in realtime in the report which will make it faster to recieve feedback[1]

1 Note that the actual testing process will not be faster, that is up to the tool. This should only be for getting the actual feedback faster on-the-go.

@psfinaki
Copy link

Sounds cool! Good luck :)

@xandervedder
Copy link
Contributor Author

Thank you 😄!

rouke-broersma pushed a commit that referenced this issue Apr 14, 2023
* feat(schema): add `Pending` status to JSON schema

See #2424 for the reasoning behind this.

* fix: add `MutantStatus.Pending` where necessary

Fixes build errors in places where `MutantStatus.Pending` was missing.

* feat(metrics-scala): add `Pending` to `metrics-scala`

* fix(scala-metrics): fix compile errors

* fix: change `⏳` to `⏰` in `getEmojiForStatus`

* fix: change the correct emoji

* fix: update integration test

* feat: add pending to totalMutants metric

* fix: run prettier

* fix: compile errors

* feat(metrics-scala): add pending to totalMutants metric

* feat(elements): add pending to tooltip

* feat: make pending mutants visible by default

The user wants to see mutants if they are present in the file. To have a
filter for this would be weird, since the number in the filter would
count down as time passes.

For this reason `Pending` is not filterable.

* fix: reword tooltip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants