mercredi 26 février 2020

Java and JUnit, find missing @Test decorators

Let's say we have a project full of unit tests (thousands) and they all should look like this

@Test
public void testExceptionInBla() {
   // some test
}

But in one case someone forgot to put an @Test decorator on top of the test.

What would be an easy way to spot those tests, without looking through all the code manually?

I want to find code like this, it's a test without @Test:

public void testExceptionInBla() {
   // some test
}

Aucun commentaire:

Enregistrer un commentaire