Hi all.
Did anyone tried to migrate the integration tests from Vaadin 8 to Vaadin 14?
In Vaadin 8 there was vaadin-spring-ext-test (https://mvnrepository.com/artifact/org.vaadin.spring.extensions/vaadin-spring-ext-test/2.0.0.RELEASE) extension. We integrated that in Vaadin 8 Application and we got vaadin scopes available in tests so that they can run accordingly.
Now we are migrating to 14 and the tests doesn’t work anymore. vaadin-spring-ext-test is not compatible to Vaadin 14.
So how do we do automated testing with Vaadin 14, Spring (Not Spring Boot)? Is there an alternative to vaadin-spring-ext-test?
Concret Example:
The following service
@Service
@VaadinSessionScope
public class GreetService implements Serializable {
public String greet(String name) {
if (name == null || name.isEmpty()) {
return "Hello anonymous user";
} else {
return "Hello " + name;
}
}
}
should be testable with the following code:
@ExtendWith( SpringExtension.class )
public class GreetingTest
{
@Autowired
private GreetService greetSvc;
@Test
public void testGreeting()
{
Assert.assertEquals( "Hello World", greetSvc.greet( "World" ) );
}
}
Thanks a lot for any help.
Christoph