Code Monkey home page Code Monkey logo

stryker-dashboard's People

Contributors

0xced avatar dependabot[bot] avatar hugo-vrijswijk avatar jensk-dev avatar korthout avatar lex-funy avatar maks-rafalko avatar mobrockers avatar mthmulders avatar nicojs avatar noriste avatar ptoonen avatar regseb avatar renovate[bot] avatar rouke-broersma avatar simondel avatar wijtserekker avatar xandervedder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

stryker-dashboard's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

dockerfile
docker/Dockerfile
  • node 20.12.2-alpine
github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • actions/setup-node v4
.github/workflows/deploy.yml
  • actions/checkout v4
  • actions/setup-node v4
  • docker/login-action v3
  • docker/login-action v3
  • docker/setup-buildx-action v3
  • docker/metadata-action v5
  • docker/build-push-action v5
  • actions/checkout v4
  • Azure/login v2
  • azure/webapps-deploy v3
  • actions/checkout v4
  • Azure/login v2
  • Azure/functions-action v1.5.1
.github/workflows/e2e.yml
  • actions/checkout v4
  • actions/setup-node v4
  • docker/login-action v3
  • docker/setup-buildx-action v3
  • docker/metadata-action v5
  • docker/build-push-action v5
  • actions/checkout v4
  • azure/login v2
  • Azure/functions-action v1.5.1
  • azure/webapps-deploy v3
  • actions/setup-node v4
  • actions/upload-artifact v4
.github/workflows/mutation-testing.yml
  • actions/checkout v4
  • actions/setup-node v4
  • actions/checkout v4
  • actions/setup-node v4
npm
package.json
  • @actions/core 1.10.1
  • @eslint/js 9.2.0
  • @stryker-mutator/core 8.2.6
  • @stryker-mutator/mocha-runner 8.2.6
  • @types/chai 4.3.15
  • @types/chai-as-promised 7.1.8
  • @types/mocha 10.0.6
  • @types/node 20.12.8
  • @types/sinon 17.0.3
  • @types/sinon-chai 3.2.12
  • azurite 3.30.0
  • c8 9.1.0
  • chai 4.4.1
  • chai-as-promised 7.1.1
  • concurrently 8.2.2
  • lerna 8.1.2
  • mocha 10.4.0
  • prettier 3.2.5
  • prettier-plugin-tailwindcss 0.5.14
  • rimraf 5.0.5
  • sinon 17.0.1
  • sinon-chai 3.7.0
  • typescript 5.3.3
  • typescript-eslint 7.8.0
packages/badge-api/package.json
  • @azure/functions 4.4.0
  • source-map-support 0.5.21
  • azure-functions-core-tools 4.0.5611
packages/common/package.json
  • mutation-testing-report-schema 3.0.4
packages/data-access/package.json
  • azure-storage 2.10.7
  • mutation-testing-metrics 3.0.4
  • mutation-testing-report-schema 3.0.4
packages/e2e/package.json
  • azure-storage 2.10.7
  • jsonwebtoken 9.0.2
  • mutation-testing-report-schema 3.0.4
  • @playwright/test 1.43.1
  • @types/jsonwebtoken 9.0.6
packages/stryker-elements/package.json
  • @storybook/addon-essentials 8.0.9
  • @storybook/addon-links 8.0.9
  • @storybook/blocks 8.0.9
  • @storybook/manager-api 8.0.9
  • @storybook/test 8.0.9
  • @storybook/theming 8.0.9
  • @storybook/web-components 8.0.9
  • @storybook/web-components-vite 8.0.9
  • autoprefixer 10.4.19
  • postcss 8.4.38
  • storybook 8.0.9
  • tailwindcss 3.4.3
  • vite 4.5.3
  • vite-plugin-dts 3.9.0
  • lit ^2.7.6
packages/website-backend/package.json
  • @nestjs/common 10.3.8
  • @nestjs/config 3.2.2
  • @nestjs/core 10.3.8
  • @nestjs/platform-express 10.3.8
  • @nestjs/serve-static 4.0.2
  • ajv 8.12.0
  • ajv-formats 3.0.1
  • compression 1.7.4
  • express 4.19.2
  • express-jwt 8.4.1
  • helmet 7.1.0
  • passport 0.7.0
  • passport-github2 0.1.12
  • @nestjs/schematics 10.1.1
  • @nestjs/testing 10.3.8
  • @types/compression 1.7.5
  • @types/express 4.17.21
  • @types/jsonwebtoken 9.0.6
  • @types/passport 1.0.16
  • @types/passport-github2 1.2.9
  • @types/supertest 6.0.2
  • mutation-testing-report-schema 3.0.4
  • supertest 6.3.4
packages/website-contract/package.json
  • mutation-testing-report-schema 3.0.4
