|Code coverage of generated Java code [message #1818659]
||Sun, 22 December 2019 14:47
|| Lorenzo Bettini
Registered: July 2009
Location: Firenze, Italy
As detailed here https://www.dietrich-it.de/xtext/2016/01/12/code-coverage-for-xtend.html with this setting of the xtend-maven-plugin, <xtendAsPrimaryDebugSource>true</xtendAsPrimaryDebugSource>, you get JaCoCo code coverage of the original Xtend sources. It does not work in Eclipse with Eclemma, but it does work in JaCoCo reports, both HTML, and XML (indeed related tools like Coveralls and SonarQube also correctly refer to the original Xtend sources in their code coverage statistics, by relying on the reports generated by JaCoCo).
But what about code coverage of Java code generated for your own Xbase DSL? The xtext-maven-plugin seems to have a similar output configuration parameter, installDslAsPrimarySource, but setting it to true does not seem to make any difference: JaCoCo reports always show the generated Java file. Am I missing something?
Thanks in advance
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
Powered by FUDForum
. Page generated in 0.01802 seconds