I am not sure if is it possible (Google is saying that not really). I want to create test that will analyse other tests for looking some specific elements like annotation, specific class or other and if something is not good then will fail. How should I analyse tests for looking unwanted elements? Lets say I have unit tests but some programmer used spring context to create context what is weird situation, but I want to catch it. Sorry for my english, I am not native.
@Edit hard to provide specific example but I will try.
Lets say I want to achive something like that:
@Test
void checkIfUnitTestsAreCorrect() {
// how can I check if tests with @UnitTest build SpringContext?
}
@Test
@UnitTest
void unitTest() {
// SpringContext is building here so it is wrong
}
Aucun commentaire:
Enregistrer un commentaire