Enable automated tests for api scripts that can be promoted to tests in the Launchpad tree if needed or in the continuous integration setup
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
Context: https:/
Goal: Enable automated tests on staging that can be promoted to tests in the Launchpad tree if needed. Proposed graduated levels:
1. They run test script on their own against staging.
1. We run test script before release against staging. We may want to run it against launchpad.dev before landing changes we suspect might cause problems too.
1. We add test script into nightly buildbot runs against db-stable.
1. We integrate test script into Launchpad's full test run.
Basic trick: we have a script that is run after each staging database refresh *and* that can be run in a launchpad test layer. This creates QA users (and any other supporting objects) that can be expected in both staging and in LP tests.
Supporting trick 1: We define a new prefix that is blacklisted, like "qa-" or something. These can only be created in the script.
Supporting trick 2: We provide functions to generate random, non-conflicting names for projects and other LP items.
Supporting trick 3: We provide a harness that runs tests against staging. We provide another harness that runs tests against a local launchpad.dev. We provide a mechanism that runs tests within the Launchpad suite.
End instructions for users: "write your script using only these existing documented users (and maybe other bits). Don't rely on anything else existing. Whenever you want to create something, use one of these helpers to get a name so that you don't get conflicts."
End result: they have scripts they and we can use for QA against staging, against launchpad.dev, and incorporated in our test suite.
Some advantages:
* should be fairly easy to implement on our side
* should be easy for people to get started, following standard QA practices
* quicker for people to get feedback.
Changed in launchpad-foundations: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Changed in launchpad: | |
importance: | Wishlist → Low |
I'm concerned about the blacklist change; thats disproportionate to
the benefits we'll get from this.
I worry that you'll have issues due to the reinvention of sample data
(which is what this is), It works badly in LP tests, why will it work
any better here?
Users can create objects on staging, so why do we need precanned objects?