Re: Code coverage report generation for JS files - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Code coverage report generation for JS files
Date
Msg-id CA+OCxowniMAJzhSNd0bexjkOtgSTh4jpZgDbQPaFQNCy3Gie4Q@mail.gmail.com
Whole thread Raw
In response to Re: Code coverage report generation for JS files  (Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>)
Responses Re: Code coverage report generation for JS files  (Pramod Ahire <pramod.ahire@enterprisedb.com>)
Re: Code coverage report generation for JS files  (Pramod Ahire <pramod.ahire@enterprisedb.com>)
List pgadmin-hackers
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.toshniwal@enterprisedb.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.joshi@enterprisedb.com> wrote:
Hi Aditya

Please review it.

On Thu, Aug 6, 2020 at 12:12 PM Pramod Ahire <pramod.ahire@enterprisedb.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

 

https://lh4.googleusercontent.com/U1erEuyI_d0xEUA0CrKjwx9aWQ52HNCxc38dMsLP-ZrLgfVNrhsrNobxlmeOdb1kMPtrrxcUwEHZgbGJC4R0qR4r1sBZa_z9R8ihFRaP2Hr_Wnhq6HcIQHe1ZoviDPwUkTdzNcg

 

C: +91-020-66449600/601

D: +91-9028697679

edbpostgres.com

 

 

From: Pramod Ahire <pramod.ahire@enterprisedb.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

 

https://lh4.googleusercontent.com/U1erEuyI_d0xEUA0CrKjwx9aWQ52HNCxc38dMsLP-ZrLgfVNrhsrNobxlmeOdb1kMPtrrxcUwEHZgbGJC4R0qR4r1sBZa_z9R8ihFRaP2Hr_Wnhq6HcIQHe1ZoviDPwUkTdzNcg

 

C: +91-020-66449600/601

D: +91-9028697679

edbpostgres.com

 

 

From: Pramod Ahire <pramod.ahire@enterprisedb.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:

 

  1. istanbul-instrumenter-loader
  2. karma-coverage

 

Steps to generate report:



  1. Apply attached patch
  2. Do - ‘npm install’
  3. 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

 

https://lh4.googleusercontent.com/U1erEuyI_d0xEUA0CrKjwx9aWQ52HNCxc38dMsLP-ZrLgfVNrhsrNobxlmeOdb1kMPtrrxcUwEHZgbGJC4R0qR4r1sBZa_z9R8ihFRaP2Hr_Wnhq6HcIQHe1ZoviDPwUkTdzNcg

 

C: +91-020-66449600/601

D: +91-9028697679

edbpostgres.com

 



--
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

Attachment

pgadmin-hackers by date:

Previous
From: Pramod Ahire
Date:
Subject: Re: Code coverage report generation for JS files
Next
From: Pramod Ahire
Date:
Subject: Re: Code coverage report generation for JS files