Options for using Box during automated system testing of Box Platform apps?
I've been thinking about how I would test a new Box Platform app. (Automated testing, of course). Most of my tests would be at a low enough level that they would not hit Box (instead using Stubs or Mocks, or Service Virtualisation). However, to really give me confidence that my app works as intended I would need a small number of very high-level tests in which my app interacts with Box for real.
The requirements that I would have for such testing would include:
- An application created/registered in Box. (That's easy, I'll be using the real one in the tests).
- A Box enterprise/instance
- ...where the application is authorized for that enterprise.
- ...where the tests or application to know the enterprise_id of that enterprise.
- ...where the enterprise starts with a known set of App Users (perhaps none), and a known set of files for those users (perhaps none) at the beginning of each test run. This is to give me confidence about repeatability of the tests.
The first approach that comes to mind is to create a new Box enterprise/instance solely for use by these tests, and at the end (or the beginning) of the tests, delete any App Users that already exist (and their files).
But I have a few questions around it:
- Is that something that Box would be happy with me doing (as long as it's not constantly running)? (e.g. does it violate the terms & conditions where they say "You must not... use any automated process or Service (such as a bot, a spider, or periodic caching of information stored by Box) to access or use the Service"?)
- Does anyone else reading this do anything similar? If not, did you consider it and decide against it?
- Is the approach I outlined above (scripting the clean-up of a testing-specific enterprise) the only way to do this, or does Box provide something to support automated system testing of apps, or are there any other options?
Please sign in to leave a comment.
Comments
0 comments