ChrisChinchilla / CiviCRM-eWay-recurring-payment-processor

CiviCRM eWay recurring payment processor
https://github.com/henare/CiviCRM-eWay-recurring-payment-processor#readme
0 stars 4 forks source link

Test harness #26

Open kenwest opened 9 years ago

kenwest commented 9 years ago

I'm getting bored testing this extension (wonderful as it is). Here are some thoughts on testing ...

Thoughts?

eileenmcnaughton commented 9 years ago

It's possible to add unit tests using Civix - I did it a while back on a different module but there was some teething.

When I've been testing on sites I've been hacking a short-circuit into some functions so they don't actually contact eway- I was thinking about having a setting to put the site into 'eway offline test mode' so that all payments do this - & probably a hook kicks in defaulting the credit card details to save entering them

kenwest commented 9 years ago

Eileen, when I test I take a copy of my production system and then set the eWAY payment processor so the live-payment settings are the same as the test-payment settings. I then run the eWAY job manually to process any payments from production (they fail because they don't use the test token value),

There's a risk I might one day inadvertently process live transactions, but I'm also testing the payment processor all the way.

eileenmcnaughton commented 9 years ago

hmm - I'm not quite sure what you are saying - are you advocating this approach or telling me the short-comings of it?

The patch in the PR allows you to set the whole site into dev mode - which allows testing of ;everything but the interaction with eway - which is one part of the testing required when working with this (but obviously only one part)

kenwest commented 9 years ago

Eileen, I'm not sure what I'm saying either ;-) It happens with age.

eileenmcnaughton commented 9 years ago

or too many hours in front of a screen