forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
953 stars 406 forks source link

The test class runs very slowly #5559

Closed zt15242 closed 4 months ago

zt15242 commented 5 months ago

Recently, we found that the test class is running very slowly and even fails to compile. Has anyone encountered the same situation? Please guide us on how to solve it. image

daphne-sfdc commented 5 months ago

@zt15242 Can you let us know the following info?

Salesforce Extension Version in VS Code: Salesforce CLI Version: OS and version: VS Code version:

Are these Apex test classes ones that you have seen compile and run quickly in the past, or are these new tests?

What kind of org are you using? Production, sandbox, scratch org, or Trailhead Playground?

You mentioned that the Apex test classes fail to compile - what are the compilation error messages? Check the following places:

  1. Output tab with dropdown Apex
  2. Problems tab
  3. Run Developer: Toggle Developer Tools from the command palette

Regarding the slow-running Apex tests - go to Setup -> Apex Test Execution. On that page, click Options. In the popup, is the box for Disable Parallel Apex Testing checked or unchecked? Screenshot 2024-04-29 at 11 44 49 AM

zt15242 commented 5 months ago

@daphne-sfdc Salesforce Extension Version in VS Code: 60.10.0 Salesforce CLI Version: 60.10.0 OS and version:Windows10 VS Code version:1.88.0(system setup)

I checked the system and found that disabling parallel vertex testing is checked

mingxuanzhangsfdx commented 5 months ago

Hi @zt15242 -

Where do you run the apex tests from? Developer console or the VS Code extensions?

Also please let us know what the exact compilation errors are.

zt15242 commented 5 months ago

Hi @mingxuanzhangsfdx We can reproduce this issue when running test classes in the developer console or VS code extension. At present, it only operates slowly with a long cycle.

peternhale commented 5 months ago

@zt15242 Given you are seeing the slow runs in both dev console and vscode, I would suggest contacting Salesforce Support as this appears to be a server side issue.

github-actions[bot] commented 4 months ago

This issue has not received a response in 3 days. It will auto-close in 2 days unless a response is posted.