ogurets_flutter 1.2.1

ogurets_flutter #

ogurets is a Gherkin + Cucumber implementation in Dart, focused on making your life writing tests as easy as possible, with the minimum of boilerplate fuss. ogurets_flutter is a flutter extension to ogurets which adds support for:

  • Running against an existing running application (as long as you know the observatory port)
  • Starting the application for you and controlling it to ensure it is allowed to Restart and set its state back to the beginning without having to quit and rerun the application
  • Terminating the application (or not) on completion
  • Allowing you to set a default for restarts or no-restarts and use Gherkin tags to control behaviour.

installing #

in your dev_dependencies section in your pubspec.yaml include:

ogurets_flutter: ^1.2.1

or whichever is the higher version you see on this page.

environment variables #

If you wish to control the flutter run via your own command line build, then the important environment variables are the same as ogurets but with the extension of:

  • OGURETS_FLUTTER_FLAVOUR - this passes "--flavor ${OGURETS_FLUTTER_FLAVOUR}" to flutter run. Not the International English spelling.
  • OGURETS_FLUTTER_DEVICE_ID - this passes "-d ${OGURETS_FLUTTER_DEVICE_ID}" to flutter run letting you specify a device to run on.
  • OGURETS_ADDITIONAL_ARGUMENTS - lets you specify any arguments you wish. Arguments in quotes are broken up correctly.

notes #

ogurets flutter cannot be used from the command line tool flutter driver because it needs to know what the observatory port is. If you wish to include it in your test runs, just use Dart itself and run your _test.dart runner, it will start your main app and control it.

If you wish to use the flutter driver command line tool, use ogurets directly and just enable the driver in an instance of your own to make it available to your steps.

The other reason you may not need to use this mechanism is if you want to keep your app running while you are writing your test, in which case start it with flutter run, take note of the Observatory Port and set it in an environment variable: VM_SERVICE_URL. If ogurets_flutter sees that when it starts, it will simply use it, but restart functionality will be turned off. Only use this when testing scenario by scenario and you are writing and changing code and restarting the app yourself or where the state isn't important.

authors #

We also thank Jon Samwell of Flutter Gherkin for his idea (and core code) for managing the run of the the application.

1.2.1 #

Added in support for additional parameters for flutter build runs (flavours, device ids and generic additional parameters).

1.1.2 #

Added in override support for which file to actually run

1.1.1 #

This is the first release of ogurets_flutter. As per documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ogurets_flutter: ^1.2.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ogurets_flutter/ogurets_flutter.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
34
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Aug 18, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-0.23 points)

37 out of 38 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Fix lib/flutter_autorun.dart. (-0.50 points)

Analysis of lib/flutter_autorun.dart reported 1 hint:

line 106 col 24: Avoid using braces in interpolation when not needed.

Fix lib/ogurets_flutter.dart. (-0.50 points)

Analysis of lib/ogurets_flutter.dart reported 1 hint:

line 6 col 8: Unused import: 'dart:math'.

Format lib/flutter_ogurets.dart.

Run flutter format to format lib/flutter_ogurets.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and ogurets_flutter.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
commandline_splitter ^1.5.2 1.5.2
flutter 0.0.0
flutter_driver 0.0.0
logging ^0.11.3+2 0.11.3+2
ogurets ^3.1.1 3.1.5
Transitive dependencies
ansicolor 1.0.2
args 1.5.2
async 2.2.0 2.3.0
boolean_selector 1.0.4 1.0.5
charcode 1.1.2
collection 1.14.11 1.14.12
convert 2.1.1
crypto 2.0.6 2.1.1+1
file 5.0.8 5.0.8+1
flutter_test 0.0.0
fuchsia_remote_debug_protocol 0.0.0
intl 0.15.8
json_rpc_2 2.1.0
matcher 0.12.5
meta 1.1.6 1.1.7
path 1.6.2 1.6.4
pedantic 1.7.0 1.8.0+1
platform 2.2.0 2.2.1
process 3.0.9 3.0.11
pub_semver 1.4.2
quiver 2.0.3 2.0.5
sky_engine 0.0.99
source_span 1.5.5
sprintf 4.0.2
stack_trace 1.9.3
stream_channel 2.0.0
string_scanner 1.0.4 1.0.5
term_glyph 1.1.0
test_api 0.2.5 0.2.6
typed_data 1.1.6
vector_math 2.0.8
vm_service_client 0.2.6+2 0.2.6+3
web_socket_channel 1.0.13 1.0.15