Apex Test Runner ignores .forceignore (i.e. tries to run non-existent tests) #6269
Closed
brianmfear
started this conversation in
Ideas
Replies: 1 comment
|
we resolved this a different way: you can only run tests that are in the org, so only those show up in the test panel |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
VS Code's Apex Test Runner does not appear to support .forceignore. This makes it impossible to run all tests if you have test classes that you've ignored. I specifically came across this problem while trying to create a repo where some of the work is pulled from a separate repo as a submodule; I cannot remove those .forceignore files from the source path without affecting other work in progress.
Steps To Reproduce:
**/archived/**to the.forceignorefile.force-app/main/default/classes,activeandarchived.archivedis ignored.Expected result
All non-ignored files should have their unit tests run. Alternatively, Apex Test Runner should just use the RunLocalTests command instead of RunSpecifiedTests.
Actual result
Error in output console: "This class name's value is invalid: XYZ. Provide the name of an Apex class that has test methods."
Additional information
Salesforce Extension Version in VS Code:
Name: Salesforce Extension Pack
Id: salesforce.salesforcedx-vscode
Description: Extensions for developing on the Salesforce Platform
Version: 53.13.0
Publisher: Salesforce
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=salesforce.salesforcedx-vscode
SFDX CLI Version:
sfdx-cli/7.120.0 win32-x86 node-v14.17.0
OS and version:
Microsoft Windows [Version 10.0.22000.434]
All reactions