Deployment failures due to insufficient coverage are not visible

Issue #2391 resolved
Jayanth Thathapudi created an issue

I was doing a modified deployment with custom selection. I was able to add the test suits and validate but it shows just failed with any proper error message for failure. To check them, I need to log in to Salesforce and check in the deployment status. Is their a way to check them in IDE itself?

Comments (6)

  1. Scott Wells repo owner

    To be specific, the omission here is when the deployment failure response looks like the following:

    {
      "checkOnly": true,
      "completedDate": 1687982530000,
      "createdBy": "<redacted>",
      "createdByName": "<redacted>",
      "createdDate": 1687982488000,
      "details": {
        "componentSuccesses": [...],
        "runTestResult": {
          "codeCoverage": [...],
          "codeCoverageWarnings": [
            {
              "id": "<redacted>",
              "message": "Test coverage of selected Apex Class is 44.509%, at least 75% test coverage is required",
              "name": "<redacted>"
            },
            {
              "id": "<redacted>",
              "message": "Test coverage of selected Apex Class is 0%, at least 75% test coverage is required",
              "name": "<redacted>"
            }
          ],
          "numFailures": 0,
          "numTestsRun": 6,
          "successes": [...],
          "totalTime": 19562.0
        }
      },
      "done": true,
      "id": "<redacted>",
      "ignoreWarnings": false,
      "lastModifiedDate": 1687982530000,
      "numberComponentErrors": 0,
      "numberComponentsDeployed": 7,
      "numberComponentsTotal": 7,
      "numberTestErrors": 0,
      "numberTestsCompleted": 6,
      "numberTestsTotal": 6,
      "rollbackOnError": true,
      "runTestsEnabled": true,
      "startDate": 1687982488000,
      "status": "FAILED",
      "success": false
    }
    

    Note that the overall deployment and test execution were successful, but the deployment was marked as failed because of the listed codeCoverageWarnings.

  2. Log in to comment