I have a sandbox org (not scratch org).
I authenticated it with alias e-devint
When run RunLocalTests
(hundreds apex test files), it fails quickly with the error below. The error doesn't tell much.
It is the same error without -y
parameter.
How can I troubleshooting?
sfdx force:apex:test:run -y --testlevel RunLocalTests -w 600 -r human -u e-devint
ERROR running force:apex:test:run: Unable to invoke async test job: An unknown exception occurred.
Try this:
Try running the tests in the Developer Console by using force:org:open, or create a new scratch org and try again.
When running only one or several tests, the result returns well, like below:
sfdx force:apex:test:run -y -n SwagOfferPropertyTest -w 600 -r human -u e-devint
=== Test Results
TEST NAME OUTCOME MESSAGE RUNTIME (MS)
──────────────────────────────────────────────────── ─────── ─────── ────────────
SwagOfferPropertyTest.test1 Pass 408
SwagOfferPropertyTest.test2 Pass 379