Skip to content

Test failures in tearDownAll are attributed to the correct line but wrong file #4681

@DanTup

Description

@DanTup

Moved from flutter/flutter#131681. I thought this was just a request for dart-lang/test#1851, however looking at the JSON we do get the location of the tearDownAll method, but we seem to record the line/col from that event in the file.

Here, "Go to Test" on "(tearDownAll)" is navigating to line 33 of the left file, instead of the right one. The test I ran was on line 26 of the left file.

image

The test event looks like:

 {
	"test": {
		"id": 5,
		"name": "(tearDownAll)",
		"suiteID": 0,
		"groupIDs": [
			2
		],
		"metadata": {
			"skip": false,
			"skipReason": null
		},
///////////////////////////////////////// 👇 This info looks correct 
		"line": 33,
		"column": 3,
		"url": "file:///C:/Dev/Google/leak_tracker/pkgs/leak_tracker_flutter_test/test/tests/end_to_end/leak_tracking_config_test/flutter_test_config.dart"
	},
	"type": "testStart",
	"time": 1072
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    in testingRelates to test execution of Dart/Flutter tests for end usersis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions