Refactors to improve expect scripts.
This commit is contained in:
		
							parent
							
								
									ee37a23ac5
								
							
						
					
					
						commit
						6dd775051c
					
				| @ -3,10 +3,10 @@ | |||||||
| 
 | 
 | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "create account" |     - name: "create account [EN]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek020", "text": ""}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek020", "text": ""}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
| @ -14,14 +14,27 @@ | |||||||
|         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"175"} |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"175"} | ||||||
|         - compare: {"raw_body":"", "comparator":"contains", expected: "END Your account is being created. You will receive an SMS when your account is ready.\nAkaunti yako ya Sarafu inatayarishwa. Utapokea ujumbe wa SMS akaunti yako ikiwa tayari.\n" } |         - compare: {"raw_body":"", "comparator":"contains", expected: "END Your account is being created. You will receive an SMS when your account is ready.\nAkaunti yako ya Sarafu inatayarishwa. Utapokea ujumbe wa SMS akaunti yako ikiwa tayari.\n" } | ||||||
| 
 | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "create account [SW]" | ||||||
|  |     - url: "/" | ||||||
|  |     - method: "POST" | ||||||
|  |     - delay: 2 | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": ""}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"175"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"contains", expected: "END Your account is being created. You will receive an SMS when your account is ready.\nAkaunti yako ya Sarafu inatayarishwa. Utapokea ujumbe wa SMS akaunti yako ikiwa tayari.\n" } | ||||||
| 
 | 
 | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "select preferred language prompt" |     - name: "select preferred language prompt [EN]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - delay: 5 # delay to allow celery tasks to run to create account |     - delay: 5 # delay to allow celery tasks to run to create account | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": ""}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek022", "text": ""}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
| @ -29,14 +42,27 @@ | |||||||
|         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"53"} |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"53"} | ||||||
|         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Welcome to Sarafu\n1. English\n2. Kiswahili\n3. Help"} |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Welcome to Sarafu\n1. English\n2. Kiswahili\n3. Help"} | ||||||
| 
 | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "select preferred language prompt [SW]" | ||||||
|  |     - url: "/" | ||||||
|  |     - method: "POST" | ||||||
|  |     - delay: 5 # delay to allow celery tasks to run to create account | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek023", "text": ""}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"53"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Welcome to Sarafu\n1. English\n2. Kiswahili\n3. Help"} | ||||||
| 
 | 
 | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "pin entry" |     - name: "pin entry [EN]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - delay: 2 # delay |     - delay: 2 # delay | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": "1"}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek022", "text": "1"}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
| @ -44,14 +70,27 @@ | |||||||
|         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"54"} |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"54"} | ||||||
|         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Please enter a PIN to manage your account.\n0. Back"} |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Please enter a PIN to manage your account.\n0. Back"} | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "pin entry confirmation" |     - name: "pin entry [SW]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - delay: 2 # delay |     - delay: 2 # delay | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": "1*0000"}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek023", "text": "2"}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"59"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Tafadhali weka PIN ili kudhibiti akaunti yako.\n0. Nyuma"} | ||||||
|  | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "pin entry confirmation [EN]" | ||||||
|  |     - url: "/" | ||||||
|  |     - delay: 2 # delay | ||||||
|  |     - method: "POST" | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek022", "text": "1*0000"}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
| @ -59,14 +98,27 @@ | |||||||
|         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"32"} |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"32"} | ||||||
|         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Enter your PIN again\n0. Back"} |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Enter your PIN again\n0. Back"} | ||||||
| 
 | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "pin entry confirmation [SW]" | ||||||
|  |     - url: "/" | ||||||
|  |     - delay: 2 # delay | ||||||
|  |     - method: "POST" | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek023", "text": "2*1111"}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"31"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Weka PIN yako tena\n0. Nyuma"} | ||||||
| 
 | 
 | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "given names entry" |     - name: "given names entry[EN]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - delay: 3 # delay |     - delay: 3 # delay | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": "1*0000*0000"}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek022", "text": "1*0000*0000"}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
| @ -76,11 +128,25 @@ | |||||||
| 
 | 
 | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "family name entry" |     - name: "given names entry[SW]" | ||||||
