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

Display coverage results by Git commit / id #51

Open
ORESoftware opened this issue Jun 1, 2017 · 0 comments
Open

Display coverage results by Git commit / id #51

ORESoftware opened this issue Jun 1, 2017 · 0 comments

Comments

@ORESoftware
Copy link

ORESoftware commented Jun 1, 2017

One big enhancement to this project, would be to allow to HTTP POST coverage objects to the server by ID. The most common ID I think to use would be a Git commit ID.

So the results could be retrieved via:

GET /coverage/<id>

This would allow developers to have a running server that was solely responsible for displaying test coverage results, and we could see the coverage results for each different commit.

Otherwise..we might have to spin up a new server for each commit, and that's just not very seamless.

AFAICT this would be a huge win for this project.

So when POSTing results, it would be something like:

    let obj = await driver.executeScript('return window.__coverage__;');
    let str = JSON.stringify(obj);

    let options = {
      port: port,
      host: host,
      path: `/coverage/client?id=${id}`,
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      }
    };

    let req = http.request(options, cb);

To make minimal changes to code base, we could pass the id as a query string parameter.

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

No branches or pull requests

1 participant