diff --git a/.github/workflows/ci_e2e.yml b/.github/workflows/ci_e2e.yml index 616f62d049..13f12641fe 100644 --- a/.github/workflows/ci_e2e.yml +++ b/.github/workflows/ci_e2e.yml @@ -48,8 +48,18 @@ jobs: docker run -dit -e POSTGRESQL_USERNAME=test -e POSTGRESQL_PASSWORD=test -p 8888:8888 dolphinscheduler:$VERSION all - name: Check Server Status run: sh ./dockerfile/hooks/check + - name: Prepare e2e env + run: | + sudo apt-get install -y libxss1 libappindicator1 libindicator7 xvfb unzip + wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + sudo dpkg -i google-chrome*.deb + sudo apt-get install -f -y + wget -N https://chromedriver.storage.googleapis.com/80.0.3987.106/chromedriver_linux64.zip + unzip chromedriver_linux64.zip + sudo mv -f chromedriver /usr/local/share/chromedriver + sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver - name: Run e2e Test - run: echo "Run e2e Test" + run: cd ./e2e && mvn -B clean test - name: Collect logs run: | mkdir -p ${LOG_DIR} diff --git a/.github/workflows/ci_ut.yml b/.github/workflows/ci_ut.yml index 8013d40f31..6f3eda0362 100644 --- a/.github/workflows/ci_ut.yml +++ b/.github/workflows/ci_ut.yml @@ -20,7 +20,7 @@ env: DOCKER_DIR: ./docker LOG_DIR: /tmp/dolphinscheduler -name: Test Coveralls Parallel +name: Unit Test jobs: diff --git a/e2e/pom.xml b/e2e/pom.xml index ac9cea94c3..ea67c0ca16 100644 --- a/e2e/pom.xml +++ b/e2e/pom.xml @@ -64,7 +64,7 @@ org.apache.servicemix.bundles org.apache.servicemix.bundles.jedis - 2.6.0_2-SNAPSHOT + 2.6.2_1 org.apache.commons @@ -134,4 +134,4 @@ - \ No newline at end of file + diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/base/BaseDriver.java b/e2e/src/test/java/org/apache/dolphinscheduler/base/BaseDriver.java index c1397b6cb5..86a77ffcfd 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/base/BaseDriver.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/base/BaseDriver.java @@ -22,8 +22,10 @@ import org.apache.dolphinscheduler.util.PropertiesReader; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; +import org.openqa.selenium.chrome.ChromeOptions; import java.io.IOException; import java.util.concurrent.TimeUnit; +import org.openqa.selenium.PageLoadStrategy; /** * base driver class @@ -81,7 +83,16 @@ public class BaseDriver { public void startBrowser() throws Exception { // set chrome driver System.setProperty("webdriver.chrome.driver", chromeDriverPath); - driver = new ChromeDriver(); + ChromeOptions chromeOptions = new ChromeOptions(); + chromeOptions.setPageLoadStrategy(PageLoadStrategy.NONE); + chromeOptions.addArguments("--no-sandbox"); + chromeOptions.addArguments("--disable-dev-shm-usage"); + chromeOptions.addArguments("--headless"); + chromeOptions.addArguments("--disable-gpu"); + chromeOptions.addArguments("--whitelisted-ips"); + chromeOptions.addArguments("--disable-infobars"); + chromeOptions.addArguments("--disable-browser-side-navigation"); + driver = new ChromeDriver(chromeOptions); /* driver setting wait time */ // implicitly wait time diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/data/LoginData.java b/e2e/src/test/java/org/apache/dolphinscheduler/data/LoginData.java index e56df5a448..532849565c 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/data/LoginData.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/data/LoginData.java @@ -39,5 +39,5 @@ public class LoginData { */ public static final String PASSWORD = PropertiesReader.getKey("PASSWORD"); - public static final String TENANT = "租户管理 - DolphinScheduler"; + public static final String TENANT = "Tenant Manage - DolphinScheduler"; } diff --git a/e2e/src/test/java/org/apache/dolphinscheduler/data/security/TenantManageData.java b/e2e/src/test/java/org/apache/dolphinscheduler/data/security/TenantManageData.java index b791c073e0..e6f6ee6b86 100644 --- a/e2e/src/test/java/org/apache/dolphinscheduler/data/security/TenantManageData.java +++ b/e2e/src/test/java/org/apache/dolphinscheduler/data/security/TenantManageData.java @@ -48,7 +48,7 @@ public class TenantManageData { */ public static final String DESCRIPTION = "creat tenant test"; - public static final String TENANAT_MANAGE = "租户管理 - DolphinScheduler"; + public static final String TENANAT_MANAGE = "Tenant Manage - DolphinScheduler"; diff --git a/e2e/src/test/resources/config/config.properties b/e2e/src/test/resources/config/config.properties index e3ee61c1c1..6a01234d01 100644 --- a/e2e/src/test/resources/config/config.properties +++ b/e2e/src/test/resources/config/config.properties @@ -17,15 +17,15 @@ ############### project ############## # login url -LOGIN_URL=http://ark1:12345/dolphinscheduler +LOGIN_URL=http://127.0.0.1:8888/dolphinscheduler/ #login username USER_NAME=admin #login password -PASSWORD=123456 +PASSWORD=dolphinscheduler123 ############### web driver ############## # driver path -driver.chromeDriver=/Users/chenxingchun/Documents/easyscheduler/selenium/chromeDriver +driver.chromeDriver=/usr/local/bin/chromedriver # implicitly wait(s) driver.timeouts.implicitlyWait=10 # show wait(s) @@ -55,4 +55,4 @@ jedis.pool.maxWaitMillis=10000 # jedis Whether to perform a valid check when calling the borrowObject method jedis.pool.testOnBorrow=true # jedis Whether to perform a valid check when calling the returnObject method -jedis.pool.testOnReturn=true \ No newline at end of file +jedis.pool.testOnReturn=true diff --git a/e2e/testng.xml b/e2e/testng.xml index 60d2541e73..757ffab248 100644 --- a/e2e/testng.xml +++ b/e2e/testng.xml @@ -6,9 +6,9 @@ - - - + + + @@ -19,4 +19,4 @@ - \ No newline at end of file +