summaryrefslogtreecommitdiffstats
path: root/ui-ci/src/main/resources
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2018-03-04 14:53:33 +0200
committerMichael Lando <ml636r@att.com>2018-03-07 13:19:05 +0000
commita5445100050e49e83f73424198d73cd72d672a4d (patch)
treecacf4df817df31be23e4e790d1dda857bdae061e /ui-ci/src/main/resources
parent51157f92c21976cba4914c378aaa3cba49826931 (diff)
Sync Integ to Master
Change-Id: I71e3acc26fa612127756ac04073a522b9cc6cd74 Issue-ID: SDC-977 Signed-off-by: Gitelman, Tal (tg851x) <tg851x@intl.att.com>
Diffstat (limited to 'ui-ci/src/main/resources')
-rw-r--r--ui-ci/src/main/resources/META-INF/aop-ajc.xml15
-rw-r--r--ui-ci/src/main/resources/ci/conf/attsdc.yaml2
-rw-r--r--ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh4
-rw-r--r--ui-ci/src/main/resources/ci/scripts/sendMail.sh5
-rw-r--r--ui-ci/src/main/resources/ci/scripts/startTest.sh34
-rw-r--r--ui-ci/src/main/resources/ci/testSuites/PortMirroring.xml9
-rw-r--r--ui-ci/src/main/resources/ci/testSuites/andreyPara.xml29
-rw-r--r--ui-ci/src/main/resources/ci/testSuites/devOnboardE2EOneFileSanity.xml2
-rw-r--r--ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml13
-rw-r--r--ui-ci/src/main/resources/log4j2.xml38
-rw-r--r--ui-ci/src/main/resources/reportportal.properties5
11 files changed, 135 insertions, 21 deletions
diff --git a/ui-ci/src/main/resources/META-INF/aop-ajc.xml b/ui-ci/src/main/resources/META-INF/aop-ajc.xml
new file mode 100644
index 0000000000..8587abb2e1
--- /dev/null
+++ b/ui-ci/src/main/resources/META-INF/aop-ajc.xml
@@ -0,0 +1,15 @@
+<aspectj>
+
+<aspects>
+<aspect name="com.att.automation.common.report_portal_integration.aspects.StepAspects"/>
+<aspect name="com.att.automation.common.report_portal_integration.aspects.WebDriverAspects"/>
+<aspect name="com.att.automation.common.report_portal_integration.aspects.AssertAspects"/>
+<aspect name="com.att.automation.common.report_portal_integration.aspects.ReportPortalAspects"/>
+</aspects>
+<weaver options="-Xset:weaveJavaxPackages=true -warn:none -Xlint:ignore">
+<include within="org.openecomp.sdc.ci.tests..*"/>
+<include within="com.att.automation..*"/>
+<include within="com.epam..*"/>
+<include within="org.testng.TestNG"/>
+</weaver>
+</aspectj> \ 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
index 9537cf5360..403d915aef 100644
--- a/ui-ci/src/main/resources/ci/conf/attsdc.yaml
+++ b/ui-ci/src/main/resources/ci/conf/attsdc.yaml
@@ -39,6 +39,8 @@ windowsDownloadDirectory: "c:\\apache-ftpserver-1.1.0\\res\\home\\"
systemUnderDebug: false
reportDBhost: dbhost
reportDBport: 27017
+sdcHttpMethod: https
+localDataCenter: DC-Automate01
useBrowserMobProxy: false
captureTraffic: false
diff --git a/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh b/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh
index 1b6f0258d6..e695db26b2 100644
--- a/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh
+++ b/ui-ci/src/main/resources/ci/scripts/addUsersFromList_new.sh
@@ -46,12 +46,12 @@ function addUser ()
firstName=`echo $user|awk '{print $3}'`
lastName=`echo $user|awk '{print $4}'`
email=`echo $user|awk '{print $5}'`
- curl --noproxy '*' -i -X post -d '{ "userId" : "'${userId}'", "role" : "'${role}'", "firstName" : "'${firstName}'", "lastName" : "'${lastName}'", "email" : "'${email}'" }' -H "Content-Type: application/json" -H "USER_ID: jh0003" http://${IP}:8080/sdc2/rest/v1/user
+ curl --noproxy '*' -i -X post -d '{ "userId" : "'${userId}'", "role" : "'${role}'", "firstName" : "'${firstName}'", "lastName" : "'${lastName}'", "email" : "'${email}'" }' -H "Content-Type: application/json" -H "USER_ID: jh0003" https://${IP}:8443/sdc2/rest/v1/user
else
echo "Host" $IP "Is Unreachable"
fi
done
-curl --noproxy '*' -i -X post -d '{"consumerName": "ci","consumerSalt": "2a1f887d607d4515d4066fe0f5452a50","consumerPassword": "0a0dc557c3bf594b1a48030e3e99227580168b21f44e285c69740b8d5b13e33b"}' -H "Content-Type: application/json" -H "USER_ID: jh0003" -H "Authorization:Basic Y2k6MTIzNDU2" http://${IP}:8080/sdc2/rest/v1/consumers
+curl --noproxy '*' -i -X post -d '{"consumerName": "ci","consumerSalt": "2a1f887d607d4515d4066fe0f5452a50","consumerPassword": "0a0dc557c3bf594b1a48030e3e99227580168b21f44e285c69740b8d5b13e33b"}' -H "Content-Type: application/json" -H "USER_ID: jh0003" -H "Authorization:Basic Y2k6MTIzNDU2" https://${IP}:8443/sdc2/rest/v1/consumers
}
diff --git a/ui-ci/src/main/resources/ci/scripts/sendMail.sh b/ui-ci/src/main/resources/ci/scripts/sendMail.sh
index 794534fc8a..ead4e343d6 100644
--- a/ui-ci/src/main/resources/ci/scripts/sendMail.sh
+++ b/ui-ci/src/main/resources/ci/scripts/sendMail.sh
@@ -6,8 +6,9 @@ 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"
+RECIPIENTS1="dl-sdcqa@att.com,ml636r@att.com,bl5783@att.com,ak314p@att.com,el489u@att.com,hk096q@att.com,bs5719@att.com"
+#RECIPIENTS2="dl-asdcqa@att.com"
+RECIPIENTS2="md9897@att.com,ms656r@att.com,al714h@att.com,ak991p@att.com,ya107f@att.com,bv095y@att.com,st198j@att.com,th0695@att.com,vk195d@att.com,gg980r@att.com,il0695@att.com,el489u@att.com"
source ExtentReport/versions.info
if [ -z "$REPORT_NAME" ]
diff --git a/ui-ci/src/main/resources/ci/scripts/startTest.sh b/ui-ci/src/main/resources/ci/scripts/startTest.sh
index 8bf35a5d88..e1065583aa 100644
--- a/ui-ci/src/main/resources/ci/scripts/startTest.sh
+++ b/ui-ci/src/main/resources/ci/scripts/startTest.sh
@@ -22,7 +22,7 @@ function isBoolean ()
VALUE=$2
if [[ ${VALUE} != "true" ]] && [[ ${VALUE} != "false" ]]; then
echo "Valid parameter" ${PARAM_NAME} "values are: true/false"
- help_usage
+ help_usage
fi
}
@@ -32,6 +32,27 @@ function prepareFailedXmlFile ()
PATTERN=`grep -w "test name=" ${FULL_PATH}/${TEST_SUITES}/$2 | awk -F'"' '{print $2}'`
sed '/<test name="'${PATTERN}'"/,/<!-- '${PATTERN}' --/d' $1 > ${FULL_PATH}/${TEST_SUITES}/${fileName}
sed -i 's/thread-count="[0-9]\+"/thread-count="1"/g' ${FULL_PATH}/${TEST_SUITES}/${fileName}
+ if [ -s "ExtentReport/ShortReport.csv" ]
+ then
+ SKIP_TESTS_LIST=$(cat ExtentReport/ShortReport.csv |awk -F, '{print $2}' | sed 's/&.*//g' | uniq)
+ for SKIP_TEST in ${SKIP_TESTS_LIST}; do
+ sed -i "s/.*\"${SKIP_TEST}\".*//g" ${FULL_PATH}/${TEST_SUITES}/${fileName};
+ done;
+ fi
+}
+
+function setUpdatedTimeToReport ()
+{
+ LINE_NUMBER_OF_START_REPORT_DATE=`grep -A1 -nw "Start" ExtentReport/SDC_UI_Extent_Report.html | tail -1 | awk '{print $1}' | tr -d -`
+ END_REPORT_DATE=`grep -A1 -nw "End" ExtentReport/SDC_UI_Extent_Report.html | tail -1 | awk -F'[>|<]' '{print $3}'`
+ EPOCH_START_REPORT_DATE=`date --date="${1}" +%s`
+ EPOCH_END_REPORT_DATE=`date --date="${END_REPORT_DATE}" +%s`
+ let DIFF_EPOCH_TIME=${EPOCH_END_REPORT_DATE}-${EPOCH_START_REPORT_DATE}
+ TAKEN_TIME_IN_MINUTES=`echo $((${DIFF_EPOCH_TIME}/60))`
+ LINE_NUMBER_OF_TAKEN_REPORT_TIME=`grep -A1 -nw "Time Taken" ExtentReport/SDC_UI_Extent_Report.html | tail -1 | awk '{print $1}' | tr -d -`
+ PATTERN="div class='panel-lead'>";
+ sed -i "${LINE_NUMBER_OF_START_REPORT_DATE}s/${PATTERN}.*\</${PATTERN}$1\<\//1" ExtentReport/SDC_UI_Extent_Report.html
+ sed -i "${LINE_NUMBER_OF_TAKEN_REPORT_TIME}s/${PATTERN}.*\</${PATTERN}${TAKEN_TIME_IN_MINUTES} min\<\//1" ExtentReport/SDC_UI_Extent_Report.html
}
#main
@@ -92,7 +113,7 @@ ADD_USERS_SCRIPT="addUsersFromList_new.sh"
USER_LIST="conf/userList.txt"
chmod +x ${ADD_USERS_SCRIPT}
echo "add users..."
-`./${ADD_USERS_SCRIPT} -ip ${BE_IP} -f ${USER_LIST}`
+./${ADD_USERS_SCRIPT} -ip ${BE_IP} -f ${USER_LIST}
@@ -117,7 +138,7 @@ if [ ${RERUN} == "true" ]; 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="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
@@ -128,6 +149,11 @@ source ExtentReport/versions.info
now=$(date +'%Y-%m-%d_%H_%M')
REPORT_NAME=${now}
VERSION=${osVersion}
+REPORT_START_DATE=${reportStartTime}
+
+if [ ${RERUN} == "true" ]; then
+ setUpdatedTimeToReport "${REPORT_START_DATE}";
+fi
if [[ $env == *"DEV20"* ]]
then
@@ -139,7 +165,7 @@ fi
COPY_REPORT_SCRIPT="copyToStorage.sh"
chmod +x ${COPY_REPORT_SCRIPT}
echo "copy report to storage..."
-sh ./${COPY_REPORT_SCRIPT} ${REPORT_NAME} ${VERSION} ${MYENV}
+( ./${COPY_REPORT_SCRIPT} ${REPORT_NAME} ${VERSION} ${MYENV} )
MAILING_SCRIPT_NAME="sendMail.sh"
diff --git a/ui-ci/src/main/resources/ci/testSuites/PortMirroring.xml b/ui-ci/src/main/resources/ci/testSuites/PortMirroring.xml
new file mode 100644
index 0000000000..da03e8285e
--- /dev/null
+++ b/ui-ci/src/main/resources/ci/testSuites/PortMirroring.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="uitests" configfailurepolicy="continue" parallel="methods" thread-count="2">
+ <test name="PortMirroringTests">
+ <classes>
+ <class name="org.openecomp.sdc.ci.tests.execute.sanity.PortMirroring"/>
+ </classes>
+ </test>
+</suite> \ No newline at end of file
diff --git a/ui-ci/src/main/resources/ci/testSuites/andreyPara.xml b/ui-ci/src/main/resources/ci/testSuites/andreyPara.xml
index f4f99db3a1..3e3efdd9cd 100644
--- a/ui-ci/src/main/resources/ci/testSuites/andreyPara.xml
+++ b/ui-ci/src/main/resources/ci/testSuites/andreyPara.xml
@@ -1,10 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="uitests" configfailurepolicy="continue" parallel="methods" thread-count="2" data-provider-thread-count="2">
- <test name="uiSanity">
+ <suite name="uitests" configfailurepolicy="continue" parallel="methods" thread-count="2" data-provider-thread-count="2">
+
+<listeners>
+ <listener class-name="com.att.automation.common.report_portal_integration.listeners.ReportPortalListener"/>
+</listeners>
+
+ <test name="VF1">
<classes>
- <class name="org.openecomp.sdc.ci.tests.execute.sanity.VfArtifacts"/>
- <!-- <class name="org.openecomp.sdc.ci.tests.execute.sanity.Vf"/> -->
+ <class name="org.openecomp.sdc.ci.tests.execute.sanity.Vf">
+ <methods>
+ <include name="updateVF"/>
+ </methods>
+ </class>
+
+ </classes>
+ </test> <!-- uitests -->
+
+ <test name="VF2">
+ <classes>
+ <class name="org.openecomp.sdc.ci.tests.execute.sanity.Vf">
+ <methods>
+ <include name="addUpdateDeleteDeploymentArtifactToVfTest"/>
+ <include name="addPropertiesToVfcInstanceInVfTest"/>
+ </methods>
+ </class>
+
</classes>
</test> <!-- uitests -->
</suite> <!-- uisuite --> \ No newline at end of file
diff --git a/ui-ci/src/main/resources/ci/testSuites/devOnboardE2EOneFileSanity.xml b/ui-ci/src/main/resources/ci/testSuites/devOnboardE2EOneFileSanity.xml
index 73ddc90cf3..8802e9f8ef 100644
--- a/ui-ci/src/main/resources/ci/testSuites/devOnboardE2EOneFileSanity.xml
+++ b/ui-ci/src/main/resources/ci/testSuites/devOnboardE2EOneFileSanity.xml
@@ -4,7 +4,7 @@
<test name="uitests">
<classes>
<!--onboard-->
- <class name="org.openecomp.sdc.ci.tests.execute.sanity.Onboard">
+ <class name="org.openecomp.sdc.ci.tests.execute.sanity.OnboardingFlowsUI">
<methods>
<include name="onboardVNFTestSanityOneFile"/>
</methods>
diff --git a/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml b/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml
index 87a52bde7a..b0bcc333a5 100644
--- a/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml
+++ b/ui-ci/src/main/resources/ci/testSuites/extendedSanity.xml
@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="uitests" configfailurepolicy="continue" parallel="methods" thread-count="2" data-provider-thread-count="2">
+<suite name="uitests" configfailurepolicy="continue" parallel="methods" thread-count="4" data-provider-thread-count="2">
<parameter name="makeDistribution" value="true"/>
<test name="uiSanity">
<classes>
- <class name="org.openecomp.sdc.ci.tests.dataProvider.OnbordingDataProviders">
- <methods>
- <include name="OnbordingDataProviders"/>
- </methods>
- </class>
- <class name="org.openecomp.sdc.ci.tests.execute.sanity.Onboard">
+ <class name="org.openecomp.sdc.ci.tests.execute.sanity.ToscaValidationTest"/>
+ <class name="org.openecomp.sdc.ci.tests.execute.sanity.OnboardingFlowsUI">
<methods>
<exclude name="onboardVNFTestSanity"/>
<exclude name="onboardVNFShotFlow"/>
@@ -21,6 +17,7 @@
</class>
<class name="org.openecomp.sdc.ci.tests.execute.sanity.CatalogLeftPanelTest"/>
<class name="org.openecomp.sdc.ci.tests.execute.sanity.Vf"/>
+ <class name="org.openecomp.sdc.ci.tests.execute.sanity.VfAPI"/>
<class name="org.openecomp.sdc.ci.tests.execute.sanity.Service"/>
<class name="org.openecomp.sdc.ci.tests.execute.sanity.ImportVFCAsset"/>
<class name="org.openecomp.sdc.ci.tests.execute.sanity.ImportDCAE"/>
@@ -37,7 +34,7 @@
<class name="org.openecomp.sdc.ci.tests.US.MIBsArtifactsOnResourceInstance"/>
<class name="org.openecomp.sdc.ci.tests.US.NewArtifactTypeGuide"/>
<class name="org.openecomp.sdc.ci.tests.US.RemoveRestrictionOfDeploymentArtifacts"/>
- <class name="org.openecomp.sdc.ci.tests.execute.sanity.OnboardingFlows"/>
+ <class name="org.openecomp.sdc.ci.tests.execute.sanity.OnboardingFlowsThroughAPI"/>
<class name="org.openecomp.sdc.ci.tests.execute.sanity.PortMirroring"/>
<!-- <class name="org.openecomp.sdc.ci.tests.US.AddComponentInstancesArtifactsInCsar"/> -->
diff --git a/ui-ci/src/main/resources/log4j2.xml b/ui-ci/src/main/resources/log4j2.xml
new file mode 100644
index 0000000000..5a92e611b0
--- /dev/null
+++ b/ui-ci/src/main/resources/log4j2.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="ERROR" packages="com.epam.ta.reportportal.log4j.appender">
+ <properties>
+ <property name="pattern">[%d{HH:mm:ss,SSS}] %-5p (%F:%L) - %m%n</property>
+ <property name="report.pattern">%m%n</property>
+ </properties>
+ <Appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <PatternLayout pattern="${pattern}"/>
+ </Console>
+ <ReportPortalLog4j2Appender name="ReportPortalAppender">
+ <PatternLayout pattern="${pattern}"/>
+ </ReportPortalLog4j2Appender>
+ <Console name="ConsoleReport" target="SYSTEM_OUT">
+ <PatternLayout pattern="${report.pattern}"/>
+ </Console>
+ <ReportPortalLog4j2Appender name="ReportPortalLogReport">
+ <PatternLayout pattern="${report.pattern}"/>
+ </ReportPortalLog4j2Appender>
+ </Appenders>
+ <Loggers>
+ <Root level="all">
+ <AppenderRef ref="Console"/>
+ <AppenderRef ref="ReportPortalAppender"/>
+ </Root>
+ <logger name="upload.file.to.reportportal" level="all" additivity="false">
+ <AppenderRef ref="ReportPortalAppender"/>
+ </logger>
+ <logger name="logger.report" level="all" additivity="false">
+<!-- <AppenderRef ref="ConsoleReport"/> -->
+ <AppenderRef ref="ReportPortalLogReport"/>
+ </logger>
+ <logger name="rp.org.apache.http" level="WARN"/>
+ <logger name="org.apache.http" level="WARN"/>
+ <logger name="com.epam.reportportal" level="WARN"/>
+ <logger name="CouchDbDataAdapter" level="WARN"/>
+ </Loggers>
+</Configuration> \ No newline at end of file
diff --git a/ui-ci/src/main/resources/reportportal.properties b/ui-ci/src/main/resources/reportportal.properties
new file mode 100644
index 0000000000..373610ef62
--- /dev/null
+++ b/ui-ci/src/main/resources/reportportal.properties
@@ -0,0 +1,5 @@
+rp.endpoint = http://reportportal.intl.att.com:8080
+rp.uuid = 4be0a132-e2ea-4a8c-a0d4-54367259d8d2
+rp.project= ASDC
+rp.mode = DEBUG
+rp.enable = true \ No newline at end of file