Overview
Here’s the setup we commonly advocate with customers as a starting point.
This is assuming a default Edge licence in the cloud which comes with 2 Orgs and 6 Environments. We’re assuming the two orgs are used for administrative separation between non prod and prod.
| Environment |
Apigee Target |
Test Data |
Type of Testing |
Apigee Org |
| DEV |
Mock |
Data and behaviour from Mocks |
Data and behaviour |
Non Prod |
| TEST |
TEST |
Data and behaviour from TEST |
Partial integration |
Non Prod |
| PERF |
TEST / PERF |
Data and behaviour from TEST / PERF |
Performance |
Non Prod |
| UAT |
UAT |
Data and behaviour from UAT |
Smoke |
Non Prod |
| PRE |
PROD |
Data and behaviour from PROD |
Smoke |
Prod |
| PROD |
PROD |
Data and behaviour from PROD |
Smoke |
Prod |
Here’s some background on why we advocate this approach.
Testing
The above assumes that testing in DEV in against target mocks where we have full control over the behaviour and data being exposed. This allows full testing of both the data expected to be mediated by the API and behaviour of the API in happy path, error and edge case scenarios (e.g. back end is down). Test can be fully automated with the confidence that the mock target data and behaviour will not change unexpectedly.
In TEST the APIs are pointing to a real TEST Target. Typically we’ll have less control over the behaviour and data available and so the number of tests that can be automated be be limited compared to DEV where we have full target control. As many tests should be configured here as possible give the reliability of the test system.
In PERF performance tests will be run. Typically a small subset will be automated as part of the promotion of the APIs towards production but there may also be a larger set of tests that cannot be automated that can be run on a more ad hoc basis as necessary e.g. a change has been made that is likely to have a significant performance impact. The idea here is that gross changes in API performance are caught by the automated tests and the full performance tests are only run as required.
In UAT, PRE and PROD a smaller subset of tests are run that are testing basic API setup and functionality without covering all scenarios.
The PRE environment is a mirror of prod and is used for final testing before any launch.
In some scenarios the above assumptions may not hold true in which case the environment for a certain kind of testing may change but the principals should remain the same.
Automation
The above setup also lends itself to automation as there’s a clear path to production.
Whilst a full Continuous Delivery may be difficult for some organisations due to constraints outside the API Program this setup does allow you to build pipelines for as much of the journey as possible with maybe only the final step requiring some manual intervention to trigger the final production push.
Separation of Concerns
Out of the box the traffic between the two orgs is sharing a common infrastructure but the above setup also allows a simple separation should traffic isolation become a priority. Typically we see the environments in the prod org and non prod org separated to isolate production traffic.
See http://apigee.com/about/specification-sheets → Edge Cloud Traffic Isolation Pack for more details on traffic isolation.