-
Notifications
You must be signed in to change notification settings - Fork 34
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
Estimate code coverage for the current frontend codebase #1023
Comments
@jiji14 before we use any third party (hosted) tools, we have to get approval from NREL IT. If not, Jest seems pretty good, but does it cover end-to-end testing? I am not sure that code coverage tools will do well with end-to-end testing anyway since they work at the code lines level. |
@shankari I also agree that |
@jiji14 sounds good. What additional feedback would you like from me? |
@shankari |
I need to submit a |
@jiji14 I am 99% sure you don't need to submit an SIA. The SIA is for systems that we want to run internally, which is why they are asking for a system owner. We want to use an external service, which would be a technology exception. Please cc me on the discussion with IT if needed and I can clarify if there are any questions. |
I received approval from the IT team. Should I reach out to Codecov directly to request access for the open-source project? Additionally, I think you should sign up with your GitHub handle to set up Codecov in the e-mission-phone project. After I signed up with my GitHub handle, I could only see the repositories that I owned. You can find the setup documentation here. |
@jiji14 can you add me to the ticket related to the this, so I can have the approval for the record? |
@jiji14 thanks for adding me to the ticket. Signing up for codecov now... |
Signed up! |
@shankari Here are the steps:
After you add the token, I will submit Codecov Github action PR. |
Added the token |
Estimate code coverage for the current frontend codebase
We've made significant progress in setting up unit tests for e-emission-phone and are actively writing test cases as we overhaul Angular services. To gauge the effectiveness of our test suite, we aim to estimate the code coverage.
You can find test codes here
Related Issue
Estimate code coverage for the current server codebase
I've researched 3 well-known code coverage tools that work with jest and GitHub actions.
jest-coverage
Jest-coverage is a tool that extends Jest to provide code coverage reports. To generate code coverage reports using Jest, we can run tests with coverage using the
--coverage
flag.[ Report Sample ]
[ Pros ]
[ Cons]
[ Resources ]
jest-coverage
stackoverflow - jest-coverage issue
Codecov
Codecov is an all-in-one code coverage reporting solution that focuses on integration and encourages healthy pull requests. It delivers coverage metrics directly into the modern workflow, particularly in pull requests.
[ Report Sample ]
[ Pros ]
[ Cons]
[ Resources ]
codecov.io
Istanbul
Istanbul instruments your ES5 and ES2015+ JavaScript code with line counters, allowing you to track code coverage based on unit tests.
[ Pros ]
[ Cons]
[ Report Sample ]
[ Resources ]
Gudie for instanbul
Jest-coverage VS Codecov VS Istanbul
JS Coverage
as an option because it lacks support for CI/CD integration, and its last update is outdated.[ Resources ]
code-coverage-js-in-2023
I am inclined towards Codecov because it is free for open-source projects and offers various features with user-friendly and readable reports.
The text was updated successfully, but these errors were encountered: