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 unpackaged Apex tests execution after unit tests execution should fail when the code coverage is less than 75% #5547

Closed kamilkhalid123 closed 5 months ago

kamilkhalid123 commented 5 months ago

Summary

I am using sfdx apex:test:run -y -r human -w 160 -c command for running apex tests, My code coverage falls below 70 and the test run step passes. I want it to fail when the test coverage falls below 75%. Can someone help in this?

Steps To Reproduce:

  1. Perform Code commit
  2. Unit tests trigger
  3. Check the unpackaged Apex tests execution step in the unit test step results

Expected result

The step: unpackaged Apex tests execution after unit tests execution should fail when the coverage is less than 75%

Actual result

The coverage is 73% and the step is passing.

The command for this in config.yaml is sfdx apex:test:run -y -r human -w 160 -c

Additional information

Feel free to attach a screenshot.

Salesforce Extension Version in VS Code:

SFDX CLI Version:

OS and version:

VS Code version:

peternhale commented 5 months ago

@kamilkhalid123 thank you, but we will also need the following Additional information Feel free to attach a screenshot.

Salesforce Extension Version in VS Code:

SFDX CLI Version:

OS and version:

VS Code version:

CristiCanizales commented 5 months ago

Hi @kamilkhalid123, again, we need all the details asked in the template to be able to contextualize your issue. Please provide the following:

github-actions[bot] commented 5 months ago

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