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

[Storage] Fixing code coverage for the browser tests #6666

Merged
merged 9 commits into from
Dec 28, 2019

Conversation

HarshaNalluru
Copy link
Member

@HarshaNalluru HarshaNalluru commented Dec 20, 2019

Code Coverage for Browser Tests

Problem
Code coverage for browser tests is broken.

  • HTML report doesn't show any files
  • Amount of code covered says - 100% ( 0/0 )
     

Investigation
karma plugins

  • karma-coverage is supposed to generate a report showing the code covered while testing 
    (for the file dist-test/index.browser.js). This works properly.
  • karma-remap-coverage is supposed to remap the above coverage and show the code covered in the src files using the sourceMappings. This is broken, the report shown is blank.
    Looks like the package(karma-remap-coverage) has not been responding to the issues in github and is deprecated too - karma-remap-coverage
     

After failed many attempts at fixing it, finally gave up and started looking for alternatives to karma-remap-coverage.. came across karma-remap-istanbul

Tried that instead of karma-remap-coverage(updated karma.conf appropriately), I could generate a report like following.

image

Fixes #2937

@HarshaNalluru HarshaNalluru changed the title [Storage] Fixing code coverage in the browsers [Storage] Fixing code coverage for the browser tests Dec 20, 2019
@HarshaNalluru HarshaNalluru added Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files) labels Dec 20, 2019
@jeremymeng
Copy link
Member

It would be nice to add into the description summary of the issue and fix

@HarshaNalluru
Copy link
Member Author

It would be nice to add into the description summary of the issue and fix

I was just adding some :P

@jeremymeng
Copy link
Member

I was just adding some :P

It would've been filled if you have some words in the first commit!

@HarshaNalluru
Copy link
Member Author

If the approach and the report look good, I'll extend this to the rest of the SDKs.

Copy link
Member

@XiaoningLiu XiaoningLiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Storage] Improper functioning of nyc code coverage for browser tests
5 participants