XeroAPI / xero-php-oauth2

Xero PHP SDK for oAuth 2 generated from Xero API OpenAPI Spec 3.0
MIT License
91 stars 65 forks source link

Add some documentation on how to test the code #190

Closed ishan-biztech closed 3 years ago

ishan-biztech commented 3 years ago

SDK you're using (please complete the following information):

Is your feature request related to a problem? Please describe. I thinks it's better if there is some recommended way to test the code build with this library.

Describe the solution you'd like Add some documentation regarding the testing the code.

Describe alternatives you've considered Not testing at all or testing it but hitting the Xero API everytime we run code. The latter is not ideal as you shouldn't make API calls when testing the app instead mock the response.

SidneyAllen commented 3 years ago

@ishan-biztech - we don't have any testing at this point, but as an open source project we welcome contributions from the community. If you had time to contribute some tests that would be awesome.

Danbardo commented 3 years ago

This is not a solution, but what I have been doing is alternative between tenant id's. One for a test organisation and one for the live one.

SidneyAllen commented 3 years ago

@ishan-biztech - if your question is regarding how to test your integration, we don't have the concept of a sandbox. What we do have is a "Demo company" that comes with any Xero user account. You can authenticate against the demo company -which is pre-popolated with data. You can manually reset that data at any time and it reset automatically every 30 days.

This guide gives further details https://developer.xero.com/documentation/getting-started/development-accounts