2 # Script for Running all the Tests one after other
4 # Where are we called from?
10 # File for Storing Log Of UnitTest.
12 logSRT
=SeleniumTestResult
14 ###########################################################
16 ## Create log for the tests
18 ###########################################################
20 # Method to Create Log Folder if it does not Exists.
27 if [ ! -d "Result" ] ; then
32 ###########################################################
34 ## Following methods are used to run the different tests
36 ###########################################################
38 # Method to Run Unit Tests.
43 php UnitTests.php
> $PATH4LOG/Result
/$logUT
46 # Method to Run Selenium Ruby Tests.
50 echo "Enter Your Option: "
53 cd $ORIGPWD/..
/test
/selenium-ruby
/CRM
54 # Running Selenium (ruby) Tests
55 ruby ruby_unit_tests.rb
$choice
58 # Method to Run Stress Test.
66 ###########################################################
68 ## Menu system for different purpos
70 ###########################################################
76 echo " *********************** Select Method for Test *********************** "
78 echo "Options available: "
79 echo " UT - Carry out Unit Tests"
80 echo " ST - Carry out Stress Tests"
81 echo " SRT - Carry out Selenium (Ruby) Tests"
82 echo " All - Carry out all the above mentioned Tests i.e. Unit Tests, Stress Test, Selenium Test"
92 echo " *********************** Select the Option *********************** "
94 echo "Options available: "
95 echo " 1 : Contact Individual"
96 echo " 2 : Contact Household"
97 echo " 3 : Contact Organization"
99 echo " 5 : Manage Group"
100 echo " 6 : Administer - Configuration Section"
101 echo " 7 : Administer - Configuration Custom Data"
102 echo " 8 : Administer - Configuration Profile"
103 echo " 9 : Administer - Setup Section"
104 echo " 10 : Administer - CiviContribute"
105 echo " 11 : Administer - CiviMember"
106 echo " 12 : Administer - CiviEvent"
107 echo " 13 : Find Contact - Basic Search"
108 echo " 14 : Advanced Search"
109 echo " 15 : Search Builder"
110 echo " 16 : Import - Contacts"
111 echo " 17 : Import - Activity History"
112 echo " 18 : CiviContribute - Find Contribution"
113 echo " 19 : CiviContribute - Import Contribution"
114 echo " 20 : CiviMember - Find Memberships"
115 echo " 21 : CiviMember - Import Memberships"
116 echo " 22 : CiviMail"
117 echo " 23 : CiviEvent"
120 ###########################################################
122 ## Main execution method.
124 ## All test scripts will run usnig this method
126 ###########################################################
130 # Following Case Structure is used for Executing Menuing System.
134 echo "Running Unit Tests"; echo;
136 echo "Unit Tests Successfully Completed. Log stored in the File : " $PATH4LOG/Result
/$logUT; echo;
137 echo " **************************************************************************** ";
142 echo "Running Stress Tests"; echo;
144 echo "Stress Tests Successfully Completed."; echo;
145 echo " **************************************************************************** ";
148 # Selenium (Ruby) Tests
149 "SRT" |
"srt" |
"Srt")
150 echo "Running Selenium (Ruby) Tests"; echo;
152 #echo "Selenium (Ruby) Testing Successfully Completed. Log stored in the File : " $PATH4LOG/Result/$logSRT; echo;
153 echo " **************************************************************************** ";
156 # All the Tests will be Executed one after other
158 echo "Running all three Tests i.e. Unit Tests, Web Tests, maxQ Tests, Stress Test and Selenium(Ruby) Tests"; echo;
159 echo "Running Unit Tests"; echo;
161 echo "Unit Tests Successfully Completed. Log stored in the File : " $PATH4LOG/Result
/$logUT; echo;
162 echo "Running Stress Tests"; echo;
164 echo "Stress Tests Successfully Completed."; echo;
165 echo " **************************************************************************** ";
166 echo "Running Selenium (ruby) Tests"; echo;
168 #echo "Selenium (Ruby) Testing Successfully Completed. Log stored in the File : " $PATH4LOG/Result/$logSRT; echo;
169 echo " **************************************************************************** ";
172 echo "You have entered Invalid Option."; echo;
178 ###########################################################
180 ## Start of the script.
182 ###########################################################
189 echo "Enter Your Option: "
196 ###########################################################
198 ## Call to start of the script
200 ###########################################################