packages/website-frontend/package.json
  • @angular-devkit/build-angular 17.2.3
  • @angular/animations 17.2.3
  • @angular/cli 17.2.3
  • @angular/common 17.2.3
  • @angular/compiler 17.2.3
  • @angular/compiler-cli 17.2.3
  • @angular/core 17.2.3
  • @angular/forms 17.2.3
  • @angular/platform-browser 17.2.3
  • @angular/platform-browser-dynamic 17.2.3
  • @angular/router 17.2.3
  • @github/clipboard-copy-element 1.3.0
  • @ng-bootstrap/ng-bootstrap 16.0.0
  • @primer/octicons 19.9.0
  • @stryker-mutator/karma-runner 8.2.6
  • @types/jasmine 5.1.4
  • bootstrap 5.3.3
  • jasmine-core 5.1.2
  • karma 6.4.3
  • karma-chrome-launcher 3.2.0
  • karma-coverage 2.2.1
  • karma-jasmine 5.1.0
  • karma-jasmine-html-reporter 2.1.0
  • mutation-testing-elements 3.0.4
  • mutation-testing-metrics 3.0.4
  • mutation-testing-report-schema 3.0.4
  • rxjs 7.8.1
  • zone.js 0.14.5
nuget
packages/badge-api/extensions.csproj
  • Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator 1.2.3
nvm
.nvmrc
  • node 20.12.2

  • Check this box to trigger a request for Renovate to run again on this repository

Add support for realtime reporting in Stryker dashboard

This issue depends on stryker-mutator/mutation-testing-elements#2434


Realtime Reporting

Realtime reporting locally is doable, but it would also be nice to have this feature available in the Stryker dashboard.

Implementation

The implementation is potentially similar to the implementations found in the different Strykers, except that the dashboard should have an API endpoint available for pushing mutants to.

The flow will be like this:

  1. Upload the initial state to the dashboard.
  2. Accept a list of mutant "events" in the API endpoint (to reduce HTTP calls)
  3. Using SSE, relay information to the browser and update the report.
  4. When the mutation testing process is complete, send a call to a different endpoint.
  5. Write the complete report disk (azure).

Question(s)

  1. When sending mutant data to the dashboard API, should a Stryker tool send the data batched (i.e. wait for 1s and then do the request)?

Improve docs

Lets start with some explanation on how end users can use the dashboard to add a badge to their repo.

Prevent module overwrite, allow clear/remove based on configuration

Is your feature request related to a problem? Please describe.
My current setup has ~1600 mutants across 9 files. To reduce mutation testing time (takes 12 hours total), I parallelize these in my GitHub workflow (slowest takes 6 hours). Some of these files are in the same folder eg. "App/App_functions.js" and "App/App_helpers.js". During mutation testing the natural module to make for both (in dashboard) is "App", but since they end at different times, one overwrites the other.

Describe the solution you'd like
Specifying a module for dashboard reporter should not overwrite existing files in that module. Maybe include an additional config parameter like "overwriteModule: Boolean" so that the user can decide whether or not that is what they want.

Describe alternatives you've considered
I created different modules for each file, in total I had 9 unique modules for my 9 files - this is not ideal.

Additional context
When creating new modules, the old modules remain in the dashboard and there seems to be no way to clear/remove them so they end up interfering with the mutation score. It would be great if a feature for this was provided as well. Maybe add another config variable in the dashboard reporter that removes specific module names. Eg. "existingModules.names: string[]" // contains module names to consider
"existingModules.actions: {'overwrite', 'clear', 'remove'}" // what to do with these modules

Badge redirect is mangled

  • Visit https://badge.stryker-mutator.io/github.com/my/repo/5.0 go⬈
  • Redirects to https://img.shields.io/endpoint?url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fmy%2Frepo%2F5

Notice the branch name has been truncated from 5.0 -> 5. Seems something is interpreting the path component as a number and simplifying it from a float to an int. Nasty.

Dashboard a bit slow to load

See the screenshot bellow where I was switching from infection to theofidry back and forth.

Screen Shot 2020-03-06 at 21 53 52

I think the result could be cached like in Travis with a default TTL and allow maybe an account page or button to force a new synchronization if ncessary.

Dashboard app requests extraneous GitHub permissions

When logging into the app with GitHub the Stryker dashboard requests access to read and write to all public and private repositories of the user. This doesn't seem necessary.

As an example, Coveralls, which is a somewhat similar type of app, requests the following permissions.
image

This is a link to the documentation on scopes:
https://developer.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes
The scope "repo:status" can be used to give the app access to the commit statuses. I think this will allow you to show the mutation score for each commit without needing full access to the code of user's repositories.

Cannot remove repository

When I remove a repository, the switch on the dashboard goes to the 'off' position:
afbeelding
However, when I refresh the page the repository is enabled again:
afbeelding

