how to write payment processor unit and integration tests?

View: New views
5 Messages — Rating Filter:   Alert me  

how to write payment processor unit and integration tests?

by Brandon Craig Rhodes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Okay, having played around with my payment-processor improvements from
my web browser, I now need to write actual tests so that (a) I can
finish adding a few last features, without fearing that I'm breaking
things that work already, and (b) so that I know that, say, the new
PayPal payment processor code actually works against a real PayPal
sandbox.

But, having put about two hours of work into the attempt, I can't figure
out how to run a single one of the existing payment processor's tests
without getting big tracebacks and odd errors.  Before I spend lots more
time on this, could any existing payment processor authors let me know
if they have working tests I can actually run and then base my own
testing procedures on?

Thanks!

For the record, thanks to this earlier email exchange:

http://groups.google.com/group/getpaid-dev/browse_thread/thread/48ca7994eeae279d

I do know how to run the "core" tests for GetPaid.  It's now the
payment-processor tests that I'm curious about, and that I've never seen
running before.

Thanks!

--
Brandon Craig Rhodes   brandon@...   http://rhodesmill.org/brandon

--~--~---------~--~----~------------~-------~--~----~
GetPaid for Plone: http://www.plonegetpaid.com (overview info) | http://code.google.com/p/getpaid (code and issue tracker)
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...

For more options, visit this group at
http://groups.google.com/group/getpaid-dev?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: how to write payment processor unit and integration tests?

by Brandon Craig Rhodes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Brandon Craig Rhodes <brandon@...> writes:

> Okay, having played around with my payment-processor improvements from
> my web browser, I now need to write actual tests ...

An update: after reviewing the previous thread on the test subject more
carefully, and then reverting my buildout.cfg (which had accumulated a
few changes) back to a pristine state and re-building, I can now run the
payment-processor tests again!

But they all fail.

So my question still stands: I'm wondering if there's a working example
of a tested payment processor out there that I can operate from.  Of the
three that I can find that even have tests ("getpaid.pagseguro" has a
"tests.py" file but it's mostly commented out), the results are:

 googlecheckout - Tests fail.
 ogone - Tests fail.
 pxpay - fails to even build out: "Getting distribution for
     'ssl-for-setuptools'. Error: Download error..."

But, at least I can run them now. :-)

--
Brandon Craig Rhodes   brandon@...   http://rhodesmill.org/brandon

--~--~---------~--~----~------------~-------~--~----~
GetPaid for Plone: http://www.plonegetpaid.com (overview info) | http://code.google.com/p/getpaid (code and issue tracker)
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...

For more options, visit this group at
http://groups.google.com/group/getpaid-dev?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: how to write payment processor unit and integration tests?

by rafael-54 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Getpaid.pagseguro tests.py is a copy from paypals... I just overwrote getpaid.paypal to work with brazilian pagseguro.. So, maybe getpaid.paypal has a working tests.py..





Brandon Craig Rhodes escreveu:
Brandon Craig Rhodes brandon@... writes:

  
Okay, having played around with my payment-processor improvements from
my web browser, I now need to write actual tests ...
    

An update: after reviewing the previous thread on the test subject more
carefully, and then reverting my buildout.cfg (which had accumulated a
few changes) back to a pristine state and re-building, I can now run the
payment-processor tests again!

But they all fail.

So my question still stands: I'm wondering if there's a working example
of a tested payment processor out there that I can operate from.  Of the
three that I can find that even have tests ("getpaid.pagseguro" has a
"tests.py" file but it's mostly commented out), the results are:

 googlecheckout - Tests fail.
 ogone - Tests fail.
 pxpay - fails to even build out: "Getting distribution for
     'ssl-for-setuptools'. Error: Download error..."

But, at least I can run them now. :-)

  


--~--~---------~--~----~------------~-------~--~----~
GetPaid for Plone: http://www.plonegetpaid.com (overview info) | http://code.google.com/p/getpaid (code and issue tracker)
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...

For more options, visit this group at
http://groups.google.com/group/getpaid-dev?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: how to write payment processor unit and integration tests?

by Mikko Ohtamaa :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



 > I do know how to run the "core" tests for GetPaid.  It's now the
payment-processor tests that I'm curious about, and that I've never seen
running before.

Here are also some payment processor specific tests you could look for inspiration:



--~--~---------~--~----~------------~-------~--~----~
GetPaid for Plone: http://www.plonegetpaid.com (overview info) | http://code.google.com/p/getpaid (code and issue tracker)
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...

For more options, visit this group at
http://groups.google.com/group/getpaid-dev?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: how to write payment processor unit and integration tests?

by Michael Dunstan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Oct 17, 2009 at 3:43 AM, Brandon Craig Rhodes
<brandon@...> wrote:
>
> But, having put about two hours of work into the attempt, I can't figure
> out how to run a single one of the existing payment processor's tests
> without getting big tracebacks and odd errors.  Before I spend lots more
> time on this, could any existing payment processor authors let me know
> if they have working tests I can actually run and then base my own
> testing procedures on?

Targeting googlecheckout, working from:

    https://getpaid.googlecode.com/svn/getpaid.buildout/trunk

Edit buildout.cfg so as to enable googlecheckout. See attached patch.

Run buildout for the 316 profile:

    ./bin/buildout -c 316.cfg

Run the tests:

   ./bin/instance test --package getpaid.googlecheckout

Which reports:

  Ran 28 tests with 0 failures and 0 errors in 8.034 seconds.

--
Michael Dunstan

--~--~---------~--~----~------------~-------~--~----~
GetPaid for Plone: http://www.plonegetpaid.com (overview info) | http://code.google.com/p/getpaid (code and issue tracker)
You received this message because you are subscribed to the Google Groups "getpaid-dev" group.
To post to this group, send email to getpaid-dev@...
To unsubscribe from this group, send email to getpaid-dev+unsubscribe@...

For more options, visit this group at
http://groups.google.com/group/getpaid-dev?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---



enable-googlecheckout.patch (1K) Download Attachment