Closed
Description
What happened
- Open file test/widget_test.dart.
- Modify it:
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:web_ui/main.dart';
void main() {
final result = DateTime.parse('2025-02-07T08:35:48.393571Z');
print(result);
// testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// // Build our app and trigger a frame.
// await tester.pumpWidget(const RemoteConfigWebUiApp());
//
// // Verify that our counter starts at 0.
// expect(find.text('0'), findsOneWidget);
// expect(find.text('1'), findsNothing);
//
// // Tap the '+' icon and trigger a frame.
// await tester.tap(find.byIcon(Icons.add));
// await tester.pump();
//
// // Verify that our counter has incremented.
// expect(find.text('0'), findsNothing);
// expect(find.text('1'), findsOneWidget);
// });
}
- Press green arrow near
main
function. - Got exception below.
Version information
IntelliJ IDEA 2024.3.5
• Flutter plugin io.flutter 83.0.4
• Dart plugin 243.26053.17
Flutter 3.29.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision c236373904 (3 weeks ago) • 2025-03-13 16:17:06 -0400
Engine • revision 18b71d647a
Tools • Dart 3.7.2 • DevTools 2.42.3
Exception
null
java.lang.Throwable: [FlutterTestRunner]: Parent node id should be defined: TestStartedEvent{name='', running=true}.
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at com.intellij.execution.testframework.sm.runner.GeneralTestEventsProcessor.logProblem(GeneralTestEventsProcessor.java:376)
at com.intellij.execution.testframework.sm.runner.GeneralTestEventsProcessor.logProblem(GeneralTestEventsProcessor.java:362)
at com.intellij.execution.testframework.sm.runner.GeneralIdBasedToSMTRunnerEventsConvertor.findValidParentNode(GeneralIdBasedToSMTRunnerEventsConvertor.java:197)
at com.intellij.execution.testframework.sm.runner.GeneralIdBasedToSMTRunnerEventsConvertor.createNode(GeneralIdBasedToSMTRunnerEventsConvertor.java:150)
at com.intellij.execution.testframework.sm.runner.GeneralIdBasedToSMTRunnerEventsConvertor.doStartNode(GeneralIdBasedToSMTRunnerEventsConvertor.java:142)
at com.intellij.execution.testframework.sm.runner.GeneralIdBasedToSMTRunnerEventsConvertor.onTestStarted(GeneralIdBasedToSMTRunnerEventsConvertor.java:110)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter.fireOnTestStarted(OutputToGeneralTestEventsConverter.java:142)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter$MyServiceMessageVisitor.visitTestStarted(OutputToGeneralTestEventsConverter.java:427)
at jetbrains.buildServer.messages.serviceMessages.TestStarted.visit(TestStarted.java:62)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter.processServiceMessage(OutputToGeneralTestEventsConverter.java:135)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter.processServiceMessages(OutputToGeneralTestEventsConverter.java:129)
at io.flutter.test.DartTestEventsConverterZ.doProcessServiceMessages(DartTestEventsConverterZ.java:156)
at io.flutter.test.DartTestEventsConverterZ.handleStart(DartTestEventsConverterZ.java:407)
at io.flutter.test.DartTestEventsConverterZ.process(DartTestEventsConverterZ.java:184)
at io.flutter.test.DartTestEventsConverterZ.processEventText(DartTestEventsConverterZ.java:144)
at io.flutter.test.DartTestEventsConverterZ.processServiceMessages(DartTestEventsConverterZ.java:120)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter.processConsistentText(OutputToGeneralTestEventsConverter.java:113)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter$1.onTextAvailable(OutputToGeneralTestEventsConverter.java:70)
at com.intellij.execution.testframework.sm.runner.OutputEventSplitter.onTextAvailableInternal(OutputEventSplitter.kt:81)
at com.intellij.execution.testframework.sm.runner.OutputEventSplitter.onTextAvailable(OutputEventSplitter.kt:76)
at com.intellij.smRunner.OutputEventSplitterBase.flushInternal(OutputEventSplitterBase.kt:162)
at com.intellij.smRunner.OutputEventSplitterBase.flushInternal$default(OutputEventSplitterBase.kt:148)
at com.intellij.smRunner.OutputEventSplitterBase.processInternal(OutputEventSplitterBase.kt:96)
at com.intellij.smRunner.OutputEventSplitterBase.process(OutputEventSplitterBase.kt:77)
at com.intellij.execution.testframework.sm.runner.OutputEventSplitter.process(OutputEventSplitter.kt:61)
at com.intellij.execution.testframework.sm.runner.OutputToGeneralTestEventsConverter.process(OutputToGeneralTestEventsConverter.java:96)
at com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil$2.onTextAvailable(SMTestRunnerConnectionUtil.java:217)
at com.intellij.execution.process.ProcessHandler$2.onTextAvailable(ProcessHandler.java:292)
at com.intellij.execution.process.ProcessHandler.notifyTextAvailable(ProcessHandler.java:223)
at com.intellij.execution.process.ColoredProcessHandler.coloredTextAvailable(ColoredProcessHandler.java:68)
at io.flutter.utils.MostlySilentColoredProcessHandler.coloredTextAvailable(MostlySilentColoredProcessHandler.java:75)
at com.intellij.execution.process.AnsiEscapeDecoder.processTextChunk(AnsiEscapeDecoder.java:107)
at com.intellij.execution.process.AnsiEscapeDecoder.escapeText(AnsiEscapeDecoder.java:69)
at com.intellij.execution.process.ColoredProcessHandler.notifyTextAvailable(ColoredProcessHandler.java:57)
at com.intellij.execution.process.BaseOSProcessHandler$SimpleOutputReader.onTextAvailable(BaseOSProcessHandler.java:133)
at com.intellij.util.io.BaseOutputReader.sendText(BaseOutputReader.java:220)
at com.intellij.util.io.BaseOutputReader.processInput(BaseOutputReader.java:204)
at com.intellij.util.io.BaseOutputReader.readAvailableBlocking(BaseOutputReader.java:151)
at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:72)
at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:153)
at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:218)
at com.intellij.util.io.BaseDataReader.lambda$start$0(BaseDataReader.java:48)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:103)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:103)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:109)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:103)
at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
at java.base/java.lang.Thread.run(Thread.java:1583)