From: | Pramod Ahire <pramod(dot)ahire(at)enterprisedb(dot)com> |
---|---|
To: | Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, Dave Page <dpage(at)pgadmin(dot)org> |
Subject: | Re: Code coverage report generation for JS files |
Date: | 2020-08-07 05:08:57 |
Message-ID: | 1D1CA3D3-EB2D-4150-9907-E79FBD3CDBDD@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
Thanks Aditya, made a note of this.
Pramod Ahire
Software Engineer
C: +91-020-66449600/601
D: +91-9028697679
From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Date: Friday, 7 August 2020 at 10:34 AM
To: Pramod Ahire <pramod(dot)ahire(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: Code coverage report generation for JS files
Hi Pramod,
On Fri, Aug 7, 2020 at 10:05 AM Pramod Ahire <pramod(dot)ahire(at)enterprisedb(dot)com> wrote:
Hi Aditya,
As per your feedback, pleas find updates as below:
1) Remove commented code. Done
2) Make coverage report optional using command line flag --reporters. Add a new cmd in yarn - test:karma-coverage.
- Updated package.json for : "test:karma-coverage" & "test:karma-coverage-once"
Coverage in watch mode won't be used. Watch mode is useful when writing test cases. It would be run only once always. I suggest removing test:karma-coverage and rename test:karma-coverage-once to test:karma-coverage. Also, change the command to yarn run test:karma-once --reporters coverage,progress to avoid repetition.
@committer - please do the required change, no patch is required.
3) Add the new coverage directory to .gitignore. Done
Have attached patch with email.
The patch looks good to me.
Thanks you !
Pramod Ahire
Software Engineer
C: +91-020-66449600/601
D: +91-9028697679
From: Dave Page <dpage(at)pgadmin(dot)org>
Date: Thursday, 6 August 2020 at 6:18 PM
To: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
Cc: Pramod Ahire <pramod(dot)ahire(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
Subject: Re: Code coverage report generation for JS files
Hmm, this makes me think - if we have enough of the JS infrastructure on the SonarQube scanner server (which is easy to create in the Jenkins job), we could import the lcov reports into SonarQube.
On Thu, Aug 6, 2020 at 1:34 PM Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
Hi Pramod,
The patch looks good to me except:
1) Remove commented code.
2) Make coverage report optional using command line flag --reporters. Add a new cmd in yarn - test:karma-coverage.
3) Add the new coverage directory to .gitignore.
On Thu, Aug 6, 2020 at 4:59 PM Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
Hi Aditya
Please review it.
On Thu, Aug 6, 2020 at 12:12 PM Pramod Ahire <pramod(dot)ahire(at)enterprisedb(dot)com> wrote:
Hi,
Please find updated patch for below changes:
Updated path for test files to module/test dir (As suggested by @Ashesh & @Nil)
Added exclusion expression for test cases
Added Lcov report generation along with html for sonarqube report combination
Please have a review & do let me know if any changes/suggestions.
Pramod Ahire
Software Engineer
C: +91-020-66449600/601
D: +91-9028697679
From: Pramod Ahire <pramod(dot)ahire(at)enterprisedb(dot)com>
Date: Wednesday, 5 August 2020 at 4:45 PM
Subject: Re: Code coverage report generation for JS files
Missed Screenshot with previous email.
Pramod Ahire
Software Engineer
C: +91-020-66449600/601
D: +91-9028697679
From: Pramod Ahire <pramod(dot)ahire(at)enterprisedb(dot)com>
Date: Wednesday, 5 August 2020 at 4:44 PM
Subject: Code coverage report generation for JS files
Hi Team,
As recent updates have added ability to generate code coverage report for all the JS files.
Where had added two new packages as below:
istanbul-instrumenter-loader
karma-coverage
Steps to generate report:
Apply attached patch
Do - ‘npm install’
Run – ‘yarn run test:karma’
It has below type of output formats supported:
Html
Lcov
Cobertura
Lcovonly
Teamcity
Text
Text-summery
All the output files will be generated & stored in ‘root_dir/coverage’ folder .
Please do let me know your thoughts or suggestion if any.
Pramod Ahire
Software Engineer
C: +91-020-66449600/601
D: +91-9028697679
--
Thanks & Regards
Akshay Joshi
pgAdmin Hacker | Sr. Software Architect
EDB Postgres
Mobile: +91 976-788-8246
--
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EDB: http://www.enterprisedb.com
--
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"
Attachment | Content-Type | Size |
---|---|---|
![]() |
image/png | 68.4 KB |
![]() |
image/png | 68.4 KB |
![]() |
image/png | 68.4 KB |
![]() |
image/png | 68.4 KB |
![]() |
image/png | 68.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Aditya Toshniwal | 2020-08-07 06:06:16 | Re: [pgAdmin][SonarQube] Replace the generic exception class with a more specific one |
Previous Message | Aditya Toshniwal | 2020-08-07 05:03:55 | Re: Code coverage report generation for JS files |