Jagger
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
ExampleTestGroupListener.java
Go to the documentation of this file.
1 package com.griddynamics.jagger.engine.e1.collector.testgroup;
2 
3 import com.griddynamics.jagger.engine.e1.Provider;
4 import com.griddynamics.jagger.engine.e1.services.ServicesAware;
5 import org.slf4j.Logger;
6 import org.slf4j.LoggerFactory;
7 
8 /* begin: following section is used for docu generation - example of the test group listener */
9 
18 public class ExampleTestGroupListener extends ServicesAware implements Provider<TestGroupListener> {
19 
20  private final static Logger log = LoggerFactory.getLogger(ExampleTestGroupListener.class);
21 
22  @Override
23  protected void init() {
24  super.init();
25  }
26 
27  @Override
29  return new TestGroupListener() {
30  @Override
31  public void onStart(TestGroupInfo infoStart) {
32  log.info("Started {} test group execution", infoStart.getTestGroup().getTaskName());
33  }
34 
35  @Override
36  public void onStop(TestGroupInfo infoStop) {
37  log.info("{} test group execution took {}ms", infoStop.getTestGroup().getTaskName(), infoStop.getDuration());
38  }
39  };
40  }
41 }
42 
43 /* end: following section is used for docu generation - example of the test group listener */