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

sf apex run test always run synchronously #2034

Closed
RenaudAM opened this issue Apr 3, 2023 · 3 comments
Closed

sf apex run test always run synchronously #2034

RenaudAM opened this issue Apr 3, 2023 · 3 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@RenaudAM
Copy link

RenaudAM commented Apr 3, 2023

Summary

When we run the test with sf apex run test or sfdx force:apex:test:run it always run synchronously. In previous version, tests were launch and we receive an ID to retrieve the result of the test later with sf apex get test -i ID or sfdx force:apex:test:report -i ID, now we have to wait the end of the tests.

Steps To Reproduce:

Repository to reproduce: Any

NOTE: If your issue is not reproducable by dreamhouse-lwc, i.e. requires specific metadata or files, we require a link to a simple Salesforce project repository with a script to setup a scratch org that reproduces your problem.

  1. Run the command sf apex run test

Expected result

Tests should run asynchronously.

Actual result

Tests run synchronously

System Information

  • git bash

  • If you are using sfdx

$ sfdx version --verbose --json
{
"cliVersion": "sfdx-cli/7.194.1",
"architecture": "win32-x64",
"nodeVersion": "node-v18.15.0",
"osVersion": "Windows_NT 10.0.19042",
"shell": "C:\Program Files\Git\usr\bin\bash.exe",
"rootPath": "C:\Users\A0468184\AppData\Local\sfdx\client\7.194.1-faa045e",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.1.6 (core)",
"@oclif/plugin-commands 2.2.11 (core)",
"@oclif/plugin-help 5.2.8 (core)",
"@oclif/plugin-not-found 2.3.22 (core)",
"@oclif/plugin-plugins 2.4.3 (core)",
"@oclif/plugin-search 0.0.14 (core)",
"@oclif/plugin-update 3.1.8 (core)",
"@oclif/plugin-version 1.3.1 (core)",
"@oclif/plugin-warn-if-update-available 2.0.32 (core)",
"@oclif/plugin-which 2.2.17 (core)",
"apex 2.2.7 (core)",
"auth 2.7.10 (core)",
"community 2.2.8 (core)",
"custom-metadata 2.1.9 (core)",
"data 2.3.8 (core)",
"info 2.6.2 (core)",
"limits 2.3.9 (core)",
"org 2.6.2 (core)",
"packaging 1.16.2 (core)",
"schema 2.3.4 (core)",
"settings 1.4.2 (core)",
"signups 1.4.8 (core)",
"source 2.8.0 (core)",
"telemetry 2.1.3 (core)",
"templates 55.4.4 (core)",
"trust 2.4.5 (core)",
"user 2.3.5 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
"sfdx-cli 7.194.1 (core)"
]
}

  • If you are using sf

$ sf version --verbose --json
{
"cliVersion": "@salesforce/cli/1.71.0",
"architecture": "win32-x64",
"nodeVersion": "node-v18.15.0",
"osVersion": "Windows_NT 10.0.19042",
"shell": "C:\Program Files\Git\usr\bin\bash.exe",
"rootPath": "C:\Users\A0468184\AppData\Local\sfdx\client\7.194.1-faa045e\sf",
"pluginVersions": [
"@oclif/plugin-autocomplete 2.1.6 (core)",
"@oclif/plugin-commands 2.2.11 (core)",
"@oclif/plugin-help 5.2.8 (core)",
"@oclif/plugin-not-found 2.3.22 (core)",
"@oclif/plugin-plugins 2.4.3 (core)",
"@oclif/plugin-search 0.0.14 (core)",
"@oclif/plugin-update 3.1.8 (core)",
"@oclif/plugin-version 1.3.1 (core)",
"@oclif/plugin-warn-if-update-available 2.0.32 (core)",
"@oclif/plugin-which 2.2.17 (core)",
"@salesforce/cli 1.71.0 (core)",
"apex 2.2.7 (core)",
"auth 2.7.10 (core)",
"data 2.3.8 (core)",
"deploy-retrieve 1.8.5 (core)",
"env 2.1.3 (core)",
"info 2.6.2 (core)",
"limits 2.3.9 (core)",
"login 1.2.4 (core)",
"org 2.6.2 (core)",
"schema 2.3.4 (core)",
"settings 1.4.2 (core)",
"sobject 0.1.9 (core)",
"telemetry 2.1.3 (core)",
"templates 55.4.4 (core)",
"trust 2.4.5 (core)",
"user 2.3.5 (core)"
]
}

Additional information

This is my first issue on Git Hub, sorry if I miss something :)

@RenaudAM RenaudAM added the investigating We're actively investigating this issue label Apr 3, 2023
@github-actions
Copy link

github-actions bot commented Apr 3, 2023

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@WillieRuemmele WillieRuemmele added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Apr 5, 2023
@git2gus
Copy link

git2gus bot commented Apr 5, 2023

This issue has been linked to a new work item: W-12976797

@WillieRuemmele
Copy link
Member

I confirmed that sf apex run test will run the tests synchronously regardless of the --synchronous flag being present. It should be defaulting to async test runs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants