From b3d4898d9e8452ea0b8d848c048e712d43b8d9a3 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 11 Jun 2017 14:22:02 +0300 Subject: [SDC-29] rebase continue work to align source Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4 Signed-off-by: Michael Lando --- ui-ci/src/main/resources/Downloads/CP_WAN.yml | 23 +++ .../resources/Downloads/Fortigate02_vFW_VFC.yml | 63 +++++++++ .../main/resources/ci/conf/attsdc-packages.yaml | 2 + ui-ci/src/main/resources/ci/conf/attsdc.yaml | 63 +++++++++ ui-ci/src/main/resources/ci/conf/credentials.yaml | 48 +++++++ .../main/resources/ci/conf/credentials.yaml_prod | 48 +++++++ .../resources/ci/conf/credentials.yaml_webtest | 48 +++++++ ui-ci/src/main/resources/ci/conf/extent-config.xml | 51 +++++++ ui-ci/src/main/resources/ci/conf/log4j.properties | 34 +++++ ui-ci/src/main/resources/ci/conf/titan.properties | 7 + .../src/main/resources/ci/drivers/chromedriver.exe | Bin 0 -> 7442432 bytes .../resources/ci/scripts/addUsersFromList_new.sh | 75 ++++++++++ .../src/main/resources/ci/scripts/copyToStorage.sh | 51 +++++++ ui-ci/src/main/resources/ci/scripts/sendMail.sh | 49 +++++++ ui-ci/src/main/resources/ci/scripts/startTest.sh | 155 +++++++++++++++++++++ ui-ci/src/main/resources/ci/scripts/userList.txt | 1 + .../main/resources/ci/testSuites/andreyPara.xml | 10 ++ .../resources/ci/testSuites/devOnboardSanity.xml | 14 ++ .../src/main/resources/ci/testSuites/devSanity.xml | 20 +++ .../resources/ci/testSuites/extendedSanity.xml | 33 +++++ ui-ci/src/main/resources/ci/testSuites/fullCI.xml | 34 +++++ .../resources/ci/testSuites/onboardingVNFs.xml | 15 ++ ui-ci/src/main/resources/ci/testSuites/sanity.xml | 30 ++++ ui-ci/src/main/resources/images/gizmorambo.jpg | Bin 0 -> 16605 bytes 24 files changed, 874 insertions(+) create mode 100644 ui-ci/src/main/resources/Downloads/CP_WAN.yml create mode 100644 ui-ci/src/main/resources/Downloads/Fortigate02_vFW_VFC.yml create mode 100644 ui-ci/src/main/resources/ci/conf/attsdc-packages.yaml create mode 100644 ui-ci/src/main/resources/ci/conf/attsdc.yaml create mode 100644 ui-ci/src/main/resources/ci/conf/credentials.yaml create mode 100644 ui-ci/src/main/resources/ci/conf/credentials.yaml_prod create mode 100644 ui-ci/src/main/resources/ci/conf/credentials.yaml_webtest create mode 100644 ui-ci/src/main/resources/ci/conf/extent-config.xml create mode 100644 ui-ci/src/main/resources/ci/conf/log4j.properties create mode 100644 ui-ci/src/main/resources/ci/conf/titan.properties create mode 100644 ui-ci/src/main/resources/ci/drivers/chromedriver.exe create mode 100644 ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh create mode 100644 ui-ci/src/main/resources/ci/scripts/copyToStorage.sh create mode 100644 ui-ci/src/main/resources/ci/scripts/sendMail.sh create mode 100644 ui-ci/src/main/resources/ci/scripts/startTest.sh create mode 100644 ui-ci/src/main/resources/ci/scripts/userList.txt create mode 100644 ui-ci/src/main/resources/ci/testSuites/andreyPara.xml create mode 100644 ui-ci/src/main/resources/ci/testSuites/devOnboardSanity.xml create mode 100644 ui-ci/src/main/resources/ci/testSuites/devSanity.xml create mode 100644 ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml create mode 100644 ui-ci/src/main/resources/ci/testSuites/fullCI.xml create mode 100644 ui-ci/src/main/resources/ci/testSuites/onboardingVNFs.xml create mode 100644 ui-ci/src/main/resources/ci/testSuites/sanity.xml create mode 100644 ui-ci/src/main/resources/images/gizmorambo.jpg (limited to 'ui-ci/src/main/resources') diff --git a/ui-ci/src/main/resources/Downloads/CP_WAN.yml b/ui-ci/src/main/resources/Downloads/CP_WAN.yml new file mode 100644 index 0000000000..eeabbb8490 --- /dev/null +++ b/ui-ci/src/main/resources/Downloads/CP_WAN.yml @@ -0,0 +1,23 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 + +node_types: + org.openecomp.resource.cp.WANTedy: derived_from: org.openecomp.resource.cp.CPTedy + properties: + type: + type: string + required: false + requirements: + - virtualLink_in: + capability: tosca.capabilities.network.Linkable relationship: tosca.relationships.network.LinksTo + - virtualLink_out: + capability: tosca.capabilities.network.Linkable relationship: tosca.relationships.network.LinksTo + - virtualLink_in1: + capability: tosca.capabilities.network.Linkable relationship: tosca.relationships.network.LinksTo + - virtualLink_out1: + capability: tosca.capabilities.network.Linkable relationship: tosca.relationships.network.LinksTo + - virtualLink_in2: + capability: tosca.capabilities.network.Linkable relationship: tosca.relationships.network.LinksTo + - virtualLink_out2: + capability: tosca.capabilities.network.Linkable relationship: tosca.relationships.network.LinksTo + - virtualbinding: + capability: tosca.capabilities.network.Bindable relationship: tosca.relationships.network.BindsTo \ No newline at end of file diff --git a/ui-ci/src/main/resources/Downloads/Fortigate02_vFW_VFC.yml b/ui-ci/src/main/resources/Downloads/Fortigate02_vFW_VFC.yml new file mode 100644 index 0000000000..a24d004929 --- /dev/null +++ b/ui-ci/src/main/resources/Downloads/Fortigate02_vFW_VFC.yml @@ -0,0 +1,63 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0 + +node_types: + + org.openecomp.resource.vfc.vFW.Fortigate02Tedy: + derived_from: org.openecomp.resource.vfc.vFWTedy + + properties: + att-part-number: + type: string + default: "ATT-FortiGate-VM02" + vendor-name: + type: string + default: “FORTINET” + vendor-model: + type: string + default: "VM02" + vendor-model-description: + type: string + vcpu-default: + type: integer + default: 2 + vcpu-min: + type: integer + default: 1 + vcpu-max: + type: integer + default: 2 + vmemory-default: + default: 4 + type: integer + vmemory-units: + type: string + default: "GB" + vmemory-min: + type: integer + default: 1 + vmemory-max: + type: integer + default: 4 + vdisk-default: + type: integer + default: 20 + vdisk-units: + type: string + default: "GB" + vdisk-min: + type: integer + default: 2 + vdisk-max: + type: integer + default: 20 + vnf-type: + type: string + default: “Advanced FW” + software-version: + type: string + default: “5.2.4” + software-file-name: + type: string + vnf-feature: + type: string + default: “IPS, AntiVirus, URL Filter, APPID” \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/conf/attsdc-packages.yaml b/ui-ci/src/main/resources/ci/conf/attsdc-packages.yaml new file mode 100644 index 0000000000..dcb78eefc1 --- /dev/null +++ b/ui-ci/src/main/resources/ci/conf/attsdc-packages.yaml @@ -0,0 +1,2 @@ +packages: + - org.openecomp.sdc.ci.tests.execute.resourceui \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/conf/attsdc.yaml b/ui-ci/src/main/resources/ci/conf/attsdc.yaml new file mode 100644 index 0000000000..c5ed3db724 --- /dev/null +++ b/ui-ci/src/main/resources/ci/conf/attsdc.yaml @@ -0,0 +1,63 @@ +outputFolder: target +reportName: index.html +catalogBeHost: 127.0.0.1 +catalogFeHost: fehost +esHost: eshost +disributionClientHost: disClient +catalogFePort: 8181 +catalogBePort: 8080 +disributionClientPort: 8181 +esPort: 9200 +neoHost: neoHost +neoPort: 7474 +neoDBusername: neo4j +neoDBpassword: 123456 +url: http://localhost:8285/sdc1 +remoteTestingMachineIP: 0.0.0.0 +remoteTestingMachinePort: 5566 +remoteTesting: false +resourceConfigDir: src/test/resources/CI/tests +componentsConfigDir: src/test/resources/CI/components +importResourceConfigDir: src/test/resources/CI/importResource +importResourceTestsConfigDir: src/test/resources/CI/importResourceTests +errorConfigurationFile: ../catalog-be/src/main/resources/config/error-configuration.yaml +configurationFile: ../catalog-be/src/main/resources/config/configuration.yaml +importTypesConfigDir: src/test/resources/CI/importTypesTest +browser: FireFox +windowsDownloadDirectory: "c:\\apache-ftpserver-1.1.0\\res\\home\\" +systemUnderDebug: false +reportDBhost: dbhost +reportDBport: 27017 + +useBrowserMobProxy: false +captureTraffic: false + +titanPropertiesFile: src/main/resources/ci/conf/titan.properties + +stopOnClassFailure: false + +#List of non-abstract resources to keep during titan cleanup between tests +#Only 1.0 version will be kept +resourcesNotToDelete: + - tosca.nodes.Compute + - tosca.nodes.Database + - tosca.nodes.ObjectStorage + - tosca.nodes.BlockStorage + - tosca.nodes.LoadBalancer + - org.openecomp.resource.cp.Port + - org.openecomp.resource.vl.Network + +#Resource categories to keep (including all their subcategories) +resourceCategoriesNotToDelete: + - Generic + - Network L2-3 + - Network L4+ + - Application L4+ + - Network Connectivity + +#Service categories to keep +serviceCategoriesNotToDelete: + - Mobility + - Network L1-3 + - Network L4 + - VoIP Call Control \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/conf/credentials.yaml b/ui-ci/src/main/resources/ci/conf/credentials.yaml new file mode 100644 index 0000000000..481b12b1e0 --- /dev/null +++ b/ui-ci/src/main/resources/ci/conf/credentials.yaml @@ -0,0 +1,48 @@ + designer: { + username: m08740, + password: 272v!suAL37, + firstname: ASDC, + lastname: VITI + } + admin: { + username: m08741, + password: 863B@rroN27, + firstname: ASDC, + lastname: VITI + } + ops: { + username: m08742, + password: 364K!NDRed63, + firstname: ASDC, + lastname: VITI + } + tester: { + username: m08743, + password: 373m@rBLE28, + firstname: ASDC, + lastname: VITI + } + governor: { + username: m08744, + password: 742M!DDLE44, + firstname: ASDC, + lastname: VITI + } + product_strategist1: { + username: m08745, + password: 824S@Nder35, + firstname: ASDC, + lastname: VITI + } + product_manager1: { + username: m08746, + password: 747ICK!Y99, + firstname: ASDC, + lastname: VITI + } + product_local: { + username: m08747, + password: 623z!Ggy75, + firstname: ASDC, + lastname: VITI + } \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/conf/credentials.yaml_prod b/ui-ci/src/main/resources/ci/conf/credentials.yaml_prod new file mode 100644 index 0000000000..481b12b1e0 --- /dev/null +++ b/ui-ci/src/main/resources/ci/conf/credentials.yaml_prod @@ -0,0 +1,48 @@ + designer: { + username: m08740, + password: 272v!suAL37, + firstname: ASDC, + lastname: VITI + } + admin: { + username: m08741, + password: 863B@rroN27, + firstname: ASDC, + lastname: VITI + } + ops: { + username: m08742, + password: 364K!NDRed63, + firstname: ASDC, + lastname: VITI + } + tester: { + username: m08743, + password: 373m@rBLE28, + firstname: ASDC, + lastname: VITI + } + governor: { + username: m08744, + password: 742M!DDLE44, + firstname: ASDC, + lastname: VITI + } + product_strategist1: { + username: m08745, + password: 824S@Nder35, + firstname: ASDC, + lastname: VITI + } + product_manager1: { + username: m08746, + password: 747ICK!Y99, + firstname: ASDC, + lastname: VITI + } + product_local: { + username: m08747, + password: 623z!Ggy75, + firstname: ASDC, + lastname: VITI + } \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/conf/credentials.yaml_webtest b/ui-ci/src/main/resources/ci/conf/credentials.yaml_webtest new file mode 100644 index 0000000000..ab37f7bee8 --- /dev/null +++ b/ui-ci/src/main/resources/ci/conf/credentials.yaml_webtest @@ -0,0 +1,48 @@ + designer: { + username: cs0008, + password: 123123a, + firstname: ASDC, + lastname: KASPIN + } + admin: { + username: jh0003, + password: 123123a, + firstname: ASDC, + lastname: KASPIN + } + ops: { + username: af0006, + password: 123123a, + firstname: ASDC, + lastname: KASPIN + } + tester: { + username: kb0004, + password: 123123a, + firstname: ASDC, + lastname: KASPIN + } + governor: { + username: ah0002, + password: 123123a, + firstname: ASDC, + lastname: KASPIN + } + product_strategist: { + username: m99126, + password: 1910-FruitGum, + firstname: ASDC, + lastname: KASPIN + } + product_manager: { + username: m99127, + password: 747-Airplane, + firstname: ASDC, + lastname: KASPIN + } + product_local: { + username: pm0001, + password: 123123a, + firstname: ASDC, + lastname: KASPIN + } \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/conf/extent-config.xml b/ui-ci/src/main/resources/ci/conf/extent-config.xml new file mode 100644 index 0000000000..ab04b2678a --- /dev/null +++ b/ui-ci/src/main/resources/ci/conf/extent-config.xml @@ -0,0 +1,51 @@ + + + + + + standard + + + + UTF-8 + + + + https + + + ASDC Automation Report + + + ASDC Automation Report + + + + + + + yyyy-MM-dd + + + + HH:mm:ss + + + + "); + $('.logo-content' ).remove(); + $('.charts div:nth-child(2)').remove(); + }); + ]]> + + + + + + + + \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/conf/log4j.properties b/ui-ci/src/main/resources/ci/conf/log4j.properties new file mode 100644 index 0000000000..3e159ec8df --- /dev/null +++ b/ui-ci/src/main/resources/ci/conf/log4j.properties @@ -0,0 +1,34 @@ +# Define the root logger with appender file +log4j.rootLogger = DEBUG, FILE, stdout + +# Define the file appender +log4j.appender.FILE=org.apache.log4j.RollingFileAppender +log4j.appender.FILE.File=${targetlog}logs/ci-log.out + +# Define the layout for file appender +log4j.appender.FILE.layout=org.apache.log4j.PatternLayout +log4j.appender.FILE.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p [%10c] : %m%n + +# Set the maximum file size before rollover +log4j.appender.FILE.maxFileSize=5MB + +# Set the the backup index +log4j.appender.FILE.maxBackupIndex=10 + + +############################################################# + +# Direct log messages to stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n +log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p %10c:%L - %m%n + +log4j.logger.org.apache.cassandra.service.StorageProxy=DEBUG +log4j.logger.com.thinkaurelius.titan.diskstorage.cassandra.CassandraTransaction=INFO, FILE, stdout + +log4j.logger.org.openecomp.sdc.ci.tests.utils=TRACE, FILE, stdout +log4j.additivity.org.openecomp.sdc.ci.tests.utils=false + + diff --git a/ui-ci/src/main/resources/ci/conf/titan.properties b/ui-ci/src/main/resources/ci/conf/titan.properties new file mode 100644 index 0000000000..94d12cfba0 --- /dev/null +++ b/ui-ci/src/main/resources/ci/conf/titan.properties @@ -0,0 +1,7 @@ +storage.backend=cassandra +storage.hostname=cassandrahost +storage.port=9160 + +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.5 \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/drivers/chromedriver.exe b/ui-ci/src/main/resources/ci/drivers/chromedriver.exe new file mode 100644 index 0000000000..97464543e7 Binary files /dev/null and b/ui-ci/src/main/resources/ci/drivers/chromedriver.exe differ diff --git a/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh b/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh new file mode 100644 index 0000000000..0d494d919d --- /dev/null +++ b/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh @@ -0,0 +1,75 @@ +#!/bin/bash + +function help_usage () +{ + echo "$0 -ip -f " + echo "for example: -ip 127.0.0.1 -f /var/tmp/userToAdd.txt" + exit +} + +function check_file_existance () +{ +echo "check_file_existance $1" +if [ $1 == "" ]; then + echo "Please provide full path to user file" + exit; +elif [ -f $1 ]; then + source $1 + USERS=("${USER_LIST[@]}") + echo "file exist" $1 +else + echo "Provided user file does not exist" + exit +fi +} + +function check_ip_existance () +{ +if [ $1 == "" ]; then + echo "Please provide ip address" + exit; +fi +} + +function addUser () +{ + #for user in "${USER_LIST[@]}"; do + for user in "${USERS[@]}"; do + PING=`ping -c 1 $IP > /var/tmp/ping.log` + pattern1='100% packet loss' + pattern2='Host Unreachable' + COUNT=`egrep -c "$pattern1|$pattern2" /var/tmp/ping.log` + if [ $COUNT -eq 0 ]; then + # curl -i -X post -d '{ "userId" : "kk1123", "role" : "ADMIN" }' -H "Content-Type: application/json" -H "USER_ID: jh0003" http://192.168.111.9:8080/sdc2/rest/v1/user + userId=`echo $user|awk '{print $1}'` + role=`echo $user|awk '{print $2}'` + curl -i -X post -d '{ "userId" : "'${userId}'", "role" : "'${role}'" }' -H "Content-Type: application/json" -H "USER_ID: jh0003" http://${IP}:8080/sdc2/rest/v1/user + else + echo "Host" $IP "Is Unreachable" + fi + done +} + +#main +[ $# -eq 0 ] && help_usage +while [ $# -ne 0 ]; do + case $1 in + "-f") + USER_FILE=$2 + shift 1 + shift 1 + ;; + -ip) + IP=$2 + shift 1 + shift 1 + ;; + *) +# help_usage + ;; + esac +done + +check_file_existance $USER_FILE +check_ip_existance $IP +addUser diff --git a/ui-ci/src/main/resources/ci/scripts/copyToStorage.sh b/ui-ci/src/main/resources/ci/scripts/copyToStorage.sh new file mode 100644 index 0000000000..396c1aa0ac --- /dev/null +++ b/ui-ci/src/main/resources/ci/scripts/copyToStorage.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +REPORT_NAME=$1 +VERSION=$2 +ENV=$3 +IP=$3 + +if [ -z "$REPORT_NAME" ] + then + source ExtentReport/versions.info + now=$(date +'%Y-%m-%d_%H_%M') + REPORT_NAME="${now}" + VERSION="${osVersion}" + if [[ $env == *"DEV20"* ]] + then + ENV="Nightly" + else + ENV="" + fi + + fi + +/usr/bin/expect << EOF +spawn ssh admin@${IP} mkdir -p -m 775 /home/admin/reports/${ENV}/${VERSION}/UI/ + +expect { + -re ".*es.*o.*" { + exp_send "yes\r" + exp_continue + } + -re ".*sword.*" { + exp_send "Aa123456\r" + } +} + +expect eof + +spawn scp -pr ExtentReport admin@{IP}:/home/admin/reports/${ENV}/${VERSION}/UI/${REPORT_NAME}/ + +expect { + -re ".*es.*o.*" { + exp_send "yes\r" + exp_continue + } + -re ".*sword.*" { + exp_send "Aa123456\r" + } +} + +expect eof +EOF diff --git a/ui-ci/src/main/resources/ci/scripts/sendMail.sh b/ui-ci/src/main/resources/ci/scripts/sendMail.sh new file mode 100644 index 0000000000..794534fc8a --- /dev/null +++ b/ui-ci/src/main/resources/ci/scripts/sendMail.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +now=$(date +'%Y%-m%d%H%M') + +REPORT_NAME=$1 +VERSION=$2 +ENV=$3 + +RECIPIENTS1="dl-sdcqa@intl.att.com,ml636r@intl.att.com,bl5783intl.att.com,ak314p@intl.att.com,el489u@intl.att.com,hk096q@intl.att.com,bs5719@intl.att.com" +RECIPIENTS2="dl-asdcqa@intl.att.com" + +source ExtentReport/versions.info +if [ -z "$REPORT_NAME" ] + then + source ExtentReport/versions.info + now=$(date +'%Y-%m-%d_%H_%M') + REPORT_NAME="${now}" + VERSION="${osVersion}" + + +fi + +if [[ $env == *"DEV20"* ]] + then + ENV="Nightly" + RECIPIENTS=$RECIPIENTS1 + else + ENV="" + RECIPIENTS=$RECIPIENTS2 +fi + +#REPORT_ZIP_FILE=ExtentReport_${now}.zip +REPORT_FOLDER='ExtentReport' +REPORT_HTML_FILE=${REPORT_FOLDER}/*Report.html +BODY_MESSAGE='Hello, \n\n Please find automation results on following link: \n\n http://asdc-srv-210-45.tlv.intl.att.com/'${ENV}'/'${VERSION}'/UI/'${REPORT_NAME}'/SDC_UI_Extent_Report.html \n\nThanks, \nASDC QA Team\n\n ' + +#OLD_FILE=$(find ./ -type f -name ${REPORT_ZIP_FILE} -print) +#if [ ! -z ${OLD_FILE} ] +#then +# rm -f ${REPORT_ZIP_FILE} +# echo "Removing old zip file............" +#fi + +#echo "Creating new zip file" +#zip -r ${REPORT_ZIP_FILE} ./${REPORT_FOLDER} + + + +echo -e ${BODY_MESSAGE} | mail -s 'E2E Automation '$ENV' results - SDC '$VERSION -r 'ASDC@Automation.team' $RECIPIENTS diff --git a/ui-ci/src/main/resources/ci/scripts/startTest.sh b/ui-ci/src/main/resources/ci/scripts/startTest.sh new file mode 100644 index 0000000000..737b538b01 --- /dev/null +++ b/ui-ci/src/main/resources/ci/scripts/startTest.sh @@ -0,0 +1,155 @@ +#!/bin/bash +REMOTE_DEBUG=false +RERUN=true +JAVA_OPTION="" +debug_port=8000 +TEST_SUITES=testSuites +fileName=testng-failed.xml + +function help_usage () +{ + echo + echo "$0 ( ) [-r/rerun -d/debug ]" + echo "nohup ./startTest.sh ui-ci-1707.0.5-SNAPSHOT-jar-with-dependencies.jar extendedSanity.xml -r false -d true &" + echo "by default rerun is true and remote debug is false." + echo + exit 2 +} + +function isBoolean () +{ + PARAM_NAME=$1 + VALUE=$2 + if [[ ${VALUE} != "true" ]] && [[ ${VALUE} != "false" ]]; then + echo "Valid parameter" ${PARAM_NAME} "values are: true/false" + help_usage + fi +} + +function prepareFailedXmlFile () +{ + echo "1="$1 "2="$2 "fileName="${fileName} + PATTERN=`grep -w "test name=" ${FULL_PATH}/${TEST_SUITES}/$2 | awk -F'"' '{print $2}'` + sed '/ ${FULL_PATH}/${TEST_SUITES}/${fileName} + sed -i 's/thread-count="[0-9]\+"/thread-count="1"/g' ${FULL_PATH}/${TEST_SUITES}/${fileName} +} + +#main +[ $# -lt 2 ] && help_usage + +JAR_FILE=$1 +SUITE_FILE=$2 + +while [ $# -ne 0 ]; do + case $1 in + -r|rerun) + RERUN=$2 + isBoolean $1 ${RERUN} + shift 1 + shift 1 + ;; + -d|debug) + REMOTE_DEBUG=$2 + isBoolean $1 ${REMOTE_DEBUG} + shift 1 + shift 1 + ;; + *) + shift 1 + ;; + esac +done + +CURRENT_DIR=`pwd` +BASEDIR=$(dirname $0) + +if [ ${BASEDIR:0:1} = "/" ] +then + FULL_PATH=$BASEDIR +else + FULL_PATH=$CURRENT_DIR/$BASEDIR +fi +LOGS_PROP_FILE=file:${FULL_PATH}/conf/log4j.properties +############################################# +TARGET_DIR=${FULL_PATH}/target +CONF_FILE=${FULL_PATH}/conf/attsdc.yaml + +DEBUG=true +MainClass=org.openecomp.sdc.ci.tests.run.StartTest + +TESTS_DIR=/opt/app/sdc/ci/resources/tests +COMPONENTS_DIR=/opt/app/sdc/ci/resources/components + + +TARGET_LOG_DIR="${TARGET_DIR}/" + + +######ADD USERS################ + +BE_IP=`cat conf/attsdc.yaml | grep catalogBeHost| awk '{print $2}'` + +ADD_USERS_SCRIPT="addUsersFromList_new.sh" +USER_LIST="userList.txt" +chmod +x ${ADD_USERS_SCRIPT} +echo "add users..." +`./${ADD_USERS_SCRIPT} -ip ${BE_IP} -f ${USER_LIST}` + + + + +if [ ${REMOTE_DEBUG} == "true" ]; then + echo "Debug mode, Listen on port $debug_port"; + JAVA_OPTION="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=${debug_port}" ; +fi + +cmd="java -Xmx2048m -Xms1024m $JAVA_OPTION -DdisplayException=true -Dtargetlog=${TARGET_LOG_DIR} -Dfilepath=${FILES_TEST} -Dconfig.resource=${CONF_FILE} -Ddebug=${DEBUG} -Dlog4j.configuration=${LOGS_PROP_FILE} -cp $JAR_FILE ${MainClass} $SUITE_FILE &" + + +if [ $DEBUG == "true" ] +then + $cmd +else + $cmd >> /dev/null +fi + +if [ ${RERUN} == "true" ]; then + if [ -f ${TARGET_DIR}/${fileName} ]; then + echo "Prepare" ${TARGET_DIR}/${fileName} "file to rerun all failed tests ..."; + prepareFailedXmlFile ${TARGET_DIR}/${fileName} $SUITE_FILE; + SUITE_FILE=${fileName}; + cmd="java -Xmx2048m -Xms1024m $JAVA_OPTION -DdisplayException=true -Dtargetlog=${TARGET_LOG_DIR} -Dfilepath=${FILES_TEST} -Dconfig.resource=${CONF_FILE} -Ddebug=${DEBUG} -Dlog4j.configuration=${LOGS_PROP_FILE} -cp $JAR_FILE ${MainClass} $SUITE_FILE &" + $cmd; + fi +fi + +status=`echo $?` + +source ExtentReport/versions.info +now=$(date +'%Y-%m-%d_%H_%M') +REPORT_NAME=${now} +VERSION=${osVersion} + +if [[ $env == *"DEV20"* ]] +then + MYENV="Nightly" +else + MYENV="" +fi + +COPY_REPORT_SCRIPT="copyToStorage.sh" +chmod +x ${COPY_REPORT_SCRIPT} +echo "copy report to storage..." +sh ./${COPY_REPORT_SCRIPT} ${REPORT_NAME} ${VERSION} ${MYENV} + + +MAILING_SCRIPT_NAME="sendMail.sh" +chmod +x ${MAILING_SCRIPT_NAME} +echo "Sending report via mail..." +`./${MAILING_SCRIPT_NAME} ${REPORT_NAME} ${VERSION} ${MYENV}` + + +echo "##################################################" +echo "################# status is ${status} #################" +echo "##################################################" + +exit $status diff --git a/ui-ci/src/main/resources/ci/scripts/userList.txt b/ui-ci/src/main/resources/ci/scripts/userList.txt new file mode 100644 index 0000000000..a1326599dc --- /dev/null +++ b/ui-ci/src/main/resources/ci/scripts/userList.txt @@ -0,0 +1 @@ +export USER_LIST=( "m99121 DESIGNER" "cs0008 DESIGNER" "kb0004 TESTER" "af0006 OPS" "ah0002 GOVERNOR" "m08740 DESIGNER" "m99124 TESTER" "m08743 TESTER" "m99123 OPS" "m08742 OPS" "m99125 GOVERNOR" "m08744 GOVERNOR" "m99122 ADMIN" "m08741 ADMIN" "m99126 PRODUCT_STRATEGIST" "m08745 PRODUCT_STRATEGIST" "m99127 PRODUCT_MANAGER" "m08746 PRODUCT_MANAGER" "md9897 DESIGNER" "m08748 DESIGNER" "m08749 TESTER" "be0695 DESIGNER" "er434w DESIGNER" "ya107f DESIGNER" "ds200p DESIGNER" "ak0333 ADMIN" "th0695 DESIGNER" "al714h DESIGNER" "ys9693 DESIGNER" "ss8214 DESIGNER" "bt750h DESIGNER" "rp955r DESIGNER" "ez6451 DESIGNER" "ia901h DESIGNER" "ah7840 DESIGNER" "ea394r DESIGNER" "ms656r DESIGNER" "ml636r DESIGNER" "it1721 DESIGNER" "sg473v DESIGNER" "sa997j DESIGNER" "az2497 DESIGNER" "ys189e DESIGNER" "ig642y DESIGNER" ) diff --git a/ui-ci/src/main/resources/ci/testSuites/andreyPara.xml b/ui-ci/src/main/resources/ci/testSuites/andreyPara.xml new file mode 100644 index 0000000000..f4f99db3a1 --- /dev/null +++ b/ui-ci/src/main/resources/ci/testSuites/andreyPara.xml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/testSuites/devOnboardSanity.xml b/ui-ci/src/main/resources/ci/testSuites/devOnboardSanity.xml new file mode 100644 index 0000000000..5b44e68375 --- /dev/null +++ b/ui-ci/src/main/resources/ci/testSuites/devOnboardSanity.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/testSuites/devSanity.xml b/ui-ci/src/main/resources/ci/testSuites/devSanity.xml new file mode 100644 index 0000000000..6c4ba547b1 --- /dev/null +++ b/ui-ci/src/main/resources/ci/testSuites/devSanity.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml b/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml new file mode 100644 index 0000000000..a8dcf84c73 --- /dev/null +++ b/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/testSuites/fullCI.xml b/ui-ci/src/main/resources/ci/testSuites/fullCI.xml new file mode 100644 index 0000000000..940026d30c --- /dev/null +++ b/ui-ci/src/main/resources/ci/testSuites/fullCI.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/testSuites/onboardingVNFs.xml b/ui-ci/src/main/resources/ci/testSuites/onboardingVNFs.xml new file mode 100644 index 0000000000..e263a4a3f4 --- /dev/null +++ b/ui-ci/src/main/resources/ci/testSuites/onboardingVNFs.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui-ci/src/main/resources/ci/testSuites/sanity.xml b/ui-ci/src/main/resources/ci/testSuites/sanity.xml new file mode 100644 index 0000000000..c8fd8f14b1 --- /dev/null +++ b/ui-ci/src/main/resources/ci/testSuites/sanity.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui-ci/src/main/resources/images/gizmorambo.jpg b/ui-ci/src/main/resources/images/gizmorambo.jpg new file mode 100644 index 0000000000..c9a8fe8a64 Binary files /dev/null and b/ui-ci/src/main/resources/images/gizmorambo.jpg differ -- cgit 1.2.3-korg