Skip to content

Commit f478033

Browse files
committed
docs(STONEINTG-1065): refactor the rerun page
...to reduce deplication Signed-off-by: Dheeraj<[email protected]>
1 parent c7fe611 commit f478033

File tree

1 file changed

+29
-33
lines changed

1 file changed

+29
-33
lines changed

docs/modules/ROOT/pages/how-tos/testing/integration/rerunning.adoc

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,50 @@
11
= Retriggering Integration Tests
22

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.
44

55
See also xref:/how-tos/configuring/rerunning.adoc[Retriggering build pipelines].
66

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
178

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.
10+
Example command:
1911

20-
+
21-
image::snapshot.png[role="border" alt="IntegrationTestScenario Snapshot"]
22-
23-
. 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.
28-
29-
+
3012
[source]
3113
----
3214
$ kubectl label snapshot [snapshot name] test.appstudio.openshift.io/run=all
3315
----
3416

35-
+
36-
[NOTE]
37-
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.
18+
Example command:
4019

41-
+
4220
[source]
4321
----
4422
$ kubectl label snapshot [snapshot name] test.appstudio.openshift.io/run=[scenario name]
4523
----
4624

25+
== Prerequisites
26+
27+
- 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+
4736
+
48-
[NOTE]
49-
This will rerun the specified IntegrationTestScenario, regardless of whether its context matches the Snapshot.
37+
image::snapshot.png[role="border" alt="IntegrationTestScenario Snapshot"]
38+
39+
Retrigger via UI:
40+
41+
. 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:
5045

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.
5248

5349
+
5450
[source]
@@ -61,9 +57,9 @@ integration-pipelinerun-jfrdb 4 seconds ago --- Running
6157
----
6258

6359
+
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.
6561

66-
.Verification
62+
== Verification
6763

6864
. 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.
6965

0 commit comments

Comments
 (0)