mardi 6 mars 2018

Activation of RunListener during maven build

In our Jenkins, I found that a class extending org.junit.runner.notification.RunListener is activated (see below) when -projects is specified on the maven command line.

@Override
public void testStarted(Description description) throws Exception {
  Category[] categories = description.getTestClass().getAnnotationsByType(Category.class);
  for (Class<?> c : categories[0].value()) {

When -projects is not specified, RunListener is not activated for the same (junit 3) test.

Comment is appreciated.

Aucun commentaire:

Enregistrer un commentaire