Annotation Interface VaadinAppConfiguration
@Target(TYPE)
@Retention(RUNTIME)
@WebAppConfiguration
@TestExecutionListeners({VaadinTestExecutionListener.class,org.springframework.test.context.support.DependencyInjectionTestExecutionListener.class,org.springframework.test.context.support.DirtiesContextTestExecutionListener.class,org.springframework.test.context.transaction.TransactionalTestExecutionListener.class})
public @interface VaadinAppConfiguration
Place this annotation on test classes that:
- are run with the
SpringJUnit4ClassRunner, - use autowiring to inject managed beans into the actual test, and
- perform tests on beans that are
view scoped,UI scopedorsession scoped
UI instances.
Example of usage:
@RunWith(SpringJUnit4ClassRunner.class)
@VaadinAppConfiguration
@ContextConfiguration(classes = ExampleIntegrationTest.Config.class)
public class MyTest {
@Autowired MyUIScopedController myController;
...
}
- Author:
- Petter Holmström (petter@vaadin.com)
- See Also: