Unexpected change of behavior for sfdx force:apex:test:run --synchronous
See original GitHub issuesfdx force:apex:test:run --synchronous behaviour
There is an unexpected change of the behaviour of sfdx force:apex:test:run --synchronous
, because now returns a new message “Specify a test class or test methods when running tests synchronously”.
Steps To Reproduce:
$ sfdx --version
sfdx-cli/7.96.0 linux-x64 node-v15.14.0
$ sfdx force:apex:test:run -l RunLocalTests -y -c -r human
ERROR running force:apex:test:run: Specify a test class or test methods when running tests synchronously
Expected result
For us to run all tests synchronously is important for our continuous integration jobs.
Additional information
SFDX CLI Version(to find the version of the CLI engine run sfdx --version): sfdx-cli/7.96.0
SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)
@oclif/plugin-autocomplete 0.3.0 (core) @oclif/plugin-commands 1.3.0 (core) @oclif/plugin-help 3.2.2 (core) @oclif/plugin-not-found 1.2.4 (core) @oclif/plugin-plugins 1.10.0 (core) @oclif/plugin-update 1.4.0-3 (core) @oclif/plugin-warn-if-update-available 1.7.0 (core) @oclif/plugin-which 1.0.3 (core) @salesforce/sfdx-trust 3.6.0 (core) alias 1.1.9 (core) auth 1.5.1 (core) config 1.2.8 (core) generator 1.1.5 (core) salesforcedx 51.7.1 (core) ├─ data 0.4.3 (core) ├─ apex 0.1.21 (core) ├─ custom-metadata 1.0.11 (core) ├─ limits 1.0.5 (core) ├─ org 1.6.1 (core) ├─ schema 1.0.5 (core) ├─ templates 51.3.0 (core) ├─ user 1.2.8 (core) ├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core) └─ salesforce-alm 51.6.10 (core) sfdx-cli 7.96.0 (core) telemetry 1.1.1 (core)
OS and version: docker alpine: Linux cc246b97cbac 4.19.121-linuxkit forcedotcom/cli#1 SMP Thu Jan 21 15:36:34 UTC 2021 x86_64 Linux
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top GitHub Comments
Hi @froucher - We will be restoring the prior behavior in the CLI for the near-term. As @AnanyaJha pointed out, the synchronous flag only supports running tests from a single class so the synchronous behavior you’ve been working with might not have been quite what you expected. We will put the CLI behavior back as it was for now and come back to fix this bug at a later date. (When we do that fix, we will add a warning on the command months in advance so you can adjust to the new behavior)
@froucher Are you able to run synchronous tests. Did you find any workaround?