vendredi 8 novembre 2019

Exception: Unknown runnable child given to FeatureFile 'CommentLineRunnable'

I have written BDD test cases in my flutter app. I'm getting "Exception: Unknown runnable child given to FeatureFile 'CommentLineRunnable'" while I run dart test_driver/test_config.dart in the project terminal.

My test_config.dart file:

import 'dart:async';
import 'package:glob/glob.dart';
import 'package:gherkin/gherkin.dart';
import 'package:flutter_gherkin/flutter_gherkin.dart';
import './steps/loginPage_test.dart';



Future<void> main() {
  final config = FlutterTestConfiguration()
    ..features = [Glob(r"test_driver/features/**.feature")]
    ..stepDefinitions = [
      LoginPageValidation(),
      PasswordValidation(),
      LoginButton(),
      NavValidation()
    ]
    ..reporters = [ProgressReporter(), TestRunSummaryReporter(), JsonReporter()]
    ..restartAppBetweenScenarios = true
    ..targetAppPath = "test_driver/app.dart"
    ..exitAfterTestRun = true;
  return GherkinRunner().execute(config);
}

The error message I'm getting is:

Unhandled exception:
Exception: Unknown runnable child given to FeatureFile 'CommentLineRunnable'
#0      FeatureFile.addChild (package:gherkin/src/gherkin/runnables/feature_file.dart:41:9)
#1      GherkinParser._parseBlock (package:gherkin/src/gherkin/parser.dart:119:21)
#2      GherkinParser.parseFeatureFile (package:gherkin/src/gherkin/parser.dart:55:7)
<asynchronous suspension>
#3      GherkinRunner.execute (package:gherkin/src/test_runner.dart:47:43)
<asynchronous suspension>
#4      main (file:///home/al029/Altorum_Projects/altorum-operation-flutter/test_driver/test_config.dart:22:26)
#5      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:19)
#6      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)

Aucun commentaire:

Enregistrer un commentaire