Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow launch configs to be used as templates for running tests #1916

Merged
merged 4 commits into from
Aug 20, 2019

Conversation

DanTup
Copy link
Member

@DanTup DanTup commented Aug 6, 2019

Fixes #1901.

  • Requires tests!

This allows you to mark launch configs as templates for tests:

"configurations": [
	{
		"name": "Dart",
		"program": "bin/main.dart",
		"request": "launch",
		"type": "dart",
	},
	{
		"name": "Run in Browser",
		"request": "launch",
		"type": "dart",
		"template": "run-test",
		"env": {
			"MY_VAR": "Yay!"
		}
	},
	{
		"name": "Debug in Browser",
		"request": "launch",
		"type": "dart",
		"template": "debug-test",
		"env": {
			"MY_VAR": "Yay!"
		}
	}
]

Then they'll show up as code-lens links:

Screenshot 2019-08-06 at 5 23 29 pm

(Note: the names here are just examples - this doesn't do anything with testing on browsers - it's up to a user to pass through some arguments or environment variables in the config and then handle them as required in their tests).

@DanTup DanTup added is enhancement in testing Relates to test execution of Dart/Flutter tests for end users labels Aug 6, 2019
@DanTup DanTup added this to the v3.4.0 milestone Aug 6, 2019
@DanTup DanTup merged commit 1d8d3df into master Aug 20, 2019
@DanTup DanTup deleted the custom-test-codelens branch August 20, 2019 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in testing Relates to test execution of Dart/Flutter tests for end users is enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug configurations for tests
1 participant