SF project validate should allow NoTestRun flag #2688
Replies: 2 comments 2 replies
-
@amarek-cytiva - I raised a similar issue a while ago. Please see @mshanemc 's response here - #2470 (comment)
|
Beta Was this translation helpful? Give feedback.
-
Hello @mdonnalley is there an update on this? I think it would make sense to be able to validate deployments that don't need to execute any test classes using Why do we have to use have Thanks Note: I tagged @mdonnalley as I saw you answered in this thread :) |
Beta Was this translation helpful? Give feedback.
-
This discussion is about the possibility of setting the NoTestRun flag during validation if the package does not contain any apex class, triggers, or flows.
Previous commands:
sfdx force:source:deploy
allows us to validate the code with the mentioned flag set to NoTestRun for any development environment as well as for Production.
Currently for
sf project deploy validate
the default value is RunLocalTests. We should have the flexibility to decide whether we want to run the unit tests or not during code validation the same way as it was before for sfdx commands.The workaround for this would be to always run 1 unit test during validation which feels like going back to ant deployments where it was working that way.
Now after the changes, we are forced to run unit tests even on the components that have nothing to do with apex classes like when adding new fields, etc.
Previously setting NoTestRun on the development environment did not execute any unit tests and removing the --test-level flag during validation on Production also did not execute the unit tests execution as long as the package did not contain Apex Class, Apex Trigger, or Flow.
I just found where this issue was described, for the mdapi commands but it was also applied for the source command as well
#1542
To be honest this is a showstopper for using the new version of CLI as we are lacking of the functionality we had before.
Beta Was this translation helpful? Give feedback.
All reactions