#!/bin/bash
#SRC_PATH=/home/user/workspaceNew
#cd $SRC_PATH/CPIIDA
echo "Test in Domain package ---------------------------------------------------------------"
for filename in `ls src/test/java/net/national/cp/domain/`
do
REG_EXP=".*(Test.java)"
#REG_EXP=".*(.txt)"
if [[ $filename =~ $REG_EXP ]]; then
#echo "fileName :"$filename
DD=0
DD=`mvn test -Dtest=$filename | grep -c "BUILD FAILURE"`
#echo $DD
if [ $DD != 0 ]
then
echo "************Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail***************"
echo "Test Fail In: $filename"
exit
else
echo "Test pass In : $filename "
fi
fi
done
echo "Test in Domain package are Successfully--------------------------------------------------------------"
echo "Test in Dao package ----------------------------------------------------------------"
for filename in `ls src/test/java/net/national/cp/dao/`
do
REG_EXP=".*(Test.java)"
#REG_EXP=".*(.txt)"
if [[ $filename =~ $REG_EXP ]]; then
#echo "fileName :"$filename
DD=0
DD=`mvn test -Dtest=$filename | grep -c "BUILD FAILURE"`
#echo $DD
if [ $DD != 0 ]
then
echo "************Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail Fail***************"
echo "Test Fail In: $filename"
exit
else
echo "Test pass In : $filename "
fi
fi
done
echo "Test in Dao package are Successfully--------------------------------------------------------------"
No comments:
Post a Comment