Integration testing

Hi,

I’m working on an API integration between FreeAgent, our Saas and Stripe,
mainly for the purposes of maintaining accounts and reconciliation.

I would like to build a small suite of automated integration tests that
prove and ensure our accounting is being maintained accurately through our
API integration with FreeAgent.

I would like to know if it would be possible to use a “Password” grant type
on the sandbox in order to automate my integration tests,

Thanks,
Dave

Hi Dave,

I suspect that would lead to further confusion when first encountering the
API (“but it works in the sandbox!”) and also wouldn’t really provide you
with a true integration test if it was behaving differently from a
production environment.

-JOn Wed, Jun 25, 2014 at 1:18 PM, Dave Goodchild dave@davegoodchild.co.uk wrote:

But couldn’t the sandbox support it so we can create integration tests
instead of manual tests?

Thanks,
D

On Wednesday, 25 June 2014 14:15:33 UTC+2, Jonathan Barrett wrote:

Hi Dave,

Thanks for getting in touch. The FreeAgent API deliberately doesn’t
support the Password grant type, nor is it ever likely to, I’m afraid.

-J

On Wednesday, 25 June 2014 12:56:08 UTC+1, Dave Goodchild wrote:

Hi,

I’m working on an API integration between FreeAgent, our Saas and Stripe,
mainly for the purposes of maintaining accounts and reconciliation.

I would like to build a small suite of automated integration tests that
prove and ensure our accounting is being maintained accurately through
our
API integration with FreeAgent.

I would like to know if it would be possible to use a “Password” grant
type
on the sandbox in order to automate my integration tests,

Thanks,
Dave


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774

Hi Dave,

To test the usage of the API rather than testing the OAuth flow you can
store a refresh token and use this to request a new access token on each
test run. You can then use this access token in your tests.

If you want to test the OAuth flow you can use something like PhantomJS or
Selenium to simulate the browser’s interaction with FreeAgent.

Kind regards,

GraemeOn 25 June 2014 15:16, Dave Goodchild dave@davegoodchild.co.uk wrote:

Hey,

I can’t say I really agree there with “true integration test”. How you
obtain your access token via oAuth is just 1 process and doesn’t change how
you query the endpoints. The querying of the endpoint would always be
the same.

The responses would also be the same. The initial integration process
would be different, absolutely, however with clear response messages on the
live such as “This API does not support “Password” as a grant type” would
tell me people very quickly why the integration doesn’t work. For me this
is a surprising response, as testing should be a key process in any
software development lifecycle. This effectively forces all users of the
API down a “manual” testing path :confused:

On Wednesday, 25 June 2014 15:15:30 UTC+2, Jonathan Barrett wrote:

Hi Dave,

I suspect that would lead to further confusion when first encountering
the API (“but it works in the sandbox!”) and also wouldn’t really provide
you with a true integration test if it was behaving differently from a
production environment.

-J

On Wed, Jun 25, 2014 at 1:18 PM, Dave Goodchild < da...@davegoodchild.co.uk> wrote:

But couldn’t the sandbox support it so we can create integration tests
instead of manual tests?

Thanks,
D

On Wednesday, 25 June 2014 14:15:33 UTC+2, Jonathan Barrett wrote:

Hi Dave,

Thanks for getting in touch. The FreeAgent API deliberately doesn’t
support the Password grant type, nor is it ever likely to, I’m afraid.

-J

On Wednesday, 25 June 2014 12:56:08 UTC+1, Dave Goodchild wrote:

Hi,

I’m working on an API integration between FreeAgent, our Saas and
Stripe,
mainly for the purposes of maintaining accounts and reconciliation.

I would like to build a small suite of automated integration tests that
prove and ensure our accounting is being maintained accurately through
our
API integration with FreeAgent.

I would like to know if it would be possible to use a “Password” grant
type
on the sandbox in order to automate my integration tests,

Thanks,
Dave


You received this message because you are subscribed to the Google
Groups “FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to freeagent_ap...@googlegroups.com.
To post to this group, send email to freeag...@googlegroups.com.

Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_api+unsubscribe@googlegroups.com.
To post to this group, send email to freeagent_api@googlegroups.com.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

Graeme Boyd
Engineering Manager

