|
| 1 | +# Downloading extensions and tests |
| 2 | + |
| 3 | +QIT automatically downloads the extension you are testing **(SUT)** and any additional plugins, dependencies, and test tags. By default, QIT fetches the latest stable versions from WooCommerce.com for paid extensions and WordPress.org for free plugins. |
| 4 | + |
| 5 | +## The extension under test |
| 6 | + |
| 7 | +The main extension you are testing must be a product in the WooCommerce.com marketplace and associated with your account. The account used during `qit connect` **must be the maintainer of this extension**. This can be a product submission or a published product. |
| 8 | + |
| 9 | +For more details, see [Authenticating with QIT](../installation-setup/authenticating.md). |
| 10 | + |
| 11 | +## Downloading paid extensions |
| 12 | + |
| 13 | +Paid extensions require authentication. Similar to the SUT, you **must be the maintainer of the paid extension** you want to include in your test. If you do not maintain it, you must provide a local source (for example, a ZIP file containing the extension). |
| 14 | + |
| 15 | +Below you’ll find examples of providing local sources. |
| 16 | + |
| 17 | +## Downloading free extensions |
| 18 | + |
| 19 | +Free extensions are sourced directly from WordPress.org without requiring authentication or ownership. You can still provide a local source if you want to test a modified or development version. |
| 20 | + |
| 21 | +## Additional plugins, dependencies, and test tags |
| 22 | + |
| 23 | +- **Paid (WooCommerce.com):** You must be the maintainer or provide a local source. |
| 24 | +- **Free (WordPress.org):** No authentication is required. |
| 25 | +- **Not listed in either marketplace:** A local source is required. |
| 26 | +- **Custom test tags**: You must own the associated extension or provide a local source. |
| 27 | + |
| 28 | +## Providing local sources |
| 29 | + |
| 30 | +In `qit.yml`: |
| 31 | + |
| 32 | +```yaml |
| 33 | +plugins: |
| 34 | + my-plugin: |
| 35 | + source: ./my-plugin.zip |
| 36 | + test_tags: |
| 37 | + - ./local-tests/my-plugin-tests |
| 38 | +``` |
| 39 | +
|
| 40 | +## Installing from other sources |
| 41 | +
|
| 42 | +To fetch extensions from unsupported locations (such as private Git repositories), implement **custom handlers**. For details, see [Advanced Config Handlers](./../advanced-usage/advanced-config-handlers.md). |
| 43 | +
|
| 44 | +## Example scenario – step by step |
| 45 | +
|
| 46 | +Below is an example scenario where we run a custom E2E test to demonstrate how QIT applies its downloading rules. |
| 47 | +
|
| 48 | +**Scenario:** You are the developer of `my-extension` (your SUT), and you want to include `automatewoo-birthdays` in your test. However, you don’t maintain `automatewoo-birthdays` or its dependency `automatewoo`, both of which are paid extensions. |
| 49 | + |
| 50 | +At first, you run this command: |
| 51 | + |
| 52 | +```bash |
| 53 | +qit run:e2e my-extension -p automatewoo-birthdays |
| 54 | +``` |
| 55 | + |
| 56 | +This will fail because you don’t have access to `automatewoo-birthdays` or `automatewoo`. |
| 57 | + |
| 58 | +Let’s see how QIT processes each step and how you can resolve this by providing local ZIP files for the paid plugins you don’t own. |
| 59 | + |
| 60 | +### What happens step-by-step: |
| 61 | + |
| 62 | +- **`my-extension` (SUT)**: |
| 63 | + - QIT checks WooCommerce.com to confirm that you maintain `my-extension`. |
| 64 | + - Since you do, it downloads the latest stable release of `my-extension` and the `default` custom test tag. |
| 65 | + - No local source is required. If you wanted to test a development build, you could provide a local ZIP instead. |
| 66 | + |
| 67 | +- **`automatewoo-birthdays` (additional plugin)**: |
| 68 | + - This is a paid extension that you do not maintain. |
| 69 | + - QIT cannot download it from WooCommerce.com, so it checks `qit.yml` for a local source. |
| 70 | + - If no local source is provided, QIT cannot proceed. |
| 71 | + |
| 72 | +- **`automatewoo` (dependency)**: |
| 73 | + - `automatewoo-birthdays` depends on `automatewoo`, another paid extension you don’t maintain. |
| 74 | + - QIT checks WooCommerce.com for `automatewoo`. Since you don’t own it, QIT expects a local source. |
| 75 | + - You must provide something like `./automatewoo.zip`. |
| 76 | + |
| 77 | +- **`woocommerce` (dependency)**: |
| 78 | + - Suppose `automatewoo` depends on `woocommerce`. |
| 79 | + - `woocommerce` is free and available on WordPress.org. |
| 80 | + - QIT automatically fetches it without needing a local source or authentication. |
| 81 | + |
| 82 | +**Example `qit.yml` configuration:** |
| 83 | + |
| 84 | +```yaml |
| 85 | +plugins: |
| 86 | + my-extension: |
| 87 | + # Paid extension that you maintain, automatically fetched from WooCommerce.com. |
| 88 | + # Optionally override with a local zip if desired: |
| 89 | + # source: ./my-extension.zip |
| 90 | +
|
| 91 | + automatewoo-birthdays: |
| 92 | + # Paid, not maintained by you → must provide a local source |
| 93 | + source: ./automatewoo-birthdays.zip |
| 94 | +
|
| 95 | + automatewoo: |
| 96 | + # Paid, not maintained by you → must provide a local source |
| 97 | + source: ./automatewoo.zip |
| 98 | +
|
| 99 | + # woocommerce: |
| 100 | + # Free, automatically fetched from WordPress.org if no source is provided. |
| 101 | + # Listing it here is optional. |
| 102 | +``` |
| 103 | + |
| 104 | +With this configuration, running: |
| 105 | + |
| 106 | +```bash |
| 107 | +qit run:e2e my-extension -p automatewoo-birthdays |
| 108 | +``` |
| 109 | + |
| 110 | +now succeeds. QIT sets up the environment by fetching what you own and using local sources for what you don’t. |
| 111 | + |
| 112 | +--- |
| 113 | + |
| 114 | +## Future improvements |
| 115 | + |
| 116 | +We recognize that managing paid extension access between vendors, collaborators, or specific developer accounts is a complex challenge, especially when aiming to conduct [compatibility tests](./compatibility-tests.md). |
| 117 | + |
| 118 | +**Planned enhancements** include more flexible **Access Control**, enabling you to grant selected marketplace vendors or accounts the ability to access your paid extensions and test tags without everyone having to rely on local sources. |
| 119 | + |
| 120 | +We encourage you to share your feedback and use cases, which will guide us in refining these upcoming features. |
0 commit comments