Commit 32acc73a authored by Nikos Psaromanolakis's avatar Nikos Psaromanolakis
Browse files

Merge branch 'portal-and-stress-test' into 'develop'

portal and stress test

See merge request !4
parents 205526a9 3bd3a37b
Loading
Loading
Loading
Loading
Loading
+31 −2
Changes for .gitlab-ci.yml: 31 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -18,14 +18,13 @@ cache:
  stage: test
  timeout: 30 minutes
  tags:
    - openslice-1.plugtests.net
    - hypo
  before_script:
    - mvn -version
    - mvn -q validate
    - mvn -q test-compile
    - mvn -q test "-Dkarate.options=--dryrun"
  script:
    #  KARATE_OPTIONS injected by each job
    - mvn test -Dkarate.env="$KARATE_ENV" "-Dkarate.options=$KARATE_OPTIONS"
  artifacts:
    when: always
@@ -66,3 +65,33 @@ nightly_regression:
    - if: '$CI_PIPELINE_SOURCE == "schedule"'
      when: on_success
    - when: never


# 4) Full tests  for portal 
regression_portal:
  extends: .karate_test_template
  before_script:
    - apt-get update
    - apt-get install -y wget gnupg xvfb
    # Install Google Chrome (more reliable than chromium)
    - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
    - echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | tee /etc/apt/sources.list.d/google-chrome.list
    - apt-get update
    - apt-get install -y google-chrome-stable
    # Verify
    - which google-chrome || echo "google-chrome NOT FOUND"
    - google-chrome --version || echo "Cannot run google-chrome"
    - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
    - sleep 2
    - export DISPLAY=:99
  variables:
    KARATE_OPTIONS: "--tags @portal-login-test"
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" && $CI_MERGE_REQUEST_TITLE =~ /portal/i'
      when: on_success
    - if: '$CI_COMMIT_BRANCH == "develop" && $CI_COMMIT_MESSAGE =~ /portal/i'
      when: on_success
    - if: '$CI_COMMIT_BRANCH == "portal-and-stress-test" && $CI_COMMIT_MESSAGE =~ /portal/i'
      when: on_success
    - when: never
+29
Changes for pom.xml: 29 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -19,6 +19,35 @@
      <version>${karate.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.github.bonigarcia</groupId>
      <artifactId>webdrivermanager</artifactId>
      <version>5.6.3</version>
      <scope>test</scope>
    </dependency>
    <!-- Selenium -->
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>4.15.0</version>
        <scope>test</scope>
    </dependency>

  <!-- WebDriver Manager -->
    <dependency>
        <groupId>io.github.bonigarcia</groupId>
        <artifactId>webdrivermanager</artifactId>
        <version>5.6.3</version>
        <scope>test</scope>
    </dependency>

    <!-- Chrome Driver -->
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-chrome-driver</artifactId>
        <version>4.15.0</version>
        <scope>test</scope>
    </dependency>
    </dependencies>

  <build>
+2
Changes for src/test/resources/hypo/afterScenario.js: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ function() {
        karate.call('classpath:hypo/deleteAll.feature@deleteServiceOrderAfter', { auth_token: token, orderId: sOrderK8sId });
        }
        if (networkControllerId) {


        karate.call('classpath:hypo/deleteAll.feature@deleteFabricNetwork', { token: token, networkControllerId: networkControllerId });
        }
        karate.call('classpath:hypo/deleteAll.feature@deletePeeringAfter',      { auth_token: token, orgId: cleanupId });
+33
Changes for src/test/resources/hypo/orchestratorMasterNightly.feature: 33 added lines, 0 removed lines.
Original line number Diff line number Diff line
@nightly-workflow
Feature: Master Orchestrator - Run all tests sequentially - Nightly Tests

  Scenario: Execute all orchestrators one by one 
    
    * karate.log('========================================')
    * karate.log('STARTING MASTER-NIGHTLY ORCHESTRATOR') 
    * karate.log('========================================')
    
     # Test 1
    * karate.log('#################### 1) Running Portal Orchestrator... ####################')
    * call read('classpath:hypo/orchestratorPortal.feature')
    * karate.log('------ Tests for the Portal PASSED ------')
    
    # Test 2
    * karate.log('#################### 2) Running Private Orchestrator... ####################')
    * call read('classpath:hypo/orchestratorPrivate.feature')
    * karate.log('------ Tests with a private cluster PASSED ------')
    
    # Test 3
    * karate.log('#################### 3) Running Public Orchestrator... ####################')
    * call read('classpath:hypo/orchestratorPublic.feature')
    * karate.log('------ Tests with a public PASSED ------')
    
    # Test 4
    * karate.log('#################### 4) Running OCM Orchestrator... ####################')
    * call read('classpath:hypo/orchestratorOCM.feature')
    * karate.log('------ Tests with a OCM PASSED ------')
    

    * karate.log('========================================')
    * karate.log('------ ALL TESTS PASSED ------')
    * karate.log('========================================')
 No newline at end of file
+29
Changes for src/test/resources/hypo/orchestratorMasterNightlyNoPortal.feature: 29 added lines, 0 removed lines.
Original line number Diff line number Diff line
@nightly-workflow-no-portal
Feature: Master Orchestrator - Run all tests sequentially - Nightly Tests

  Scenario: Execute all orchestrators one by one 
    
    * karate.log('========================================')
    * karate.log('STARTING MASTER-NIGHTLY ORCHESTRATOR') 
    * karate.log('========================================')
    

    # Test 1
    * karate.log('#################### 1) Running Private Orchestrator... ####################')
    * call read('classpath:hypo/orchestratorPrivate.feature')
    * karate.log('------ Tests with a private cluster PASSED ------')
    
    # Test 2
    * karate.log('#################### 2) Running Public Orchestrator... ####################')
    * call read('classpath:hypo/orchestratorPublic.feature')
    * karate.log('------ Tests with a public PASSED ------')
    
    # Test 3
    * karate.log('#################### 3) Running OCM Orchestrator... ####################')
    * call read('classpath:hypo/orchestratorOCM.feature')
    * karate.log('------ Tests with a OCM PASSED ------')
    

    * karate.log('========================================')
    * karate.log('------ ALL TESTS PASSED ------')
    * karate.log('========================================')
 No newline at end of file
Loading