PiranhaJava - Unable to remove stale Unit Test code
See original GitHub issueHi,
I’m defining an annotation :
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface FlagTesting {
MyClass.TestExperimentName[] treated();
}
and using it in my unit test :
@Test
@FlagTesting(treated = MyClass.TestExperimentName.SAMPLE_STALE_FLAG)
public void addition_isCorrect() throws Exception {
...
}
When I build this, although the flag and its corresponding methods in the product code get removed as expected, unit test build fails with the error :
Execution failed for task ':app:compileInternalChromeBeta64DebugUnitTestJavaWithJavac'.
> Piranha is not a valid checker name
Any pointers on why this might happen will be really great.
PS : Using this on Android code that uses gradle.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Introducing Piranha: An Open Source Tool to Automatically ...
Seeking to automate this process, we developed Piranha, a tool that scans source code to delete code related to stale, or obsolete, ...
Read more >Trying to unit test a method and I'm unable to get rid of a ...
I'm using JUnit 5 and Pitest 1.6.2, and I'm trying to unit test the following ...
Read more >Test Explorer shows and cannot remove
Test Explorer is displaying the tests in a project that has been removed from the solution, and I cannot get rid of it....
Read more >When should you remove or change a unit test? - Roy Osherove
They are there to make sure that when we change code we don t break ... But sometimes we might get some failing...
Read more >Unit Tests, How to Write Testable Code, and Why It Matters
Both the unit test and the system under test should not access the network resources, databases, file system, etc., to eliminate the influence...
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
Fixed in #45.
It doesn’t do anything special now and will soon be removed.