-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathstep.yml
124 lines (91 loc) · 5.35 KB
/
step.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
title: |-
Export test results to Test Reports add-on
summary: |
This Step is used to search for test results and export them for the **Deploy to Bitrise.io** Step which can export the results to the testing add-on.
description: |
Not all testing Steps automatically export their results to the Test Reports add-on. This Step is designed to export the results of those Steps that do not do this automatically. The Step creates the required `test-info.json` file and deploys the test results in the correct directory for export.
### Configuring the Step
To use this Step to export the results of a testing Step - for example, **Flutter Test** -, you need to make sure that:
- The Step knows which folder to look for your test results.
- The Step knows which file to look for.
- The Step exports to the correct directory.
1. In the **The name of the test** input, set the name you want to see in the Test Reports add-on. Each exported results file has a separate tab with the name defined here.
2. In the **Test result base path** input, set the path where your test results can be found.
This input determines where Bitrise will look for your test results. We recommend setting a folder here, though you can also set a specific file path.
3. In the **Test result search pattern** input, set a glob pattern that matches a single test result output file.
This search pattern is used to search every file and folder of the provided base path which was set in the **Test result base path** input. If there is more than one match, you will receive a warning and the Step will export the first match.
If you set a specific file path in the previous input, just set `*` here.
4. In the **Step's test result directory** input, make sure the path points to a valid directory.
By default, do NOT modify this input’s value. It should be set to the $BITRISE_TEST_RESULT_DIR Env Var.
5. Make sure you have a Deploy to Bitrise.io Step in your Workflow. This step is responsible for deploying the exported files from the test result directory to the Test Reports add-on.
### Troubleshooting
- You always need a **Deploy to Bitrise.io** Step in your Workflow to export test results to the Test Reports add-on. If you can't see your results in Test Reports, check that you have the Step in your Workflow.
- If more than one file matches the pattern set in the **Test result search pattern** input, you will receive a warning. It should only match a single file in the base path.
- If either the **Test result base path** input or the **Test result search pattern** input isn't set correctly or if either is left empty, the Step will fail.
### Useful links
[Test reports](https://devcenter.bitrise.io/testing/test-reports/)
[Exporting custom tests to test reports](https://devcenter.bitrise.io/testing/exporting-to-test-reports-from-custom-script-steps/)
### Related Steps
[Android Unit Test](https://www.bitrise.io/integrations/steps/android-unit-test)
[Xcode Test for iOS](https://www.bitrise.io/integrations/steps/xcode-test)
website: https://github.com/bitrise-steplib/step-custom-test-results-export
source_code_url: https://github.com/bitrise-steplib/step-custom-test-results-export
support_url: https://github.com/bitrise-steplib/step-custom-test-results-export/issues
type_tags:
- utility
is_requires_admin_user: true
is_always_run: true
is_skippable: false
run_if: ""
toolkit:
go:
package_name: github.com/bitrise-steplib/step-custom-test-results-export
inputs:
- test_name:
opts:
title: The name of the test
summary: Test name displayed on the tab of the Test Reports page.
is_expand: true
is_required: true
value_options: []
- base_path: $BITRISE_SOURCE_DIR
opts:
title: Test result base path
summary: Path where the Step should look for custom test result files
description: |
You can provide a path to a single file or a directory path and filter for files using the **Test result search pattern** input.
This is the base path where the Step will look for your test results. We recommend using a relative path to the results:
`app/build/test-results/testDemoDebugUnitTest/`
or
`./app/build/test-results/testDemoDebugUnitTest/`
is_expand: true
is_required: true
value_options: []
- search_pattern:
opts:
title: Test result search pattern
summary: A glob pattern to match a single test report within the base path.
description: |
This glob should match a single file within the provided base path.
If it matches multiple files, the Step will produce a warning displaying all matches.
The matched file should be in a supported format. If you set a specific file path in the **Test result base path** input, set this value to `*`.
**Examples**:
Matching all files within the base path: `*`
Matching all files within a given directory of the base path: `*/build/test-results/testDemoDebugUnitTest/*`
is_expand: true
is_required: true
value_options: []
- bitrise_test_result_dir: $BITRISE_TEST_RESULT_DIR
opts:
title: Step's test result directory
description: Root directory for all test results created by the Bitrise CLI
is_required: true
- verbose_log: "no"
opts:
category: Debug
title: Enable verbose logging?
description: Enable verbose logging?
is_required: true
value_options:
- "yes"
- "no"