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

Implement the Stryker HTML report 2 #1625

Merged
merged 8 commits into from Jan 8, 2022
Merged

Conversation

maks-rafalko
Copy link
Member

@maks-rafalko maks-rafalko commented Dec 23, 2021

This PR:

How it works:

infection --logger-html='infection.html'

or by configuring it in infection.json

{
    "logs": {
        "html": "infection.html"
    }
}

html-report

main page:

infection-html-all

I intentially made it as one html file with JSON report bundled, to make it possible to share HTML reports as 1 file, like this (GitHub does not allow to upload html files, so here is a zip, feel free to see HTML report for the whole Infection execution).

infection.zip

There are many things to do yet, I will cover them in separate PRs:

  • add Stryker logger to upload html report to Stryker Dashboard (accessible by public URL)
  • check for Pest
  • ...

@maks-rafalko maks-rafalko added DX Developer Experience Feature labels Dec 23, 2021
@maks-rafalko maks-rafalko added this to the next milestone Dec 23, 2021
@maks-rafalko
Copy link
Member Author

build is fixed

@sidz sidz self-requested a review December 27, 2021 13:31
maks-rafalko added a commit that referenced this pull request Dec 27, 2021
Related to #1625

Now, Stryker logger allows to send badge information or the full mutation test elements report to display HTML report on Stryker Dashboard.

Example: https://dashboard.stryker-mutator.io/reports/github.com/infection/infection/master#mutant

Note, at the time of creating this PR, Stryker Dashboard has an old version of mutation-testing-elements lib which is too slow. Made a PR to update it: stryker-mutator/stryker-dashboard#211. The locally generated `html` report (see `logger.html` in `infection.json` already generates report with the latest lib)

This is a BC break.

Before:

`infection.json`

```json
{
    "logs": {
        "badge": {
            "branch": "master"
        }
    }
}
```

After:

`infection.json` - for badge information only

```json
{
    "logs": {
        "stryker": {
            "badge": "master"
        }
    }
}
```

or for badge *and* HTML report

```json
{
    "logs": {
        "badge": {
            "report": "master"
        }
    }
}
```
@maks-rafalko maks-rafalko merged commit d96aa59 into master Jan 8, 2022
@maks-rafalko maks-rafalko deleted the feature/html-report-new branch January 8, 2022 00:01
@maks-rafalko
Copy link
Member Author

@sidz merging as I need to move forward. Feel free to comment if still needed (you've added yourself as a reviewer)

maks-rafalko added a commit that referenced this pull request Jan 8, 2022
Related to #1625

Now, Stryker logger allows to send badge information or the full mutation test elements report to display HTML report on Stryker Dashboard.

Example: https://dashboard.stryker-mutator.io/reports/github.com/infection/infection/master#mutant

Note, at the time of creating this PR, Stryker Dashboard has an old version of mutation-testing-elements lib which is too slow. Made a PR to update it: stryker-mutator/stryker-dashboard#211. The locally generated `html` report (see `logger.html` in `infection.json` already generates report with the latest lib)

This is a BC break.

Before:

`infection.json`

```json
{
    "logs": {
        "badge": {
            "branch": "master"
        }
    }
}
```

After:

`infection.json` - for badge information only

```json
{
    "logs": {
        "stryker": {
            "badge": "master"
        }
    }
}
```

or for badge *and* HTML report

```json
{
    "logs": {
        "badge": {
            "report": "master"
        }
    }
}
```
maks-rafalko added a commit that referenced this pull request Jan 8, 2022
* Replace `badge` logger with more advanced `stryker` logger

Related to #1625

Now, Stryker logger allows to send badge information or the full mutation test elements report to display HTML report on Stryker Dashboard.

Example: https://dashboard.stryker-mutator.io/reports/github.com/infection/infection/master#mutant

Note, at the time of creating this PR, Stryker Dashboard has an old version of mutation-testing-elements lib which is too slow. Made a PR to update it: stryker-mutator/stryker-dashboard#211. The locally generated `html` report (see `logger.html` in `infection.json` already generates report with the latest lib)

This is a BC break.

Before:

`infection.json`

```json
{
    "logs": {
        "badge": {
            "branch": "master"
        }
    }
}
```

After:

`infection.json` - for badge information only

```json
{
    "logs": {
        "stryker": {
            "badge": "master"
        }
    }
}
```

or for badge *and* HTML report

```json
{
    "logs": {
        "badge": {
            "report": "master"
        }
    }
}
```

* Add more tests, remove todo
@maks-rafalko maks-rafalko modified the milestones: next, 0.26.0 Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX Developer Experience Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Stryker dashboard HTML report
1 participant