Adds transaction tests.
This commit is contained in:
parent
5d2e5013f3
commit
c0f578db75
@ -7,6 +7,12 @@ marks:
|
|||||||
- generate_session_id
|
- generate_session_id
|
||||||
- first_account_phone_number
|
- first_account_phone_number
|
||||||
- second_account_phone_number
|
- second_account_phone_number
|
||||||
|
- first_account_family_name
|
||||||
|
- second_account_family_name
|
||||||
|
- first_account_given_name
|
||||||
|
- second_account_given_name
|
||||||
|
- first_transaction_session_id
|
||||||
|
- second_transaction_session_id
|
||||||
- first_metadata_entry_session_id
|
- first_metadata_entry_session_id
|
||||||
- second_metadata_entry_session_id
|
- second_metadata_entry_session_id
|
||||||
stages:
|
stages:
|
||||||
@ -231,14 +237,14 @@ stages:
|
|||||||
extra_kwargs:
|
extra_kwargs:
|
||||||
expected_response: "CON Weka jina lako la kwanza\n0. Nyuma"
|
expected_response: "CON Weka jina lako la kwanza\n0. Nyuma"
|
||||||
|
|
||||||
- name: Enter first name [Kimani - first account]
|
- name: Enter first name [first_account_given_name - first account]
|
||||||
request:
|
request:
|
||||||
url: "{server_url}"
|
url: "{server_url}"
|
||||||
data:
|
data:
|
||||||
serviceCode: "*483*46#"
|
serviceCode: "*483*46#"
|
||||||
sessionId: "{first_metadata_entry_session_id}"
|
sessionId: "{first_metadata_entry_session_id}"
|
||||||
phoneNumber: "{first_account_phone_number}"
|
phoneNumber: "{first_account_phone_number}"
|
||||||
text: "1*0000*0000*Kimani"
|
text: "1*0000*0000*{first_account_given_name}"
|
||||||
headers:
|
headers:
|
||||||
content-type: "application/x-www-form-urlencoded"
|
content-type: "application/x-www-form-urlencoded"
|
||||||
method: POST
|
method: POST
|
||||||
@ -253,14 +259,14 @@ stages:
|
|||||||
extra_kwargs:
|
extra_kwargs:
|
||||||
expected_response: "CON Enter last name\n0. Back"
|
expected_response: "CON Enter last name\n0. Back"
|
||||||
|
|
||||||
- name: Enter first name [Chebet - second account]
|
- name: Enter first name [second_account_given_name - second account]
|
||||||
request:
|
request:
|
||||||
url: "{server_url}"
|
url: "{server_url}"
|
||||||
data:
|
data:
|
||||||
serviceCode: "*483*46#"
|
serviceCode: "*483*46#"
|
||||||
sessionId: "{second_metadata_entry_session_id}"
|
sessionId: "{second_metadata_entry_session_id}"
|
||||||
phoneNumber: "{second_account_phone_number}"
|
phoneNumber: "{second_account_phone_number}"
|
||||||
text: "2*1212*1212*Chebet"
|
text: "2*1212*1212*{second_account_given_name}"
|
||||||
headers:
|
headers:
|
||||||
content-type: "application/x-www-form-urlencoded"
|
content-type: "application/x-www-form-urlencoded"
|
||||||
method: POST
|
method: POST
|
||||||
@ -275,14 +281,14 @@ stages:
|
|||||||
extra_kwargs:
|
extra_kwargs:
|
||||||
expected_response: "CON Weka jina lako la mwisho\n0. Nyuma"
|
expected_response: "CON Weka jina lako la mwisho\n0. Nyuma"
|
||||||
|
|
||||||
- name: Enter last name [Omollo - first account]
|
- name: Enter last name [first_account_family_name - first account]
|
||||||
request:
|
request:
|
||||||
url: "{server_url}"
|
url: "{server_url}"
|
||||||
data:
|
data:
|
||||||
serviceCode: "*483*46#"
|
serviceCode: "*483*46#"
|
||||||
sessionId: "{first_metadata_entry_session_id}"
|
sessionId: "{first_metadata_entry_session_id}"
|
||||||
phoneNumber: "{first_account_phone_number}"
|
phoneNumber: "{first_account_phone_number}"
|
||||||
text: "1*0000*0000*Kimani*Omollo"
|
text: "1*0000*0000*{first_account_given_name}*{first_account_family_name}"
|
||||||
headers:
|
headers:
|
||||||
content-type: "application/x-www-form-urlencoded"
|
content-type: "application/x-www-form-urlencoded"
|
||||||
method: POST
|
method: POST
|
||||||
@ -297,14 +303,14 @@ stages:
|
|||||||
extra_kwargs:
|
extra_kwargs:
|
||||||
expected_response: "CON Enter gender\n1. Male\n2. Female\n0. Back"
|
expected_response: "CON Enter gender\n1. Male\n2. Female\n0. Back"
|
||||||
|
|
||||||
- name: Enter last name [Musau - second account]
|
- name: Enter last name [second_account_family_name - second account]
|
||||||
request:
|
request:
|
||||||
url: "{server_url}"
|
url: "{server_url}"
|
||||||
data:
|
data:
|
||||||
serviceCode: "*483*46#"
|
serviceCode: "*483*46#"
|
||||||
sessionId: "{second_metadata_entry_session_id}"
|
sessionId: "{second_metadata_entry_session_id}"
|
||||||
phoneNumber: "{second_account_phone_number}"
|
phoneNumber: "{second_account_phone_number}"
|
||||||
text: "2*1212*1212*Chebet*Musau"
|
text: "2*1212*1212*{second_account_given_name}*{second_account_family_name}"
|
||||||
headers:
|
headers:
|
||||||
content-type: "application/x-www-form-urlencoded"
|
content-type: "application/x-www-form-urlencoded"
|
||||||
method: POST
|
method: POST
|
||||||
@ -428,7 +434,7 @@ stages:
|
|||||||
function: ext.validator:validate_response
|
function: ext.validator:validate_response
|
||||||
extra_kwargs:
|
extra_kwargs:
|
||||||
expected_response: "CON Balance {gift_value} {token_symbol}\n1. Send\n2. My Account\n3. Help"
|
expected_response: "CON Balance {gift_value} {token_symbol}\n1. Send\n2. My Account\n3. Help"
|
||||||
delay_before: 5
|
delay_before: 10
|
||||||
|
|
||||||
- name: Enter product [Mkalimani - second account]
|
- name: Enter product [Mkalimani - second account]
|
||||||
request:
|
request:
|
||||||
@ -451,4 +457,178 @@ stages:
|
|||||||
function: ext.validator:validate_response
|
function: ext.validator:validate_response
|
||||||
extra_kwargs:
|
extra_kwargs:
|
||||||
expected_response: "CON Salio {gift_value} {token_symbol}\n1. Tuma\n2. Akaunti yangu\n3. Usaidizi"
|
expected_response: "CON Salio {gift_value} {token_symbol}\n1. Tuma\n2. Akaunti yangu\n3. Usaidizi"
|
||||||
delay_before: 5
|
delay_before: 10
|
||||||
|
|
||||||
|
- name: Start menu [first account]
|
||||||
|
request:
|
||||||
|
url: "{server_url}"
|
||||||
|
data:
|
||||||
|
serviceCode: "*483*46#"
|
||||||
|
sessionId: "{first_transaction_session_id}"
|
||||||
|
phoneNumber: "{first_account_phone_number}"
|
||||||
|
text: ""
|
||||||
|
headers:
|
||||||
|
content-type: "application/x-www-form-urlencoded"
|
||||||
|
method: POST
|
||||||
|
response:
|
||||||
|
status_code:
|
||||||
|
- 200
|
||||||
|
headers:
|
||||||
|
Content-Length: '51'
|
||||||
|
Content-Type: "text/plain"
|
||||||
|
verify_response_with:
|
||||||
|
function: ext.validator:validate_response
|
||||||
|
extra_kwargs:
|
||||||
|
expected_response: "CON Balance {gift_value} {token_symbol}\n1. Send\n2. My Account\n3. Help"
|
||||||
|
|
||||||
|
- name: Start menu [second account]
|
||||||
|
request:
|
||||||
|
url: "{server_url}"
|
||||||
|
data:
|
||||||
|
serviceCode: "*483*46#"
|
||||||
|
sessionId: "{second_transaction_session_id}"
|
||||||
|
phoneNumber: "{second_account_phone_number}"
|
||||||
|
text: ""
|
||||||
|
headers:
|
||||||
|
content-type: "application/x-www-form-urlencoded"
|
||||||
|
method: POST
|
||||||
|
response:
|
||||||
|
status_code:
|
||||||
|
- 200
|
||||||
|
headers:
|
||||||
|
Content-Length: '56'
|
||||||
|
Content-Type: "text/plain"
|
||||||
|
verify_response_with:
|
||||||
|
function: ext.validator:validate_response
|
||||||
|
extra_kwargs:
|
||||||
|
expected_response: "CON Salio {gift_value} {token_symbol}\n1. Tuma\n2. Akaunti yangu\n3. Usaidizi"
|
||||||
|
|
||||||
|
- name: Initate transcation attempt [first account]
|
||||||
|
request:
|
||||||
|
url: "{server_url}"
|
||||||
|
data:
|
||||||
|
serviceCode: "*483*46#"
|
||||||
|
sessionId: "{first_transaction_session_id}"
|
||||||
|
phoneNumber: "{first_account_phone_number}"
|
||||||
|
text: "1"
|
||||||
|
headers:
|
||||||
|
content-type: "application/x-www-form-urlencoded"
|
||||||
|
method: POST
|
||||||
|
response:
|
||||||
|
status_code:
|
||||||
|
- 200
|
||||||
|
headers:
|
||||||
|
Content-Length: '30'
|
||||||
|
Content-Type: "text/plain"
|
||||||
|
verify_response_with:
|
||||||
|
function: ext.validator:validate_response
|
||||||
|
extra_kwargs:
|
||||||
|
expected_response: "CON Enter phone number\n0. Back"
|
||||||
|
|
||||||
|
- name: Initate transcation attempt [second account]
|
||||||
|
request:
|
||||||
|
url: "{server_url}"
|
||||||
|
data:
|
||||||
|
serviceCode: "*483*46#"
|
||||||
|
sessionId: "{second_transaction_session_id}"
|
||||||
|
phoneNumber: "{second_account_phone_number}"
|
||||||
|
text: "1"
|
||||||
|
headers:
|
||||||
|
content-type: "application/x-www-form-urlencoded"
|
||||||
|
method: POST
|
||||||
|
response:
|
||||||
|
status_code:
|
||||||
|
- 200
|
||||||
|
headers:
|
||||||
|
Content-Length: '33'
|
||||||
|
Content-Type: "text/plain"
|
||||||
|
verify_response_with:
|
||||||
|
function: ext.validator:validate_response
|
||||||
|
extra_kwargs:
|
||||||
|
expected_response: "CON Weka nambari ya simu\n0. Nyuma"
|
||||||
|
|
||||||
|
- name: Enter phone number [first account]
|
||||||
|
request:
|
||||||
|
url: "{server_url}"
|
||||||
|
data:
|
||||||
|
serviceCode: "*483*46#"
|
||||||
|
sessionId: "{first_transaction_session_id}"
|
||||||
|
phoneNumber: "{first_account_phone_number}"
|
||||||
|
text: "1*{second_account_phone_number}"
|
||||||
|
headers:
|
||||||
|
content-type: "application/x-www-form-urlencoded"
|
||||||
|
method: POST
|
||||||
|
response:
|
||||||
|
status_code:
|
||||||
|
- 200
|
||||||
|
headers:
|
||||||
|
Content-Length: '24'
|
||||||
|
Content-Type: "text/plain"
|
||||||
|
verify_response_with:
|
||||||
|
function: ext.validator:validate_response
|
||||||
|
extra_kwargs:
|
||||||
|
expected_response: "CON Enter amount\n0. Back"
|
||||||
|
|
||||||
|
- name: Enter phone number [second account]
|
||||||
|
request:
|
||||||
|
url: "{server_url}"
|
||||||
|
data:
|
||||||
|
serviceCode: "*483*46#"
|
||||||
|
sessionId: "{second_transaction_session_id}"
|
||||||
|
phoneNumber: "{second_account_phone_number}"
|
||||||
|
text: "1*{first_account_phone_number}"
|
||||||
|
headers:
|
||||||
|
content-type: "application/x-www-form-urlencoded"
|
||||||
|
method: POST
|
||||||
|
response:
|
||||||
|
status_code:
|
||||||
|
- 200
|
||||||
|
headers:
|
||||||
|
Content-Length: '25'
|
||||||
|
Content-Type: "text/plain"
|
||||||
|
verify_response_with:
|
||||||
|
function: ext.validator:validate_response
|
||||||
|
extra_kwargs:
|
||||||
|
expected_response: "CON Weka kiwango\n0. Nyuma"
|
||||||
|
|
||||||
|
- name: Enter transcation amount [first account]
|
||||||
|
request:
|
||||||
|
url: "{server_url}"
|
||||||
|
data:
|
||||||
|
serviceCode: "*483*46#"
|
||||||
|
sessionId: "{first_transaction_session_id}"
|
||||||
|
phoneNumber: "{first_account_phone_number}"
|
||||||
|
text: "1*{second_account_phone_number}*17"
|
||||||
|
headers:
|
||||||
|
content-type: "application/x-www-form-urlencoded"
|
||||||
|
method: POST
|
||||||
|
response:
|
||||||
|
status_code:
|
||||||
|
- 200
|
||||||
|
headers:
|
||||||
|
Content-Type: "text/plain"
|
||||||
|
verify_response_with:
|
||||||
|
function: ext.validator:validate_response
|
||||||
|
extra_kwargs:
|
||||||
|
expected_response: "CON {second_account_given_name} {second_account_family_name} {second_account_phone_number} will receive 17.00 {token_symbol} from {first_account_given_name} {first_account_family_name} {first_account_phone_number}.\nPlease enter your PIN to confirm.\n0. Back"
|
||||||
|
|
||||||
|
- name: Enter transcation amount [second account]
|
||||||
|
request:
|
||||||
|
url: "{server_url}"
|
||||||
|
data:
|
||||||
|
serviceCode: "*483*46#"
|
||||||
|
sessionId: "{second_transaction_session_id}"
|
||||||
|
phoneNumber: "{second_account_phone_number}"
|
||||||
|
text: "1*{first_account_phone_number}*25"
|
||||||
|
headers:
|
||||||
|
content-type: "application/x-www-form-urlencoded"
|
||||||
|
method: POST
|
||||||
|
response:
|
||||||
|
status_code:
|
||||||
|
- 200
|
||||||
|
headers:
|
||||||
|
Content-Type: "text/plain"
|
||||||
|
verify_response_with:
|
||||||
|
function: ext.validator:validate_response
|
||||||
|
extra_kwargs:
|
||||||
|
expected_response: "CON {first_account_given_name} {first_account_family_name} {first_account_phone_number} atapokea 25.00 {token_symbol} kutoka kwa {second_account_given_name} {second_account_family_name} {second_account_phone_number}.\nTafadhali weka nambari yako ya siri kudhibitisha.\n0. Nyuma"
|
||||||
|
Loading…
Reference in New Issue
Block a user