jhipster-online icon indicating copy to clipboard operation
jhipster-online copied to clipboard

Improve Test Coverage

Open SudharakaP opened this issue 4 years ago • 7 comments

We should improve the test coverage of the project; https://sonarcloud.io/dashboard?id=jhipster_jhipster-online

SudharakaP avatar Aug 08 '20 22:08 SudharakaP

@SudharakaP would this one be eligible to get a hacktoberfest label?

Strat1987 avatar Oct 07 '20 17:10 Strat1987

@Strat1987 : Yes, you are most welcome to do it. Please feel free to suggest a PR. I will apply the Hacktoberfest label. 😄

SudharakaP avatar Oct 07 '20 17:10 SudharakaP

I'm currently up to 64% and trying to triage on what seems sensible to test, is there any specific target set?

Strat1987 avatar Oct 09 '20 20:10 Strat1987

@Strat1987 : Some of the classed I think are quite nice to have a good test coverage are highlighted below; maybe some others who has more experience working with jhipster-online will have some further ideas on this.

  • JHipsterService.java, GeneratorService.java - This is where we have the methods to generate the projects, the jdl configs, the ci-cd configs etc.

  • GitService.java - I am not sure how easy this is to test as it involves api calls to the git api.

  • JdlService.java and JdlMetadataService.java

  • GithubService.java and GitlabService.java

  • StatisticsService.java

@pascalgrimaud @jdubois @PierreBesson : Let us know if you have any ideas on this one. 😄

SudharakaP avatar Oct 09 '20 21:10 SudharakaP

Agree with your suggestions, @SudharakaP

pascalgrimaud avatar Oct 10 '20 09:10 pascalgrimaud

@Strat1987 : Also feel free to improve any uncovered classes in the list; https://sonarcloud.io/component_measures?id=jhipster_jhipster-online&metric=coverage&view=list

I have removed the good-first-issue label from this as I feel this might take some time to achieve as some test cases will be a bit complicated to write. However all contributions are welcome and please feel free to suggest multiple PRs. 😄

SudharakaP avatar Oct 10 '20 15:10 SudharakaP

Of the list mentioned above I covered the JdlMetadataService. I have to admit that most of the listed once would take up more time / complexity than I can spare on this.

Strat1987 avatar Oct 11 '20 11:10 Strat1987