|
| 1 | +# Group Tests |
| 2 | + |
| 3 | +Group tests allow you to organize and execute multiple test runs together, either as a logical group or as a batch. This feature is particularly useful when you need to run multiple tests in sequence or want to organize related tests together. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +Group tests work with all test types, but there's an important distinction in how they're executed: |
| 8 | + |
| 9 | +- **Local Tests (E2E and Activation):** Run on your local machine using the QIT CLI. |
| 10 | +- **Remote Tests (All other test types):** Run on QIT's infrastructure. |
| 11 | + |
| 12 | +## Basic workflow |
| 13 | + |
| 14 | +1. **Add tests to a group** using the `--group` flag |
| 15 | +2. **Register the group** (optional) with a custom identifier |
| 16 | +3. **Run the group** to execute all tests |
| 17 | + |
| 18 | +## Adding tests to a group |
| 19 | + |
| 20 | +To add a test to a group, simply append the `--group` flag to any test command: |
| 21 | + |
| 22 | +```qitbash |
| 23 | +qit run:activation your-extension --group |
| 24 | +``` |
| 25 | + |
| 26 | +You can add multiple tests to the same group: |
| 27 | + |
| 28 | +```qitbash |
| 29 | +qit run:activation automatewoo --group --extension_set compatibility |
| 30 | +qit run:security your-extension --group |
| 31 | +``` |
| 32 | + |
| 33 | +## Registering a group |
| 34 | + |
| 35 | +While optional, registering a group with a custom identifier helps you track and reference it later: |
| 36 | + |
| 37 | +```qitbash |
| 38 | +qit group:register --group-identifier commit-1234567890 |
| 39 | +``` |
| 40 | + |
| 41 | +## Running a group |
| 42 | + |
| 43 | +You can run a group in two ways: |
| 44 | + |
| 45 | +1. **Run without registration:** |
| 46 | +```qitbash |
| 47 | +qit group:run |
| 48 | +``` |
| 49 | + |
| 50 | +2. **Run with a specific group identifier:** |
| 51 | +```qitbash |
| 52 | +qit group:run --group-identifier commit-1234567890 |
| 53 | +``` |
| 54 | + |
| 55 | +When you run a group: |
| 56 | +- Remote tests are triggered on QIT's infrastructure |
| 57 | +- Local tests (E2E and Activation) run sequentially on your machine |
| 58 | +- No additional input is required once the group starts running |
| 59 | + |
| 60 | +## Batch mode |
| 61 | + |
| 62 | +If you want to run tests without grouping them logically, use the `--skip-grouping` flag: |
| 63 | + |
| 64 | +```qitbash |
| 65 | +qit group:run --skip-grouping |
| 66 | +``` |
| 67 | + |
| 68 | +This will execute the tests without maintaining the group relationship between them. |
| 69 | + |
| 70 | +## Managing groups |
| 71 | + |
| 72 | +### View current group |
| 73 | + |
| 74 | +To see the currently stored group: |
| 75 | + |
| 76 | +```qitbash |
| 77 | +qit group:show |
| 78 | +``` |
| 79 | + |
| 80 | +### Fetch a specific group |
| 81 | + |
| 82 | +To retrieve a specific group from remote: |
| 83 | + |
| 84 | +```qitbash |
| 85 | +qit group:fetch --group-identifier commit-1234567890 |
| 86 | +``` |
| 87 | + |
| 88 | +### Clear the current group |
| 89 | + |
| 90 | +To remove the current group: |
| 91 | + |
| 92 | +```qitbash |
| 93 | +qit group:clear |
| 94 | +``` |
| 95 | + |
| 96 | +## Important notes |
| 97 | + |
| 98 | +- **Duplicate prevention:** If a test with identical parameters is already in the group, it won't be added again |
| 99 | +- **Opting out:** To prevent a test from being picked up by a group run, use the `--no_group` flag |
| 100 | +- **Group status:** You can monitor the status of your group and individual test runs through the QIT manager interface |
| 101 | + |
| 102 | +## Example workflow |
| 103 | + |
| 104 | +Here's a complete example of using group tests: |
| 105 | + |
| 106 | +```qitbash |
| 107 | +# Add tests to the group |
| 108 | +qit run:activation automatewoo --group --extension_set compatibility |
| 109 | +qit run:security your-extension --group |
| 110 | +
|
| 111 | +# Register the group with an identifier |
| 112 | +qit group:register --group-identifier commit-1234567890 |
| 113 | +
|
| 114 | +# Run the group |
| 115 | +qit group:run |
| 116 | +``` |
| 117 | + |
| 118 | +The manager will respond with: |
| 119 | +``` |
| 120 | +Group enqueued on QIT servers! |
| 121 | +Group ID: <id> |
| 122 | +Group Identifier: commit-1234567890 |
| 123 | +-------------------------------- |
| 124 | +Test Run ID: <test_run_id> |
| 125 | +Test Type: Activation |
| 126 | +Test Results Manager URL: <url> |
| 127 | +------------------------------- |
| 128 | +Test Run ID: <test_run_id> |
| 129 | +Test Type: Security |
| 130 | +Test Results Manager URL: <url> |
| 131 | +``` |
| 132 | + |
| 133 | +## Best practices |
| 134 | + |
| 135 | +- Use meaningful group identifiers that help you track related tests. |
| 136 | +- Clear groups when you're done to prevent accidental test runs. |
| 137 | + |
| 138 | + |
0 commit comments