When I looked in the storage explorer, I noticed that the API key has was succesfully removed, but the project was still enabled:
afbeelding

Make the mutation ID's optionals

I don't think we should expect all mutation testing tools to provide the ability to track mutations. So with that in mind, maybe it would be worth to allow the ID to be optional and simply not show it when not available.

Feature request: Compare

We would like to have a compare page. Comparable (pun unintended) to githubs compare feature.

The comparison would show the diff between 2 mutation testing reporters. Mutants that did not change (and the tests didn't change) could be shown as ignored (or not shown entirely). We can reuse internals from StrykerJS's "incremental mode" feature.

URL design could also be inspired by Github's design:

I.e /compare/github.com/stryker-mutator/stryker-js/master...feat/octocat compares master to feat/octocat.
I.e /compare/github.com/stryker-mutator/stryker-js/fix/bar...feat/foo compares fix/bar to feat/foo.

Display non-private repositories

Maybe on the following homepage:

Screen Shot 2020-03-06 at 22 02 05

Some curated repositories could be displayed. I don't know if private/public repositories are displayed, but the repositories are public you could maybe list them on the homepage to show-case the dashboard.

Since one may not necessarily be featured on the homepage, I would have a setting allowing to disallow to be displayed on the homepage though (on a repository or organisation basis)

Disabling a repository does not remove the reports

When disabling a repository, a previously uploaded report and badge are still available

Expected situation

When disabling a repository, the report and mutation score information are removed and no longer available

Actual situation

They are still available

Consider replacing `unpkg` CDN

Originally posted here infection/infection#1646

The main idea is to replace unpkg with more reliable CDN

@nicojs suggest the following infection/infection#1646 (comment)

Yeah unpkg isn't the most reliable CDN out there. Might be time to switch over to a locally served one, or include it in the JS bundle.
Feel free to open an issue at the dashboard GH repo

Is your feature request related to a problem? Please describe. I just started using Infection and I noted that the generated HTML log includes a call to a remote resource:

<script defer src="https://www.unpkg.com/mutation-testing-elements"></script>

Unfortunately, this URL is not available 100% of the time and I'm getting constant timeout issues that restrict me from seeing the HTML logs.

Describe the solution you'd like I would like to be able to work with Infection without having to depend on a remotely hosted resource that could fail at any time.

Describe alternatives you've considered I believe that the mutation-testing-elements js should be included in local, otherwise host it in a more reliable place (GitHub pages?)

Additional context image

Enable deletion of outdated modules in the dashboard reports

Please provide an option to delete a module from the Stryker dashboard, either via UI or at least via an API call.

Background:
I used stryker to analyse my projects (see Testably.Abstractions. Later on I removed the "Testably.Abstractions.Extensions" project, but the latest analysis is still present in the combined analysis for the main branch and also changed the total score for the Badge.
Note: the latest branch-specific analysis doesn't contain this project.

I already tried removing the repository and creating a new API key, but to no avail.

Sort repositories by type

Maybe a combination of both could be done:

  • Adding a search
  • Sort repositories by type and then by name:
    • provider
    • repository enabled
    • source repository
    • fork

This would allow the list to be much more friendly when like me you have 152 repositories but only one enabled

[feature-request] Support storage other than Azure ?

Hello !

I am wondering if there are plans to support backends other than Azure Storage ?

We are considering using stryker-dashboard to store the result of mutation testing for our Typescript & Kotlin projects (report generated with pitest).
We would love to self-host a dashboard instance but we do not use Azure, we use AWS.

Cheers and thanks for a great product :) !

Slow redirection

When I access to the dashboard logged in (e.g. https://dashboard.stryker-mutator.io/repos/theofidry) and click on the stryker icon top left, I get redirected to the following page:

Screen Shot 2020-03-06 at 22 02 05

And then it takes a solid 1-2 seconds before redirecting me to https://dashboard.stryker-mutator.io/repos/theofidry because I'm logged in

Private repositories

Does Stryker support private repositories? I can't seem to grant access to those when using the app?

GitHub reporter

GitHub has something called 'check-runs' they allow adding annotations to a 'check'. Checks are for example what GitHub Actions create. These annotations show up at a line of code. A good example is the eslint-action which lints code and displays error messages directly in GitHub. More info about checks can be found here or here. Annotations can be added to a new check created by the action, or an existing one that is currently running like the CI action. It looks a little like this:

eslint-action

We could add something similar to the Stryker Dashboard by adding a GitHub reporter. This reporter could annotate survived mutants at their position in the source code on GitHub so people can view their mutation testing results in GitHub. This would also work very well in combination with a diff-runner (not supported yet by Stryker4s). A score could also be reported at the end

Some things that need discussion:

  • What should survived mutants be reported as? I don't think it should be an 'error' because then the user will always have a failed check unless they have a score of 100% which is the wrong message to send IMO
  • Should we report other mutant statuses? It might become a little crowded if we report everything
  • Another option would be a stryker-report-action that could be run after mutation testing. The action could read the JSON report and send the annotations. Upside is that it would work for all Strykers (or other mutation testing framework). Downside is it would not report the results in realtime, and would require the main CI to be in GitHub actions already (which wouldn't be required if the Stryker4s reporter creates a new check)
  • Do we currently have enough information in the dashboard to make this API call
  • Easiest way to do it would be when the framework sends the full report. Coolest way would be in a streaming fashion as results come in

Support for mutation-testing-elements

Time for the next step: hosting mutation testing reports. We will use mutation-testing-elements for the json schema as well as the html report itself.

Suggestion for the new api:

HTTP POST https://dashboard.stryker-mutator.io/api/reports

{
  "apiKey": "61213121e3wdasdASD",
  "branch": "master",
  "mutationScore": 80,
  "repositorySlug": "github.com/stryker-mutator/stryker",
  "report": { "...": "..." }
}

Suggestion: allow open source projects not to need an API key

Hi, I've been using stryker a lot and I've been adding the badges to every readme, it's great and encourages people to write good tests in there PRs!

I have a suggestion/feature request, for the codecov badge I don't need to set a key on travis-ci for any open source projects

Would it be possible to add a feature like this to the stryker dashboard?

Thanks! πŸ˜„

β€œReport does not exist” in my dashboard

Summary

Thanks for the awesome tool!

My repo is a mono repo, I added Stryker to my api server folder at https://github.com/Hongbo-Miao/hongbomiao.com/blob/main/api/stryker.conf.js
Also, I added Stryker to my GitHub Actions pipeline, and it runs successfully.
https://github.com/Hongbo-Miao/hongbomiao.com/runs/2116804199?check_suite_focus=true

with log

...
22:31:43 (1715) INFO DashboardReporterClient PUT report to https://dashboard.stryker-mutator.io/api/reports/github.com/Hongbo-Miao/hongbomiao.com/PR-1972 (~976888 bytes)
22:31:43 (1715) INFO HtmlReporter Your report can be found at: file:///home/runner/work/hongbomiao.com/hongbomiao.com/api/reports/mutation/html/index.html
22:31:45 (1715) INFO DashboardReporter Report available at: https://dashboard.stryker-mutator.io/reports/github.com/Hongbo-Miao/hongbomiao.com/PR-1972
22:31:45 (1715) INFO MutationTestExecutor Done in 3 minutes 52 seconds.

You can see my pull request Stryker report
image

However, my badge is not working,

image

Also, my dashboard is also not working.
https://dashboard.stryker-mutator.io/reports/github.com/Hongbo-Miao/hongbomiao.com/main

Does this issue is related with mono repo?

(I am also planning to add Stryker to my web and mobile app in this mono repo in future.)

Stryker config

/**
 * @type {import('@stryker-mutator/api/core').StrykerOptions}
 */
module.exports = {
  packageManager: 'npm',
  reporters: ['html', 'clear-text', 'progress', 'dashboard'],
  testRunner: 'jest',
  coverageAnalysis: 'perTest',
};

Test runner Jest config

module.exports = {
  testEnvironment: 'node',
  testPathIgnorePatterns: ['<rootDir>/build'],
};

Stryker environment

 "@stryker-mutator/core": "4.5.1",
 "@stryker-mutator/jest-runner": "4.5.1",
"jest": "26.6.3",

Test runner environment

npm test
api/jest.config.js

Your Environment

software version(s)
node 14.16.0
npm 7.6.3
Operating System

Add stryker.log

N/A. The test did run successfully in the GitHub Actions build which can be found above.

When switching between the mutant and test tabs multiple requests are executed

Problem

For example, this is me switching between tabs 2 times:

image

Steps to reproduce

  1. Visit the Dashboard.
  2. Switch from mutant to test view.
  3. Observe multiple requests in the developer console.

Misc

  • Tested on Firefox and Edge (newest versions).
  • It appears that on page load two of the same requests are executed.
  • Also I noticed that this happens when the fragment gets updated (changed to gibberish: #bla123, does a request as well)

Solution

Only do the GET request once πŸ‘.

potentially something in the Router:

children: [{ path: '**', component: ReportPageComponent }],

Logging in azure function

We should improve logging in the azure function with context.log and context.log.error (not console.log or something else)

Support a HTML report in the dashboard

TODO:

  • Implement in stryker dashboard
  • Implement in dashboard reporter Stryker
  • Implement in dashboard reporter Stryker.NET
  • Implement in dashboard reporter Stryker4s
  • Advertise this in the dashboard

We should implement this in the different reporters behind a flag IMHO. Maybe people only want the mutation score badge and not the full report.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.