# Sonarqube code coverage for custom plugins

**URL:** <https://discuss.elastic.co/t/sonarqube-code-coverage-for-custom-plugins/272624>\
**Category:** Kibana\
**Created:** [May 11, 2021, 1:44am UTC](https://discuss.elastic.co/t/sonarqube-code-coverage-for-custom-plugins/272624 "2021-05-11T01:44:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adityaPsl](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@adityaPsl](https://discuss.elastic.co/u/adityaPsl)\
**Post date:** [May 11, 2021, 1:44am UTC](https://discuss.elastic.co/t/sonarqube-code-coverage-for-custom-plugins/272624/1 "2021-05-11T01:44:26Z")

</div>

Hello Team,

I am trying to understand if we can use sonarqube like tools for code coverage of the custom kibana plugins. Are there is suggested frameworks or tools for Kibana.

## Thanks for your help and support.

Aditya

---

<div class="post-metadata">

**Author:** ![Dzmitry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dzmitry/32/65026_2.png) [@Dzmitry](https://discuss.elastic.co/u/Dzmitry)\
**Post date:** [May 12, 2021, 12:58pm UTC](https://discuss.elastic.co/t/sonarqube-code-coverage-for-custom-plugins/272624/2 "2021-05-12T12:58:54Z")

</div>

Hi @adityaPsl,

In Kibana we use [istanbul.js](https://istanbul.js.org/) to collect code coverage for our jest and functional tests, firstly since it is [build-in](https://istanbul.js.org/docs/tutorials/jest/) in jest

Since it is an external plugin, you are free to select whatever works best for you. Make sure to check [plugin development guide](https://www.elastic.co/guide/en/kibana/current/external-plugin-development.html)

Regards, Dzmitry

---

<div class="post-metadata">

**Author:** ![adityaPsl](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@adityaPsl](https://discuss.elastic.co/u/adityaPsl)\
**Post date:** [May 14, 2021, 4:18am UTC](https://discuss.elastic.co/t/sonarqube-code-coverage-for-custom-plugins/272624/3 "2021-05-14T04:18:40Z")

</div>

Thank you @Dzmitry ,

let me try this. I hope by external Plugin you mean custom Kibana plugin developed using Kibana Plugin template.

---

<div class="post-metadata">

**Author:** ![Dzmitry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dzmitry/32/65026_2.png) [@Dzmitry](https://discuss.elastic.co/u/Dzmitry)\
**Post date:** [May 14, 2021, 7:31am UTC](https://discuss.elastic.co/t/sonarqube-code-coverage-for-custom-plugins/272624/4 "2021-05-14T07:31:52Z")

</div>

Hi @adityaPsl,

By external plugin I mean a plugin developed & supported by community. As for Kibana plugin template, I'm not sure which one you consider, but have a look at the latest [examples](https://github.com/elastic/kibana/tree/master/examples)  
Taking the template from that folder is better since it is covered by out tests

Regards, Dzmitry

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 11, 2021, 7:32am UTC](https://discuss.elastic.co/t/sonarqube-code-coverage-for-custom-plugins/272624/5 "2021-06-11T07:32:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
