Invalid linecoverage.xml file for Kotlin Test method names that use special symbols enclosed in backticks
See original GitHub issueTested with Pitest 1.9.3. Project runs on Kotlin 1.6.10
Issue
When setting exportLineCoverage
to true
Pitest generates an invalid linecoverage.xml file when there are “special symbols” in test method names enclosed in backticks (this is a best practices for writing tests in Kotlin), e.g. @Test fun `this won't work in pitest linecoverage file because of the single quote char`() {...}
.
Known Workaround
Don’t use special symbols in test method names enclosed in backticks
Proposed Solution
Pitest should escape the special symbols <, >, &, ', "
in the generated xml files
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Kotlin test code using backtick test method names has case ...
Since it's valid in Kotlin to have these two as separate methods you would expect both methods to execute appropriately. Actual: java.lang.
Read more >Does Kotlin allow the use of backtick names for test classes?
As gotube says, the Kotlin coding conventions specifically allow test method names with spaces. But they don't require it; you're free to ...
Read more >pitest - Bountysource
When setting exportLineCoverage to true Pitest generates an invalid linecoverage.xml file when there are "special symbols" in test method names enclosed in ...
Read more >Android issue with backticked method names
I started to use kotlin for frontend game development. After a while I tried to run my game in android, but it didn't...
Read more >IntelliJ IDEA 183.3975.8 Beta Release Notes | Knowledge Base
Feature IDEA‑132487 External annotations for java third party libraries
Feature IDEA‑196706 Multithread model for new SE
Feature IDEA‑127245 Open all files from favorites list
Bug IDEA‑113988...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Pfoerd are you happy to close this?
@hcoles successfully tested it with 1.9.7, it produces valid linecoverage.xml files also for tests with lambdas/inlines like above. Thx!