Я написал контрольные примеры BDD в своем приложении. Я получаю «Исключение: неизвестный исполняемый дочерний объект передан FeatureFile« CommentLineRunnable »», когда я запускаю dart test_driver / test_config.dart в терминале проекта.
Мой файл test_config.dart:
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);
}
Я получаю сообщение об ошибке:
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)