Skip to content

Commit 3bf3118

Browse files
authored
Merge pull request #53 from woocommerce/24-12/downloading-extensions
Docs for auth required for downloading premium extensions
2 parents 6f5ed71 + 1199dda commit 3bf3118

File tree

3 files changed

+137
-0
lines changed

3 files changed

+137
-0
lines changed

docs/core-concepts/test-types-overview.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,19 @@ By combining both types of tests, you get a thorough quality assurance process:
5151
- **Before release:** Managed tests confirm baseline standards are met.
5252
- **During development:** Custom tests verify new features and custom behaviors.
5353
- **Ongoing maintenance:** Regularly running both test suites helps ensure continuous stability and compatibility as WordPress, WooCommerce, and your extension evolve.
54+
55+
## Working with Additional Extensions
56+
57+
When testing your main extension (SUT), you may also want to include other plugins—e.g., dependencies, compatibility targets, or popular add-ons. The process differs slightly between Managed Tests and Custom Tests:
58+
59+
- **Managed Tests**
60+
- QIT automatically downloads your extension from WooCommerce.com if you own it.
61+
- Additional paid extensions must also be owned by your account, or they won’t be fetched.
62+
- Some WooCommerce.com extensions that are also listed for free on WordPress.org may be downloaded automatically, even if you don’t own them.
63+
- **Local ZIP sources** are allowed **only for the SUT** (if you maintain it).
64+
- No custom test tags or additional custom code can be included.
65+
66+
- **Custom Tests**
67+
- You can add any extension to your test environment via Marketplace (if owned), WordPress.org (if free), or a **local ZIP** (if you don’t own it, or it’s hosted elsewhere).
68+
- You can also create and upload custom test tags and specialized test flows.
69+
- This flexibility is ideal for compatibility checks with plugins you don’t maintain or custom dev builds.
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
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.

sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ const sidebars = {
6565
'custom-tests/generating-tests',
6666
'custom-tests/tagging-tests',
6767
'custom-tests/running-tests',
68+
'custom-tests/downloading-extensions-and-tests',
6869
'custom-tests/understanding-lifecycle',
6970
'custom-tests/orchestration',
7071
'custom-tests/compatibility-tests',

0 commit comments

Comments
 (0)