Skip to main content

Cucumber

This command to execute integration test just support for implemented dependency Morpheme Cucumber which this package builds on top of patrol and integration_test to make it easy to integration test with gherkin language. For more info about Morpheme Cucumber you can follow on Documentation.

Installation

Requirement

  1. Install Flutter and another installation e.g Android Studio, Xcode. you can check in this command:

    flutter doctor
  2. After install Flutter then install morpheme_cli with command:

    dart pub global activate morpheme_cli

    now you can run this command to check:

    morpheme_cli doctor

    If this directory is missing from your PATH, locate the file for your platform and add it.

    PlatformCache location
    macOS or LinuxHOME/.pub-cache/bin
    Windows*%LOCALAPPDATA%\Pub\Cache\bin
  3. Install gherkin executable and make sure to export to your PATH from this Gherkin Executable

  4. Install nodejs for generate cucumber json to report html NodeJs

Congratulation now you are ready for Instant Integration Test 🎉🎉🎉

How to Run

First connect your device to your machine or open emulator / simulator

Install dependency with command:

morpheme_cli get

Once your done installation, then run command:

morpheme_cli cucumber

or your need to be specific feature you can do run command:

morpheme_cli cucumber login

or multiple

morpheme_cli cucumber login,register,home

by default run integration_test/cucumber_test.dart by flavor dev. if you want to running flavor stag or prod just add argument --flavor stag or --flavor prod

example run flavor stag

morpheme_cli cucumber --flavor stag

Options

morpheme cucumber [arguments]

To see all available options and flags, run morpheme cucumber --help.

Available Options

  • Custom Morpheme Yaml :
Custom Morpheme YamlDescription
--morpheme-yaml [path_file]This command is used to select yaml config the application in a specific file, by default it will run the morpheme.yaml file.
  • Flavor/Environment :
Flavor/EnvironmentAlternativeDescription
-f dev--flavor devRun project on dev environment (Default)
-f stag--flavor stagRun project on staging environment
-f prod--flavor prodRun project on production environment
  • Generate l10n :
Generate l10nDescription
--[no]l10nGenerate l10n first before running other command. (defaults to on)