Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion messages/deploy.metadata.validate.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Valid values are:

- RunSpecifiedTests — Runs only the tests that you specify with the --tests flag. Code coverage requirements differ from the default coverage requirements when using this test level. Executed tests must comprise a minimum of 75% code coverage for each class and trigger in the deployment package. This coverage is computed for each class and trigger individually and is different than the overall coverage percentage.

- RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked packages. This test level is the default.
- RunLocalTests — All tests in your org are run, except the ones that originate from installed managed and unlocked packages. This test level is the default, unless you specify --tests, in which case the default is RunSpecifiedTests.

- RunAllTestsInOrg — All tests in your org are run, including tests of managed packages.

Expand Down
3 changes: 2 additions & 1 deletion src/commands/project/deploy/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ export default class DeployMetadataValidate extends SfCommand<DeployResultJson>
TestLevel.RunSpecifiedTests,
TestLevel.RunRelevantTests,
],
default: TestLevel.RunLocalTests,
default: async (context) =>
Promise.resolve(context.flags.tests ? TestLevel.RunSpecifiedTests : TestLevel.RunLocalTests),
description: messages.getMessage('flags.test-level.description'),
summary: messages.getMessage('flags.test-level.summary'),
helpGroup: testFlags,
Expand Down