-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathstep.yml
More file actions
96 lines (83 loc) · 4.46 KB
/
Copy pathstep.yml
File metadata and controls
96 lines (83 loc) · 4.46 KB
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
title: Flutter Test
summary: |-
Performs any test in a Flutter project.
description: |-
If you have tests in your repository, and selected `yes` when prompted during app creation, the primary Workflow will include the **Flutter Test** Step by default.
If you add tests to your app later, add the **Flutter Test** Step to your Workflow manually. The Step runs the `flutter test` command with the specified flags. To check the available flags, open a command line interface on your own machine and run `flutter test --help`.
### Configuring the Step
1. Provide your project's root directory in the **Project Location** field.
2. The **Step's test result directory** is the root directory for all test results created by the Bitrise CLI. This input gets filled out automatically.
3. You can append additional flags to the default `flutter test` command in the **Additional parameters** field.
4. Select 'yes' in the **Generate code coverage files** input to get detailed analysis of your code.
### Test output in the build log
On Flutter 3.10 and newer the Step prints the normal, human-readable `flutter test` output to the build log, and you can control its verbosity with a `--reporter` flag (for example `--reporter expanded`) in the **Additional parameters** field. On older Flutter versions the log falls back to the raw machine JSON stream. The machine-readable JSON needed for the JUnit test report and the `BITRISE_FLUTTER_TESTRESULT_PATH` output is collected separately, so it does not affect what you see in the log. Do not pass `--file-reporter` in **Additional parameters** — the Step manages it internally.
### Troubleshooting
Make sure the **Project Location** input of the Flutter Test Step is correct.
The default value is the Environment Variable (Env Var) created for your Flutter project’s location.
### Useful links
- [Getting started with Flutter](https://devcenter.bitrise.io/getting-started/getting-started-with-flutter-apps/)
- [About testing](https://devcenter.bitrise.io/testing/testing-index/)
### Related Steps
- [Flutter Build](https://www.bitrise.io/integrations/steps/flutter-build)
- [Flutter Analyze](https://www.bitrise.io/integrations/steps/flutter-analyze)
website: https://github.com/bitrise-steplib/bitrise-step-flutter-test
source_code_url: https://github.com/bitrise-steplib/bitrise-step-flutter-test
support_url: https://github.com/bitrise-steplib/bitrise-step-flutter-test/issues
type_tags:
- test
project_type_tags:
- flutter
is_requires_admin_user: true
is_always_run: false
is_skippable: false
toolkit:
go:
package_name: github.com/bitrise-steplib/bitrise-step-flutter-test
inputs:
- project_location: $BITRISE_SOURCE_DIR
opts:
title: Project Location
summary: The root dir of your Flutter project.
description: The root dir of your Flutter project.
is_required: true
- 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
is_dont_change_value: true
- generate_code_coverage_files: "no"
opts:
title: Generate code coverage files?
description: |-
In case of `generate_code_coverage_files: "yes"`
`flutter test` gets `--coverage` passed
value_options:
- "yes"
- "no"
is_required: true
- additional_params:
opts:
title: Additional parameters
summary: The flags from this input field are appended to the `flutter test` command.
description: |-
The flags from this input field are appended to the `flutter test` command.
For example, pass `--reporter expanded` to get more detailed, human-readable test output in the build log (Flutter 3.10+). Do not pass `--file-reporter`; the Step sets it up internally.
- tests_path_pattern:
opts:
title: Test files pattern
summary: This pattern is used as the last argument appended to the `flutter test` command.
description: |-
The pattern from this input field is expanded and fed to the `flutter test` command.
Both * and ** glob patterns are supported. For example, `lib/**/*_test.dart`.
outputs:
- BITRISE_FLUTTER_COVERAGE_PATH:
opts:
title: The path of the generated `lcov.info`
description: |-
The path of the generated code coverage `lcov.info` file.
- BITRISE_FLUTTER_TESTRESULT_PATH:
opts:
title: The path of the generated json test report
description: |-
The path of the json file that was generated by the `flutter test` command.