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 --- .../main/resources/ci/conf/attsdc-packages.yaml | 12 + .../src/main/resources/ci/conf/attsdc.yaml | 93 +++++ .../src/main/resources/ci/conf/extent-config.xml | 51 +++ .../src/main/resources/ci/conf/log4j.properties | 34 ++ test-apis-ci/src/main/resources/ci/conf/log4j.xml | 32 ++ .../src/main/resources/ci/conf/testngLifeCycle.xml | 27 ++ .../src/main/resources/ci/conf/titan.properties | 8 + test-apis-ci/src/main/resources/ci/conf/truststore | Bin 0 -> 971 bytes .../resources/ci/scripts/addUsersFromList_new.sh | 75 ++++ .../src/main/resources/ci/scripts/copyToStorage.sh | 66 ++++ .../src/main/resources/ci/scripts/sendMail.sh | 46 +++ .../src/main/resources/ci/scripts/startTest.sh | 153 ++++++++ .../src/main/resources/ci/scripts/userList.txt | 1 + .../main/resources/ci/testSuites/CRUDArtifacts.xml | 40 +++ .../resources/ci/testSuites/SearchExternalAPI.xml | 23 ++ .../src/main/resources/ci/testSuites/artifacts.xml | 19 + .../src/main/resources/ci/testSuites/category.xml | 11 + .../src/main/resources/ci/testSuites/ciFull.xml | 221 ++++++++++++ .../main/resources/ci/testSuites/externalAPIs.xml | 31 ++ .../src/main/resources/ci/testSuites/general.xml | 11 + .../src/main/resources/ci/testSuites/imports.xml | 12 + .../src/main/resources/ci/testSuites/product.xml | 14 + .../main/resources/ci/testSuites/productAPIs.xml | 20 ++ .../src/main/resources/ci/testSuites/property.xml | 11 + .../src/main/resources/ci/testSuites/resource.xml | 360 +++++++++++++++++++ .../src/main/resources/ci/testSuites/sanity.xml | 394 +++++++++++++++++++++ .../src/main/resources/ci/testSuites/service.xml | 15 + .../resources/ci/testSuites/testngLifeCycle.xml | 27 ++ .../src/main/resources/ci/testSuites/user.xml | 18 + test-apis-ci/src/main/resources/log4j.properties | 34 ++ test-apis-ci/src/main/resources/log4j.xml | 32 ++ test-apis-ci/src/main/resources/logback.xml | 25 ++ 32 files changed, 1916 insertions(+) create mode 100644 test-apis-ci/src/main/resources/ci/conf/attsdc-packages.yaml create mode 100644 test-apis-ci/src/main/resources/ci/conf/attsdc.yaml create mode 100644 test-apis-ci/src/main/resources/ci/conf/extent-config.xml create mode 100644 test-apis-ci/src/main/resources/ci/conf/log4j.properties create mode 100644 test-apis-ci/src/main/resources/ci/conf/log4j.xml create mode 100644 test-apis-ci/src/main/resources/ci/conf/testngLifeCycle.xml create mode 100644 test-apis-ci/src/main/resources/ci/conf/titan.properties create mode 100644 test-apis-ci/src/main/resources/ci/conf/truststore create mode 100644 test-apis-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh create mode 100644 test-apis-ci/src/main/resources/ci/scripts/copyToStorage.sh create mode 100644 test-apis-ci/src/main/resources/ci/scripts/sendMail.sh create mode 100644 test-apis-ci/src/main/resources/ci/scripts/startTest.sh create mode 100644 test-apis-ci/src/main/resources/ci/scripts/userList.txt create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/CRUDArtifacts.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/SearchExternalAPI.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/artifacts.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/category.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/ciFull.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/externalAPIs.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/general.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/imports.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/product.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/productAPIs.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/property.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/resource.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/sanity.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/service.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/testngLifeCycle.xml create mode 100644 test-apis-ci/src/main/resources/ci/testSuites/user.xml create mode 100644 test-apis-ci/src/main/resources/log4j.properties create mode 100644 test-apis-ci/src/main/resources/log4j.xml create mode 100644 test-apis-ci/src/main/resources/logback.xml (limited to 'test-apis-ci/src/main/resources') diff --git a/test-apis-ci/src/main/resources/ci/conf/attsdc-packages.yaml b/test-apis-ci/src/main/resources/ci/conf/attsdc-packages.yaml new file mode 100644 index 0000000000..5d1a3e1537 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/conf/attsdc-packages.yaml @@ -0,0 +1,12 @@ +packages: + - org.openecomp.sdc.ci.tests.execute.general + - org.openecomp.sdc.ci.tests.execute.user + - org.openecomp.sdc.ci.tests.execute.property + - org.openecomp.sdc.ci.tests.execute.lifecycle + - org.openecomp.sdc.ci.tests.execute.resource + - org.openecomp.sdc.ci.tests.execute.service + - org.openecomp.sdc.ci.tests.execute.artifacts + - org.openecomp.sdc.ci.tests.execute.imports + - org.openecomp.sdc.ci.tests.execute.category + - org.openecomp.sdc.ci.tests.execute.distribution + - org.openecomp.sdc.ci.tests.execute.product \ No newline at end of file diff --git a/test-apis-ci/src/main/resources/ci/conf/attsdc.yaml b/test-apis-ci/src/main/resources/ci/conf/attsdc.yaml new file mode 100644 index 0000000000..7273344672 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/conf/attsdc.yaml @@ -0,0 +1,93 @@ +outputFolder: target +reportName: index.html +catalogBeHost: behost +catalogFeHost: fehost +esHost: eshost +disributionClientHost: disClient +catalogFePort: 8181 +catalogBePort: 8080 +disributionClientPort: 8181 +isDistributionClientRunning: true +esPort: 9200 +neoHost: neoHost +neoPort: 7474 +neoDBusername: neo4j +neoDBpassword: 123456 +windowsDownloadDirectory: "c:\\apache-ftpserver-1.1.0\\res\\home" + +resourceConfigDir: src/test/resources/CI/tests +componentsConfigDir: src/test/resources/CI/components +importResourceConfigDir: ../catalog-be/src/main/resources/import/tosca/capability-types +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 + + +titanPropertiesFile: src/main/resources/ci/conf/titan.properties +cassandraHost: 127.0.0.1 +cassandraAuthenticate: false +cassandraUsername: koko +cassandraPassword: bobo +cassandraSsl: false +cassandraTruststorePath : /path/path +cassandraTruststorePassword : 123123 +cassandraAuditKeySpace: sdcaudit +cassandraArtifactKeySpace: sdcartifact +url: http://localhost:8181/sdc1/proxy-designer1#/dashboard + + +stopOnClassFailure: false + +#List of non-abstract resources to keep during titan cleanup between tests +#Only 1.0 version will be kept +resourcesNotToDelete: + - Compute + - Database + - ObjectStorage + - BlockStorage + - LoadBalancer + - Port + - Network + - Root + - ContainerApplication + - ContainerRuntime + - DBMS + - SoftwareComponent + - WebApplication + - WebServer + - CinderVolume + - ContrailVirtualNetwork + - NeutronNet + - NeutronPort + - NovaServer + - AbstractSubstitute + - ContrailAbstractSubstitute + - ContrailCompute + - ContrailNetworkRules + - ContrailPort + - ContrailV2NetworkRules + - ContrailV2VirtualMachineInterface + - ContrailV2VirtualNetwork + - ContrailVirtualNetwork + - VL ELINE + - SecurityRules + - VL + +#Resource categories to keep (including all their subcategories) +resourceCategoriesNotToDelete: + - Generic + - Network L2-3 + - Network L4+ + - Application L4+ + - Network Connectivity + - DCAE Component + - Template + - Allotted Resource + +#Service categories to keep +serviceCategoriesNotToDelete: + - Mobility + - Network L1-3 + - Network L4+ + - VoIP Call Control \ No newline at end of file diff --git a/test-apis-ci/src/main/resources/ci/conf/extent-config.xml b/test-apis-ci/src/main/resources/ci/conf/extent-config.xml new file mode 100644 index 0000000000..ab04b2678a --- /dev/null +++ b/test-apis-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/test-apis-ci/src/main/resources/ci/conf/log4j.properties b/test-apis-ci/src/main/resources/ci/conf/log4j.properties new file mode 100644 index 0000000000..d313e92b55 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/conf/log4j.properties @@ -0,0 +1,34 @@ +# Define the root logger with appender file +log4j.rootLogger = INFO, 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=INFO +log4j.logger.com.thinkaurelius.titan.diskstorage.cassandra.CassandraTransaction=INFO, FILE, stdout + +log4j.logger.org.openecomp.sdc.ci.tests.utils=INFO, FILE, stdout +log4j.additivity.org.openecomp.sdc.ci.tests.utils=false + + diff --git a/test-apis-ci/src/main/resources/ci/conf/log4j.xml b/test-apis-ci/src/main/resources/ci/conf/log4j.xml new file mode 100644 index 0000000000..6db233a1da --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/conf/log4j.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/conf/testngLifeCycle.xml b/test-apis-ci/src/main/resources/ci/conf/testngLifeCycle.xml new file mode 100644 index 0000000000..aa390dc213 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/conf/testngLifeCycle.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/conf/titan.properties b/test-apis-ci/src/main/resources/ci/conf/titan.properties new file mode 100644 index 0000000000..42e1998f89 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/conf/titan.properties @@ -0,0 +1,8 @@ +storage.backend=cassandra +#storage.hostname=cassandrahost +storage.hostname=localhost +storage.port=9160 + +cache.db-cache = false + + diff --git a/test-apis-ci/src/main/resources/ci/conf/truststore b/test-apis-ci/src/main/resources/ci/conf/truststore new file mode 100644 index 0000000000..bdec93d862 Binary files /dev/null and b/test-apis-ci/src/main/resources/ci/conf/truststore differ diff --git a/test-apis-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh b/test-apis-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh new file mode 100644 index 0000000000..0d494d919d --- /dev/null +++ b/test-apis-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/test-apis-ci/src/main/resources/ci/scripts/copyToStorage.sh b/test-apis-ci/src/main/resources/ci/scripts/copyToStorage.sh new file mode 100644 index 0000000000..30094fe235 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/scripts/copyToStorage.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +REPORT_NAME=$1 +VERSION=$2 +ENV=$3 +IP=$4 + +if [ -z "$REPORT_NAME" ] + then + source ExtentReport/versions.info + now=$(date -d '+7 hour' "+%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}/APIs/ + +expect { + -re ".*es.*o.*" { + exp_send "yes\r" + exp_continue + } + -re ".*sword.*" { + exp_send "Aa123456\r" + } +} + +expect eof + +spawn scp -r ExtentReport admin@${IP}:/home/admin/reports/${ENV}/${VERSION}/APIs/${REPORT_NAME}/ + +expect { + -re ".*es.*o.*" { + exp_send "yes\r" + exp_continue + } + -re ".*sword.*" { + exp_send "Aa123456\r" + } +} + +expect eof + +spawn ssh admin@${IP} chmod -R 775 /home/admin/reports/${ENV}/${VERSION}/APIs/${REPORT_NAME}/ + +expect { + -re ".*es.*o.*" { + exp_send "yes\r" + exp_continue + } + -re ".*sword.*" { + exp_send "Aa123456\r" + } +} + +expect eof + +EOF diff --git a/test-apis-ci/src/main/resources/ci/scripts/sendMail.sh b/test-apis-ci/src/main/resources/ci/scripts/sendMail.sh new file mode 100644 index 0000000000..4c23a7973e --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/scripts/sendMail.sh @@ -0,0 +1,46 @@ +#!/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 + now=$(date -d '+7 hour' "+%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}'/APIs/'${REPORT_NAME}'/SDC_CI_Extent_Report.html \n\nThanks, \nSDC 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 'External APIs Automation '$ENV' results - ASDC '$VERSION -r 'ASDC@Automation.team' $RECIPIENTS diff --git a/test-apis-ci/src/main/resources/ci/scripts/startTest.sh b/test-apis-ci/src/main/resources/ci/scripts/startTest.sh new file mode 100644 index 0000000000..d3c15026cd --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/scripts/startTest.sh @@ -0,0 +1,153 @@ +#!/bin/bash +REMOTE_DEBUG=false +RERUN=false +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/test-apis-ci/src/main/resources/ci/scripts/userList.txt b/test-apis-ci/src/main/resources/ci/scripts/userList.txt new file mode 100644 index 0000000000..a1326599dc --- /dev/null +++ b/test-apis-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/test-apis-ci/src/main/resources/ci/testSuites/CRUDArtifacts.xml b/test-apis-ci/src/main/resources/ci/testSuites/CRUDArtifacts.xml new file mode 100644 index 0000000000..e53da8da8a --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/CRUDArtifacts.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-apis-ci/src/main/resources/ci/testSuites/SearchExternalAPI.xml b/test-apis-ci/src/main/resources/ci/testSuites/SearchExternalAPI.xml new file mode 100644 index 0000000000..40c462a4cb --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/SearchExternalAPI.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-apis-ci/src/main/resources/ci/testSuites/artifacts.xml b/test-apis-ci/src/main/resources/ci/testSuites/artifacts.xml new file mode 100644 index 0000000000..24229b8586 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/artifacts.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/testSuites/category.xml b/test-apis-ci/src/main/resources/ci/testSuites/category.xml new file mode 100644 index 0000000000..f2a0b3790c --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/category.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/testSuites/ciFull.xml b/test-apis-ci/src/main/resources/ci/testSuites/ciFull.xml new file mode 100644 index 0000000000..26a85fd9c6 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/ciFull.xml @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-apis-ci/src/main/resources/ci/testSuites/externalAPIs.xml b/test-apis-ci/src/main/resources/ci/testSuites/externalAPIs.xml new file mode 100644 index 0000000000..3505dad3c4 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/externalAPIs.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-apis-ci/src/main/resources/ci/testSuites/general.xml b/test-apis-ci/src/main/resources/ci/testSuites/general.xml new file mode 100644 index 0000000000..bd7e6b6650 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/general.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/testSuites/imports.xml b/test-apis-ci/src/main/resources/ci/testSuites/imports.xml new file mode 100644 index 0000000000..ae4a5bc1f8 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/imports.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/testSuites/product.xml b/test-apis-ci/src/main/resources/ci/testSuites/product.xml new file mode 100644 index 0000000000..4ea495d0d7 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/product.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/testSuites/productAPIs.xml b/test-apis-ci/src/main/resources/ci/testSuites/productAPIs.xml new file mode 100644 index 0000000000..61950e9de7 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/productAPIs.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-apis-ci/src/main/resources/ci/testSuites/property.xml b/test-apis-ci/src/main/resources/ci/testSuites/property.xml new file mode 100644 index 0000000000..f94f89737a --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/property.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/testSuites/resource.xml b/test-apis-ci/src/main/resources/ci/testSuites/resource.xml new file mode 100644 index 0000000000..803fb01e70 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/resource.xml @@ -0,0 +1,360 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/testSuites/sanity.xml b/test-apis-ci/src/main/resources/ci/testSuites/sanity.xml new file mode 100644 index 0000000000..f642170b34 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/sanity.xml @@ -0,0 +1,394 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test-apis-ci/src/main/resources/ci/testSuites/service.xml b/test-apis-ci/src/main/resources/ci/testSuites/service.xml new file mode 100644 index 0000000000..18d5630c4e --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/service.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/testSuites/testngLifeCycle.xml b/test-apis-ci/src/main/resources/ci/testSuites/testngLifeCycle.xml new file mode 100644 index 0000000000..54f1868470 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/testngLifeCycle.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/ci/testSuites/user.xml b/test-apis-ci/src/main/resources/ci/testSuites/user.xml new file mode 100644 index 0000000000..948993c144 --- /dev/null +++ b/test-apis-ci/src/main/resources/ci/testSuites/user.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/log4j.properties b/test-apis-ci/src/main/resources/log4j.properties new file mode 100644 index 0000000000..d313e92b55 --- /dev/null +++ b/test-apis-ci/src/main/resources/log4j.properties @@ -0,0 +1,34 @@ +# Define the root logger with appender file +log4j.rootLogger = INFO, 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=INFO +log4j.logger.com.thinkaurelius.titan.diskstorage.cassandra.CassandraTransaction=INFO, FILE, stdout + +log4j.logger.org.openecomp.sdc.ci.tests.utils=INFO, FILE, stdout +log4j.additivity.org.openecomp.sdc.ci.tests.utils=false + + diff --git a/test-apis-ci/src/main/resources/log4j.xml b/test-apis-ci/src/main/resources/log4j.xml new file mode 100644 index 0000000000..6db233a1da --- /dev/null +++ b/test-apis-ci/src/main/resources/log4j.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test-apis-ci/src/main/resources/logback.xml b/test-apis-ci/src/main/resources/logback.xml new file mode 100644 index 0000000000..4723bc24cb --- /dev/null +++ b/test-apis-ci/src/main/resources/logback.xml @@ -0,0 +1,25 @@ + + + + + + %d{yyyy-MM-dd HH:mm:ss} | %-5p | [%thread] %logger{5}:%L - %msg%n + + + + + logFile.log + true + + %d{yyyy-MM-dd HH:mm:ss} | %-5p | [%thread] %logger{5}:%L - %msg%n + + + + + + + + + + + \ No newline at end of file -- cgit 1.2.3-korg