summaryrefslogtreecommitdiffstats
path: root/ui-ci/src/main/resources/ci/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'ui-ci/src/main/resources/ci/scripts')
-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
3 files changed, 35 insertions, 8 deletions
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"