3

Someone has a credit card issued in India but he is in the USA. Today is the last date for payment, he is paying around 8.00 PM in the USA but it's next day in India.

How can a QA person test such scenarios?

2

Time related testing is tricky.

We get over this problem in our database testing, by having a procedure called getedate(), internally, it calls the getdate() system function, which normally returns the current datetime of the server, but there is a configuration table which has an override datetime stored. If the configuration table has the override value set, then the database procedures will run as if it were that datetime, otherwise if the configuration override is NULL then it uses the current datetime.

There is a small system overhead that you need to be aware of that may deliver a performance hit to your application, but if that is acceptable, this is a fairly simple way to move forward and backwards in time and have different date time setups on different servers.

2

First and foremost, the question of "What happens if . . ." isn't up for you to decide. If the thing that you're testing doesn't have a documented answer to that question, it's up to you to make sure it is answered by the appropriate person/organization, but you really shouldn't be asking that question here, as the answer is going to be "It depends." It'll depend on the banks involved, possibly the laws of the country/countries involved, probably the language of the contract that allows the transfer to happen, and the payment infrastructure that is being used. It may also depend on the business process owner, who may want to grant leniency or not in a given situation. This is really not the sort of thing you as a tester want to determine what the correct behavior is; if you answer it incorrectly, you could be opening someone up to liability.

As to how to test this, stubs/mocking/test scaffolding is the way to go. Once you have an answer to the question (and it's possible that there are multiple answers, depending on country of origin/contract language/etc), you have to, internally, be able to determine what the right answer is. And you can certainly write function testcases for that. It would probably be better to have this determined by querying database, not in code, as the answer might well change if laws or contract language changes. And then, once you're sure you can get the right answer, you'll need to write test cases that mock the appropriate external systems, and verify that your program is dealing with the external systems in the way that is documented (i.e., making a payment request for a larger amount if a fee is involved, or possibly making two payment requests, one for the service and one for the fee, or whatever.)

1

It depends on the type of the credit card, whether it's an international credit card or it's just a national (in this case, an Indian Bank issued the credit card) credit card.

For the international credit card monthly payment, based on the scenario above, the payment will be accepted with additional charges based on the Credit Card term & condition. You could have these following scenarios to be tested based on the timezone:

  1. The payment should be successfully completed without additional charge
  2. The payment should be successfully completed with additional charge (if it's surpassed the last payment date)

If it's a local credit card which can't be used internationally, the scenario will be to check whether it's a valid or invalid credit card when you proceed any transaction abroad.

However, if the guy only wants to pay for the credit card monthly payment based on the transaction he did in India but he is currently abroad (any other countries), you can refer to the previous scenario (with or without Additional Charges/Fines based on the time in India).

Hope this helps.

0

Irrespective of the place where you are currently, if you change timezone of your system then it will treat like you are at that place. But you have to hit the server which is located in the zone where card belongs to. As far as GDPR is concern then this will not come into picture with testing. So change the time zone and doing process of payment will automatically take care of date/time and will show date of payment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.