Test Cases
Test Cases
Test Cases
Send the request with an valid To test whether the request will go through
Functionality tests command id with a valid command id
Send the request with an invalid To test whether the request will go through
Functionality tests command id with an invalid command id
Send the request with a valid To test whether the request will be allowed
Functionality tests amount between 1-70000 on Mpesa with a valid amount
Send remarks with less then 200 To test whether less then 200 characters will
Functionality Tests characters be accepted in remarks
Send remarks with more then 200 To test whether more then 200 characters
Functionality Tests characters will be accepted in remarks
Send result url without an ip and To test whether the request will be accepted
Functionality tests port without an ip and port
Send queuetimeout URL with an ip To test whether the request will be accepted
Functionality tests and port with an ip and port
Send queuetimeout URL without an To test whether the request will be accepted
Functionality tests ip and port without an ip and port
Expected Results Actual Results
Authentication is
successful
Authentication is
unsuccessful
Authentication is
successful
1) Request is sent to
Authentication
API gateway is
unsuccessful A valid
successfully.
1) Requestisisreturned
response sent to to
API
the Gateway
Partner.
Portal displays
successfully. https
2)
andTransfer ofAfunds
transaction
valid
is isto
response
successful is returned
from any
successful
the Partner. to MSISDN
organization
1) Request is sent to
2)
3) Transfer
Valid of
result funds
is
API
fromGateway
B2Cwith
business
returned
successfully. A valid
account to
appropriate Customer's
error
response is returned
MPESA account is to
the Partner.
unsuccessful
1)
2) Request of is sent to
3) Transfer
APIValid result funds
Gateway is
from B2Cwith
returned business
successfully.
account A valid
to Customer's
appropriate
response error
MPESA account is to
is returned
the Partner.
unsuccessful
1)
2) Request
Transfer is sent
of funds to
3) Valid
API result
gateway is
from B2Cwith
returned business
successfully.
account to A valid
Customer's
appropriate
response error
MPESA account is to
is returned
the Partner.
unsuccessful
2) Transfer of funds
3) Valid result is
from B2C business
returned with
account to Customer's
appropriate error
MPESA account is
unsuccessful
3) Valid result is
returned with
appropriate error
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an
appropriate error
thrown: Invalid
CommandID
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an
appropriate error
thrown: Invalid Amount
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid Party B
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid Remarks
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid
ResultURL
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid
QueuetimeoutURL
Testing API Gateway- API Gateway integr
Authentication
Authentication Authentication
OUTPUT:
The user isappropriate error
able to view the message in the
testing page for C2B
To verify that the user can access APIs format {
Simulate Transaction
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Error
OUTPUT:
Message -appropriate
" error message in the
format
To verify that the user must provide valid inputs } {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Error
OUTPUT:
Message -appropriate
" error message in the
format
To verify that the user must provide valid inputs } {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
Commandappropriate
ID- " error message in the
commandID format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
Amount - appropriate
" error message in the
Amount format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
MSISDN" appropriate error message in the
msisdn format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
BillRefNo appropriate
-" error message in the
BillRefNo format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid Shortcode"
ShortCode }
OUTPUT: appropriate acknowledgement of
success message with "ConversationID",
To verify that the user must provide a valid "OriginatorConversationID",
commandID "ResponseDescription".
OUTPUT: appropriate error message in the
format {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
CommandID appropriate
-" error message in the
commandID format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
Amount - appropriate
" error message in the
Amount format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
Amount - appropriate
" error message in the
Amount format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
Amount- "appropriate error message in the
Amount format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
MSISDN - appropriate
" error message in the
MSISDN format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
MSISDN- "appropriate error message in the
MSISDN format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
MSISDN - appropriate
" error message in the
MSISDN format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT: appropriate
BillRefNumber -" error message in the
BillRefNumber format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT: appropriate error message in the
BillRefNumber"
BillRefNumber format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid BillRefNumber - "
BillRefNumber OUTPUT:
} appropriate error message in the
format {
"requestId": "",
"errorCode": "",
To verify that the user must provide a valid OUTPUT: appropriate
"errorMessage": error- message
"Invalid Shortcodein-"the
shortCode format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid OUTPUT:
Shortcodeappropriate
-" error message in the
shortCode format
} {
"requestId": "",
"errorCode": "",
"errorMessage": "Error Occurred - Invalid
To verify that the user must provide a valid Shortcode - "
shortCode }
OUTPUT: appropriate acknowledgement of
success message with "ConversationID",
To verify that the user must provide a valid "OriginatorConversationID",
amount between 1-70,000 "ResponseDescription".
OUTPUT: appropriate acknowledgement of
success message with "ConversationID",
To verify that the user must provide a valid "OriginatorConversationID",
MSISDN "ResponseDescription".
OUTPUT: appropriate acknowledgement of
success message with "ConversationID",
To verify that the user must provide a valid "OriginatorConversationID",
MSISDN "ResponseDescription".
OUTPUT: appropriate acknowledgement of
success message with "ConversationID",
To verify that the user must provide a valid "OriginatorConversationID",
BillRefNo "ResponseDescription".
OUTPUT: appropriate acknowledgement of
success message with "ConversationID",
To verify that the user must provide a valid "OriginatorConversationID",
Shortcode "ResponseDescription".
Testing API Gateway- Core API integrati
To test whether the request will go through with The request shall not go through with an
an invalid command id appropriate error thrown: Invalid CommandID
To test whether the request will be allowed on You should get an appropriate success message:
Mpesa with a valid amount The service has been accepted successfully
To test whether the request will be allowed on The request shall not go through with an
Mpesa with a negetive amount appropriate error thrown: Invalid Amount
To test whether an MSISDN of 12 numbers will You should get an appropriate success message:
be accepted The service has been accepted successfully
To test whether an MSISDN of 12 or more The request shall not go through with an in
numbers will be accepted appropriate error thrown:Invalid Party B
To test whether less then 200 characters will be You should get an appropriate success message:
accepted in remarks The service has been accepted successfully
To test whether more then 200 characters will be The request shall not go through with an in
accepted in remarks appropriate error thrown:Invalid Remarks
To test whether the request will be accepted with You should get an appropriate success message:
a valid ip and port The service has been accepted successfully
To test whether the request will be accepted The request shall not go through with an in
without an ip and port appropriate error thrown:Invalid ResultURL
To test whether the request will be accepted with The request shall not go through with an in
an ip and port appropriate error thrown:Invalid ResultURL
To test whether the request will be accepted The request shall not go through with an in
without an ip and port appropriate error thrown:Invalid ResultURL
Testing gateway- Core API integration
Subject Test case Objective
Send the request with an invalid To test whether the request will be allowed
Functionality tests identifier e.g. 6 on Mpesa with an invalid identifier
Send remarks with less then 200 To test whether less then 200 characters will
Functionality Tests characters be accepted in remarks
Send remarks with more then 200 To test whether more then 200 characters
Functionality Tests characters will be accepted in remarks
Send result url without an ip and To test whether the request will be accepted
Functionality tests port without an ip and port
Send queuetimeout URL with an ip To test whether the request will be accepted
Functionality tests and port with an ip and port
Send queuetimeout URL without an To test whether the request will be accepted
Functionality tests ip and port without an ip and port
Expected Results Actual Results
Authentication is
successful
Authentication is
unsuccessful
Authentication is
successful
Authentication is
unsuccessful
1) Request is sent to
API gateway
Portal displays https
successfully.
and transaction A valid
is
response
successful is returned to
the Partner.
1)
2) Request is sent
Valid result is to
API Gateway
returned with
successfully. A valid
appropriate error
response is returned to
the Partner.
1)
2) Request is sent
Valid result is to
API Gateway
returned with
successfully. A valid
appropriate error
response is returned to
the Partner.
1)
2) Request is sent
Valid result is to
API gateway
returned with
successfully. A valid
appropriate error
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an
appropriate error
thrown: Invalid
CommandID
The request shall not
go through with an
appropriate error
thrown: Invalid
identifier
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid Remarks
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid
ResultURL
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid
QueuetimeoutURL
Testing gateway- Core API integration
Subject Test case Objective
Send request with transaction type To test successful request sent over https on
Certificate management Transaction Reversal
Test transaction over with
httpscommand
portal the portal
ID "TransactionReversal" to the
gateway - Paybill account has a valid
initiator username,password,
amount and ReceiverParty account
Functionality tests is valid Partner is able to successfully reverse funds
Send request with transaction type Reversal for paybill account with invalid
Transaction Reversal with command initiator username is unsuccessful. Request is
ID "TransactionReversal" to API processed by the API gateway and
Gateway - Paybill account has wrong appropriate error message is retuned in the
Functionality tests initiator username result
Send request with transaction type Reversal for paybill account with invalid
Transaction Reversal with command initiator password is unsuccessful. Request is
ID "TransactionReversal" to processed by the API gateway and
gateway - Paybill account has wrong appropriate error message is retuned in the
Functionality tests Send request
initiator with transaction type result
password
Transaction Reversal with command Reversal from paybill account with invalid
ID "TransactionReversal" to Receiver party is unsuccessful. Request is
gateway - with an invalid processed by the API gateway and
ReceiverParty merchant account or appropriate error message is retuned in the
Functionality tests store result
Send remarks with more then 200 To test whether more then 200 characters
Functionality Tests characters will be accepted in remarks
Send result url without an ip and To test whether the request will be accepted
Functionality tests port without an ip and port
Send queuetimeout URL with an ip To test whether the request will be accepted
Functionality tests and port with an ip and port
Send queuetimeout URL without an To test whether the request will be accepted
Functionality tests ip and port without an ip and port
Send the Occasion with less than To test whether Occasion will be accepted
Functionality tests 200 characters with less than 200 characters
Send Occasion with more then 200 To test whether occasion will go through with
Functionality tests characters more then 200 characters
Send the amount with a different To test whether the transaction will be
amount that was sent during c2b reversed with an amount not matching the
Functionality tests with a valid transaction ID intial C2B request
To test whether the transaction will be
Send an invalid transaction ID that reversed with a transaction ID not matching
Functionality tests does not exist the intial C2B request
Send the TransactionID with a valid To test whether a valid transaction can be
Functionality tests Transaction ID and valid shortcode queried
Expected Results Actual Results
Authentication is
successful
Authentication is
unsuccessful
Authentication is
successful
Authentication is
unsuccessful
1) Request is sent to
API gateway
Portal displays https
successfully.
and transaction A valid
is
response
successful is returned to
the Partner.
1)
2) Request is sent
Valid result is to
API Gateway
returned and
successfully.
transaction isAreversed
valid
response is returned to
the Partner.
1)
2) Request is sent
Valid result is to
API Gateway
returned with
successfully. A valid
appropriate error
response is returned to
the Partner.
1)
2) Request is sent
Valid result is to
API gateway
returned with
successfully. A valid
appropriate error
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an
appropriate error
thrown: Invalid
CommandID
The request shall not
go through with an
appropriate error
thrown: Invalid
identifier
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid Remarks
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid
ResultURL
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid
QueuetimeoutURL
1) Request is sent to
API Gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
1) Request is sent to
API Gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
Send the request with a valid To test whether the request will go through
command id i.e with a valid command id through the API
Functionality tests TransactionStatusQuery gateway
Send the request with an invalid To test whether the request will be allowed
Functionality tests identifier e.g. 6 on Mpesa with an invalid identifier
Send the Party A with a MSISDN of To test whether a MSISDN of 10 digits will be
Functionality Tests 10 digits accepted
Send the Party A with a MSISDN of To test whether a MSISDN of more or less
Functionality Tests more then 10 digits then 10 digits will be accepted
Send remarks with less then 200 To test whether less then 200 characters will
Functionality Tests characters be accepted in remarks
Send remarks with more then 200 To test whether more then 200 characters
Functionality Tests characters will be accepted in remarks
Send result url without an ip and To test whether the request will be accepted
Functionality tests port without an ip and port
Send queuetimeout URL with an ip To test whether the request will be accepted
Functionality tests and port with an ip and port
Send queuetimeout URL without an To test whether the request will be accepted
Functionality tests ip and port without an ip and port
Send the amount with an invalid To test whether a transaction that does not
Functionality tests transaction ID that does not exist exist can be queried
Send the Occasion with less than To test whether Occasion will be accepted
Functionality tests 200 characters with less than 200 characters
Send Occasion with more then 200 To test whether occasion will go through with
Functionality tests characters more then 200 characters
Expected Results Actual Results
Authentication is
successful
Authentication is
unsuccessful
Authentication is
successful
Authentication is
unsuccessful
1) Request is sent to
API gateway
successfully.
Portal displays A valid
https
response
and transaction is to
is returned
the Partner.
successful
2) Valid result is
1) Request
returned is sent
with to
success
API Gateway
message and
successfully. A valid
transaction details
response is returned to
the Partner.
2) Valid result is
1) Request
returned is sent to
with
API Gateway
appropriate error
successfully. A valid
response is returned to
1)
theRequest
Partner.is sent to
API gateway
2) Valid result is
successfully.
returned withA valid
response
appropriateis returned
error to
the Partner.
2) Valid result is
returned with
appropriate error
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an
appropriate error
thrown: Invalid
CommandID
The request shall not
go through with an
appropriate error
thrown: Invalid
identifier
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid Party A
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid Remarks
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid
ResultURL
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid
QueuetimeoutURL
1) Request is sent to
API Gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
Send call back url with an ip and To test whether the request will be accepted
Functionality tests port with a valid ip and port
Send call back url without an ip and To test whether the request will be accepted
Functionality tests port without an ip and port
Send the TransactionDesc with less To test whether TransactionDesc will be
Functionality tests than 200 characters accepted with less than 200 characters
On the phone when the STK menu To test whether the transaction will complete
Functionality tests pops up enter a valid Mpesa PIN successfully with a valid Mpesa PIN
Authentication is
successful
Authentication is
unsuccessful
1) Request is sent to
API Gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
1) Request is sent to
API Gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
1) Request is sent to
API Gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
1) Request is sent to
API gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
1) Request is sent to
API gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate
1) Request iserror
sent to
API gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
You should get an
appropriate success
message: The service
has been accepted
successfully
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid Remarks
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an in
appropriate error
thrown:Invalid
ResultURL
The request shall not
go through with an in
appropriate success
message: The service
has been accepted
successfully
Send an invalid STK push query STK query for paybill account with invalid
request to gateway - Paybill account shortcode is unsuccessful. Request is
has wrong shortcode but correct processed by the API gateway and
password, correct appropriate error message is retuned in the
Functionality tests CheckoutRequestID and timestamp result
Send an invalid STK push query STK query for paybill account with invalid
request to gateway - Paybill account password is unsuccessful. Request is
has wrong password but correct processed by the API gateway and
shortcode, correct appropriate error message is retuned in the
Functionality tests CheckoutRequestID and timestamp result
Send an invalid STK push query STK query for paybill account with invalid
request to gateway - Paybill account timestamp is unsuccessful. Request is
has wrong timestamp but correct processed by the API gateway and
shortcode, correct appropriate error message is retuned in the
Functionality tests CheckoutRequestID and password result
Send an invalid STK push query STK query for paybill account with invalid
request to gateway - Paybill account timestamp is unsuccessful. Request is
has wrong timestamp but correct processed by the API gateway and
shortcode, correct appropriate error message is retuned in the
Functionality tests CheckoutRequestID and password result
Send an invalid STK push query STK from paybill account with invalid
request to gateway - Paybill account CheckoutRequestID is unsuccessful. Request
has wrong CheckoutRequestID but is processed by the API gateway and
correct shortcode, correct appropriate error message is retuned in the
Functionality tests CheckoutRequestID and password result
Expected Results Actual Results
Authentication is
successful
Authentication is
unsuccessful
Portal is unable to
query and throws the
appropriate error
message
Portal is unable to
query and throws the
appropriate error
message
Portal is unable to
query and throws the
appropriate error
message
Portal is unable to
query and throws the
appropriate error
message
Portal is unable to
query and throws the
appropriate error
message
Portal is unable to
query and throws the
appropriate error
message
Testing gateway- Core API integration
Subject Test case Objective
Send request with transaction type Check Identity for paybill account with invalid
Check Identity with command ID password is unsuccessful. Request is
"CheckIdentity" to gateway - Paybill processed by the API gateway and
account has wrong password but appropriate error message is retuned in the
Functionality tests correct shortcode and timestamp result
Send request with transaction type Check Identity for paybill account with invalid
Check Identity with command ID password is unsuccessful. Request is
"CheckIdentity" to gateway - Paybill processed by the API gateway and
account has wrong timestamp but appropriate error message is retuned in the
Functionality tests correct shortcode and password result
Send request with transaction type Check Identity from paybill account with
Check Identity with command ID invalid phone number is unsuccessful.
"CheckIdentity" to gateway - with Request is processed by the API gateway and
an invalid phone number i.e less appropriate error message is retuned in the
Functionality tests than or more then 10 digits result
Send call back url with an ip and To test whether the request will be accepted
Functionality tests port with a valid ip and port
Send call back url without an ip and To test whether the request will be accepted
Functionality tests port without an ip and port
Authentication is
successful
Authentication is
unsuccessful
1) Request is sent to
API Gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
1) Request is sent to
API Gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
1) Request is sent to
API Gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
1) Request is sent to
API gateway
successfully. A valid
response is returned to
the Partner.
2) Valid result is
returned with
appropriate error
You should get an
appropriate success
message: The service
has been accepted
successfully
The request shall not
go through with an
appropriate error
thrown: Invalid
CommandID
Send the request with a credit score To test whether the correct credit score type
Functionality tests type as: Consumer will go through
Send the request with a credit score To test whether an invalid credit score type
Functionality Tests type as: Merchant will go through
Send the request with a credit score To test whether an invalid credit score type
Functionality Tests type as: Example will go through
Expected Results Actual Results
Authentication is
successful
Authentication is
unsuccessful
Send an invalid request type e.g. To test whether an invalid request type will
Functionality tests 123 go through to the gateway
Authentication is
successful
Authentication is
unsuccessful
Send an invalid ProviderID but valid To test whether an invalid response will be
Functionality tests ProviderPassword and MSISDN returned using an Invalid ProviderID
Send an invalid MSISDN but valid To test whether an invalid response will be
Functionality tests ProviderPassword and ProviderID returned using an invalid MSISDN
Expected Results Actual Results
Authentication is
successful
Authentication is
unsuccessful
Authentication is
successful
Authentication is
unsuccessful