Class: Fastlane::Actions::FlutterTestsAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/flutter_tests/actions/flutter_tests_action.rb

Defined Under Namespace

Classes: Test, TestRunner

Class Method Summary collapse

Class Method Details

.authorsObject



187
188
189
# File 'lib/fastlane/plugin/flutter_tests/actions/flutter_tests_action.rb', line 187

def self.authors
  ["smaso"]
end

.available_optionsObject



200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/fastlane/plugin/flutter_tests/actions/flutter_tests_action.rb', line 200

def self.available_options
  [
    FastlaneCore::ConfigItem.new(
      key: :flutter_command,
      default_value: 'flutter',
      description: 'Specifies the command to use flutter',
      optional: false,
      type: String
    ),
    FastlaneCore::ConfigItem.new(
      key: :print_only_failed,
      default_value: true,
      description: 'Specifies if it should only print the failed and the skipped tests',
      optional: false,
      type: Boolean
    ),
    FastlaneCore::ConfigItem.new(
      key: :print_stats,
      default_value: true,
      description: 'If defined, it will print how many tests were done/skipped/failed',
      optional: false,
      type: Boolean
    ),
  ]
end

.descriptionObject



183
184
185
# File 'lib/fastlane/plugin/flutter_tests/actions/flutter_tests_action.rb', line 183

def self.description
  "Extension that helps to run flutter tests"
end

.detailsObject



195
196
197
198
# File 'lib/fastlane/plugin/flutter_tests/actions/flutter_tests_action.rb', line 195

def self.details
  # Optional:
  "Extension that helps to run both unit tests and integration tests for your flutter application and parses the output given by the default tester and shows in a more readable way"
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


226
227
228
# File 'lib/fastlane/plugin/flutter_tests/actions/flutter_tests_action.rb', line 226

def self.is_supported?(platform)
  true
end

.return_valueObject



191
192
193
# File 'lib/fastlane/plugin/flutter_tests/actions/flutter_tests_action.rb', line 191

def self.return_value
  "Returns 0 or 1 based on the tests output"
end

.run(params) ⇒ Object



179
180
181
# File 'lib/fastlane/plugin/flutter_tests/actions/flutter_tests_action.rb', line 179

def self.run(params)
  TestRunner.new.run(params[:flutter_command], params[:print_only_failed], params[:print_stats])
end