You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/how-tos/testing/integration/rerunning.adoc
+29-33Lines changed: 29 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -1,54 +1,50 @@
1
1
= Retriggering Integration Tests
2
2
3
-
Integration test scenarios for a given snapshot can be re-triggered by adding a label to the snapshot.
3
+
Integration test(s) for a given snapshot can be re-triggered by adding the `test.appstudio.openshift.io/run` label to the snapshot.
4
4
5
5
See also xref:/how-tos/configuring/rerunning.adoc[Retriggering build pipelines].
6
6
7
-
.Prerequisites
8
-
- You have a snapshot that has completed all its initial tests. All initial tests must be finished before you trigger subsequent tests.
9
-
10
-
- The snapshot for which tests will be retriggered has completed its initial tests.
11
-
12
-
- You have CLI access to the specific OpenShift cluster. For information on obtaining CLI access, refer xref:/getting-started/cli.adoc[Getting started with the CLI].
13
-
14
-
.Procedure
15
-
16
-
- If you want to rerun *all* the IntegrationTestScenarios, directly go to step `3.a.`
7
+
== Supported Values for the label
17
8
18
-
. Identify the IntegrationTestScenario that needs to be rerun. For a given snapshot, if you like, you can only rerun one IntegrationTestScenario. The related snapshot can be found on the pipelineRun details page in the UI, as shown in the example below:
9
+
* `all`: Reruns all the IntegrationTestScenarios (both optional and required) whose contexts match the snapshot.
. To rerun within the UI, click on the three vertical dots on the right side of the details page mentioned above. From the expanded menu, select "Rerun". Alternatively, follow the below steps to rerun via the CLI.
24
-
25
-
. To rerun integration tests via CLI:
26
-
27
-
.. If you want to rerun all the IntegrationTestScenarios, label the snapshot with `test.appstudio.openshift.io/run`, assigning *all* as its value.
This will rerun all IntegrationTestScenarios, both optional and required, provided their context matches the Snapshot.
38
-
39
-
.. Or, if you just want to rerun a specific IntegrationTestScenario, label the snapshot with `test.appstudio.openshift.io/run`, assigning the scenario name you wish to rerun as its value.
17
+
* `[scenario name]`: Reruns a specific IntegrationTestScenario, regardless of whether its context matches the snapshot. Replace [scenario name] with the name of the IntegrationTestScenario you want to retrigger.
- You have a snapshot that has completed all its initial tests. All initial tests must be finished before you trigger subsequent tests.
28
+
- The snapshot for which tests will be retriggered has completed its initial tests.
29
+
- You have CLI access to the specific OpenShift cluster. For information on obtaining CLI access, refer xref:/getting-started/cli.adoc[Getting started with the CLI].
30
+
31
+
== Procedure
32
+
33
+
Identify the snapshot to retrigger tests for. You can find the related snapshot on the pipelineRun details page in the UI.
34
+
Example:
35
+
47
36
+
48
-
[NOTE]
49
-
This will rerun the specified IntegrationTestScenario, regardless of whether its context matches the Snapshot.
. Click on the three vertical dots on the right side of the pipelineRun details page seen above.
42
+
. From the expanded menu, select "Rerun".
43
+
44
+
Retrigger via CLI:
50
45
51
-
. The tests are re-triggered automatically. Once they are re-triggered, the system removes the label, allowing you to apply a new label for a different scenario if you wish to test multiple scenarios.
46
+
. Add the `test.appstudio.openshift.io/run` label to the snapshot, with any of the supported values as shown above.
47
+
. The tests are re-triggered automatically. Once they are re-triggered, the system removes the label, allowing you to apply a new label for a different scenario if you wish to test multiple scenarios. Verify that the test(s) have started.
52
48
53
49
+
54
50
[source]
@@ -61,9 +57,9 @@ integration-pipelinerun-jfrdb 4 seconds ago --- Running
61
57
----
62
58
63
59
+
64
-
NOTE: This command is used to verify that a re-triggered integration pipelineRun has started. If you run this command long after the re-trigger command, it may not show any output because pipelineRun resources are pruned after completion. Additionally, the command may display other unrelated pipelineRuns that are in progress at the same time.
60
+
NOTE: If you run the command long after retriggering, the pipelineRun might have been pruned. The output may also include other unrelated pipelineRuns.
65
61
66
-
.Verification
62
+
== Verification
67
63
68
64
. To verify the tests, run `tkn pipelinerun describe [pipelinerun]` and ensure that the labels `appstudio.openshift.io/snapshot` and `test.appstudio.openshift.io/scenario` reference the correct snapshot and scenario.
0 commit comments