Web. freeagent.com http://www.freeagent.com/ Blog. freeagent.com/blog
Twitter. @freeagent https://twitter.com/#!/freeagent Facebook.
facebook.com/freeagentapp

40 Torphichen Street, Edinburgh, EH3 8JB
FreeAgent Central Ltd. Registered in sunny Scotland SC316774

But couldn’t the sandbox support it so we can create integration tests
instead of manual tests?

Thanks,
DOn Wednesday, 25 June 2014 14:15:33 UTC+2, Jonathan Barrett wrote:

Hi Dave,

Thanks for getting in touch. The FreeAgent API deliberately doesn’t
support the Password grant type, nor is it ever likely to, I’m afraid.

-J

On Wednesday, 25 June 2014 12:56:08 UTC+1, Dave Goodchild wrote:

Hi,

I’m working on an API integration between FreeAgent, our Saas and Stripe,
mainly for the purposes of maintaining accounts and reconciliation.

I would like to build a small suite of automated integration tests that
prove and ensure our accounting is being maintained accurately through our
API integration with FreeAgent.

I would like to know if it would be possible to use a “Password” grant
type
on the sandbox in order to automate my integration tests,

Thanks,
Dave

Hi Dave,

Thanks for getting in touch. The FreeAgent API deliberately doesn’t support
the Password grant type, nor is it ever likely to, I’m afraid.

-JOn Wednesday, 25 June 2014 12:56:08 UTC+1, Dave Goodchild wrote:

Hi,

I’m working on an API integration between FreeAgent, our Saas and Stripe,
mainly for the purposes of maintaining accounts and reconciliation.

I would like to build a small suite of automated integration tests that
prove and ensure our accounting is being maintained accurately through our
API integration with FreeAgent.

I would like to know if it would be possible to use a “Password” grant type
on the sandbox in order to automate my integration tests,

Thanks,
Dave

Hey,

I can’t say I really agree there with “true integration test”. How you
obtain your access token via oAuth is just 1 process and doesn’t change how
you query the endpoints. The querying of the endpoint would always be the
same.

The responses would also be the same. The initial integration process would
be different, absolutely, however with clear response messages on the live
such as “This API does not support “Password” as a grant type” would tell
me people very quickly why the integration doesn’t work. For me this is a
surprising response, as testing should be a key process in any software
development lifecycle. This effectively forces all users of the API down a
“manual” testing path :/On Wednesday, 25 June 2014 15:15:30 UTC+2, Jonathan Barrett wrote:

Hi Dave,

I suspect that would lead to further confusion when first encountering the
API (“but it works in the sandbox!”) and also wouldn’t really provide you
with a true integration test if it was behaving differently from a
production environment.

-J

On Wed, Jun 25, 2014 at 1:18 PM, Dave Goodchild <da...@davegoodchild.co.uk <javascript:>> wrote:

But couldn’t the sandbox support it so we can create integration tests
instead of manual tests?

Thanks,
D

On Wednesday, 25 June 2014 14:15:33 UTC+2, Jonathan Barrett wrote:

Hi Dave,

Thanks for getting in touch. The FreeAgent API deliberately doesn’t
support the Password grant type, nor is it ever likely to, I’m afraid.

-J

On Wednesday, 25 June 2014 12:56:08 UTC+1, Dave Goodchild wrote:

Hi,

I’m working on an API integration between FreeAgent, our Saas and
Stripe,
mainly for the purposes of maintaining accounts and reconciliation.

I would like to build a small suite of automated integration tests that
prove and ensure our accounting is being maintained accurately through
our
API integration with FreeAgent.

I would like to know if it would be possible to use a “Password” grant
type
on the sandbox in order to automate my integration tests,

Thanks,
Dave


You received this message because you are subscribed to the Google Groups
“FreeAgent API” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to freeagent_ap...@googlegroups.com <javascript:>.
To post to this group, send email to freeag...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/freeagent_api.
For more options, visit https://groups.google.com/d/optout.

Jonathan Barrett, Senior Engineer

FreeAgent: Accounting software, simplified
www.freeagent.com

+44 (0)131 447 0011

Follow us on Twitter: @freeagent https://twitter.com/freeagent

FreeAgent Central Ltd, 40 Torphichen Street, Edinburgh EH3 8JB
Registered in Scotland SC316774