openvidu-test-e2e: use Junit5

pull/370/head
pabloFuente 2019-11-17 20:06:27 +01:00
parent 34f00dff34
commit 0b0f78d34c
2 changed files with 26 additions and 9 deletions

View File

@ -67,6 +67,24 @@
</build> </build>
<dependencies> <dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${version.spring-boot}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${version.junit.jupiter}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>io.github.bonigarcia</groupId> <groupId>io.github.bonigarcia</groupId>
<artifactId>selenium-jupiter</artifactId> <artifactId>selenium-jupiter</artifactId>
@ -79,7 +97,6 @@
<version>${version.webdrivermanager}</version> <version>${version.webdrivermanager}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.seleniumhq.selenium</groupId> <groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId> <artifactId>selenium-java</artifactId>

View File

@ -59,8 +59,7 @@ import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.platform.runner.JUnitPlatform; import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.runner.RunWith;
import org.openqa.selenium.Alert; import org.openqa.selenium.Alert;
import org.openqa.selenium.By; import org.openqa.selenium.By;
import org.openqa.selenium.Dimension; import org.openqa.selenium.Dimension;
@ -72,6 +71,7 @@ import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.ExpectedConditions;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.gson.Gson; import com.google.gson.Gson;
@ -116,7 +116,7 @@ import io.openvidu.test.browsers.utils.Unzipper;
*/ */
@Tag("e2e") @Tag("e2e")
@DisplayName("E2E tests for OpenVidu TestApp") @DisplayName("E2E tests for OpenVidu TestApp")
@RunWith(JUnitPlatform.class) @ExtendWith(SpringExtension.class)
public class OpenViduTestAppE2eTest { public class OpenViduTestAppE2eTest {
static String OPENVIDU_SECRET = "MY_SECRET"; static String OPENVIDU_SECRET = "MY_SECRET";
@ -3296,16 +3296,16 @@ public class OpenViduTestAppE2eTest {
return colorMap; return colorMap;
} }
private void startKms() {
log.info("Starting KMS");
commandLine.executeCommand("/usr/bin/kurento-media-server &>> /kms.log &");
}
private void stopKms() { private void stopKms() {
log.info("Stopping KMS"); log.info("Stopping KMS");
commandLine.executeCommand("kill -9 $(pidof kurento-media-server)"); commandLine.executeCommand("kill -9 $(pidof kurento-media-server)");
} }
private void startKms() {
log.info("Starting KMS");
commandLine.executeCommand("/usr/bin/kurento-media-server &> /kms.log &");
}
private void restartKms() { private void restartKms() {
this.stopKms(); this.stopKms();
try { try {