|  |     - url: "/" | ||||||
|  |     - delay: 3 # delay | ||||||
|  |     - method: "POST" | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek023", "text": "2*1111*1111"}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"37"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Weka jina lako la kwanza\n0. Nyuma"} | ||||||
|  | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "family name entry[EN]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - delay: 2 # delay |     - delay: 2 # delay | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": "1*0000*0000*Kimani"}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek022", "text": "1*0000*0000*Kimani"}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
| @ -88,14 +154,27 @@ | |||||||
|         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"27"} |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"27"} | ||||||
|         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Enter last name\n0. Back"} |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Enter last name\n0. Back"} | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "gender selection" |     - name: "family name entry[SW]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - delay: 2 # delay |     - delay: 2 # delay | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": "1*0000*0000*Kimani*Omollo"}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek023", "text": "2*1111*1111*Chebet"}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"37"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Weka jina lako la mwisho\n0. Nyuma"} | ||||||
|  | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "gender selection[EN]" | ||||||
|  |     - url: "/" | ||||||
|  |     - delay: 2 # delay | ||||||
|  |     - method: "POST" | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek022", "text": "1*0000*0000*Kimani*Omollo"}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
| @ -103,14 +182,27 @@ | |||||||
|         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"42"} |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"42"} | ||||||
|         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Enter gender\n1. Male\n2. Female\n0. Back"} |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Enter gender\n1. Male\n2. Female\n0. Back"} | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "location entry" |     - name: "gender selection[SW]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - delay: 2 # delay |     - delay: 2 # delay | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": "1*0000*0000*Kimani*Omollo*1"}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek023", "text": "2*1111*1111*Chebet*Musau"}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"53"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Weka jinsia yako\n1. Mwanaume\n2. Mwanamke\n0. Nyuma"} | ||||||
|  | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "location entry[EN]" | ||||||
|  |     - url: "/" | ||||||
|  |     - delay: 2 # delay | ||||||
|  |     - method: "POST" | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek022", "text": "1*0000*0000*Kimani*Omollo*1"}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
| @ -120,11 +212,25 @@ | |||||||
| 
 | 
 | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "product entry" |     - name: "location entry[SW]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - delay: 2 # delay |     - delay: 2 # delay | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": "1*0000*0000*Kimani*Omollo*1*Kangemi"}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek023", "text": "2*1111*1111*Chebet*Musau*2"}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"27"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Weka eneo lako\n0. Nyuma"} | ||||||
|  | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "product entry[EN]" | ||||||
|  |     - url: "/" | ||||||
|  |     - delay: 2 # delay | ||||||
|  |     - method: "POST" | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek022", "text": "1*0000*0000*Kimani*Omollo*1*Kangemi"}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
| @ -134,14 +240,42 @@ | |||||||
| 
 | 
 | ||||||
| - test: | - test: | ||||||
|     - group: "accounts" |     - group: "accounts" | ||||||
|     - name: "start menu" |     - name: "product entry[SW]" | ||||||
|     - url: "/" |     - url: "/" | ||||||
|     - delay: 2 # delay |     - delay: 2 # delay | ||||||
|     - method: "POST" |     - method: "POST" | ||||||
|     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+2547876548", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek021", "text": "1*0000*0000*Kimani*Omollo*1*Kangemi*Potatoes"}' |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek023", "text": "2*1111*1111*Chebet*Musau*2*Chebarbar"}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"52"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Tafadhali weka bidhaa ama huduma unauza\n0. Nyuma"} | ||||||
|  | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "start menu[EN]" | ||||||
|  |     - url: "/" | ||||||
|  |     - delay: 2 # delay | ||||||
|  |     - method: "POST" | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345678", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek022", "text": "1*0000*0000*Kimani*Omollo*1*Kangemi*Potatoes"}' | ||||||
|     - headers: {'Content-Type': 'application/json'} |     - headers: {'Content-Type': 'application/json'} | ||||||
|     - expected_status: [200] |     - expected_status: [200] | ||||||
|     - validators: |     - validators: | ||||||
|         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"51"} |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"51"} | ||||||
|         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Balance 50.00 SRF\n1. Send\n2. My Account\n3. Help"} |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Balance 50.00 SRF\n1. Send\n2. My Account\n3. Help"} | ||||||
|  | 
 | ||||||
|  | - test: | ||||||
|  |     - group: "accounts" | ||||||
|  |     - name: "start menu[EN]" | ||||||
|  |     - url: "/" | ||||||
|  |     - delay: 2 # delay | ||||||
|  |     - method: "POST" | ||||||
|  |     - body: '{"serviceCode": "*483*46#", "phoneNumber": "+254712345679", "sessionId": "AT_Idjhfuvelw64ffbweiy73nd5vnek023", "text": "2*1111*1111*Chebet*Musau*2*Musau*Mandazi"}' | ||||||
|  |     - headers: {'Content-Type': 'application/json'} | ||||||
|  |     - expected_status: [200] | ||||||
|  |     - validators: | ||||||
|  |         - compare: {"header": "content-type", "comparator": "str_eq", "expected":"text/plain"} | ||||||
|  |         - compare: {"header": "content-length", "comparator": "str_eq", "expected":"56"} | ||||||
|  |         - compare: {"raw_body":"", "comparator":"str_eq", expected: "CON Salio 50.00 SRF\n1. Tuma\n2. Akaunti yangu\n3. Usaidizi"} | ||||||
| @ -1,3 +1,9 @@ | |||||||
| #!/bin/bash | #!/bin/bash | ||||||
| 
 | 
 | ||||||
| pyresttest "$TEST_SERVER_URL" test_suite.yml | if [ -z "$TEST_SERVER_URL" ]; | ||||||
|  | then | ||||||
|  |     echo "The test server url is not set !" | ||||||
|  |     exit 1 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | pyresttest "$TEST_SERVER_URL" ./test_suite.yml --log debug | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user