From 84098ca597f3b4196627b9c667c310e86aba0939 Mon Sep 17 00:00:00 2001 From: pabloFuente Date: Wed, 18 Oct 2017 18:07:37 +0200 Subject: [PATCH] Firefox tests commented. Jenkinsfile added --- openvidu-test-e2e/jenkins/Jenkinsfile | 30 +++++++++++++++++++ .../test/e2e/OpenViduTestAppE2eTest.java | 9 +++--- 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 openvidu-test-e2e/jenkins/Jenkinsfile diff --git a/openvidu-test-e2e/jenkins/Jenkinsfile b/openvidu-test-e2e/jenkins/Jenkinsfile new file mode 100644 index 00000000..46bb157d --- /dev/null +++ b/openvidu-test-e2e/jenkins/Jenkinsfile @@ -0,0 +1,30 @@ +node('container') { + def mycontainer = docker.image('openvidu/openvidu-test-e2e:latest') + mycontainer.pull() + mycontainer.inside("-u root -v /var/run/docker.sock:/var/run/docker.sock:rw -v /dev/shm:/dev/shm") { + stage('Preparation') { + sh 'rm -rf ~/openvidu || true' + sh '/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf &' + sh 'git clone https://github.com/OpenVidu/openvidu.git ~/openvidu' + } + stage('OpenVidu parent build') { + sh 'cd ~/openvidu && mvn -DskipTests=true compile && mvn -DskipTests=true install' + } + stage('OpenVidu Browser build') { + sh 'cd ~/openvidu/openvidu-browser && npm install --unsafe-perm && npm link --unsafe-perm' + } + stage('OpenVidu TestApp build') { + sh 'cd ~/openvidu/openvidu-testapp && npm install && npm link openvidu-browser && ng build' + } + stage ("Environment Launch") { + sh 'http-server -p 4200 ~/openvidu/openvidu-testapp/dist &> ~/openvidu/openvidu-testapp/testapp.log &' + sh 'service kurento-media-server-6.0 start' + sh 'cd ~/openvidu/openvidu-server && mvn -DskipTests=true clean compile package exec:java &> ~/openvidu/openvidu-server/openvidu-server.log &' + sh 'until $(curl --insecure --output /dev/null --silent --head --fail https://OPENVIDUAPP:MY_SECRET@localhost:8443/); do echo "Waiting for openvidu-server..."; sleep 5; done' + } + stage ("E2E tests") { + sh "cd ~/openvidu/openvidu-test-e2e && mvn test" + step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml']) + } + } +} diff --git a/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java b/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java index 3c392444..364f6027 100644 --- a/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java +++ b/openvidu-test-e2e/src/test/java/io/openvidu/test/e2e/OpenViduTestAppE2eTest.java @@ -27,7 +27,6 @@ import java.util.List; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; @@ -160,7 +159,7 @@ public class OpenViduTestAppE2eTest { user.dispose(); } - @Test + /*@Test @DisplayName("One2One Firefox [Video + Audio]") void oneToOneVideoAudioSessionFirefox() throws Exception { @@ -192,7 +191,7 @@ public class OpenViduTestAppE2eTest { user.getEventManager().waitUntilNumberOfEvent("sessionDisconnected", 2); user.dispose(); - } + }*/ @Test @DisplayName("One2One [Audio]") @@ -491,7 +490,7 @@ public class OpenViduTestAppE2eTest { user.getEventManager().waitUntilNumberOfEvent("sessionDisconnected", 4); } - @Test + /*@Test @DisplayName("Cross-Browser test") void crossBrowserTest() throws Exception { @@ -563,7 +562,7 @@ public class OpenViduTestAppE2eTest { throw OpenViduTestAppE2eTest.ex; } } - } + }*/ private String getBase64Screenshot(BrowserUser user) throws Exception { String screenshotBase64 = ((TakesScreenshot) user.getDriver()).getScreenshotAs(BASE64);