I am having a little practice with scratch orgs and I created two classes which I have correctly pushed to my scratch org with no issues.

One of the two classes is a test class. When I try to run the test by clicking the Run all tests in VScode i get the following error:

Starting SFDX: Run Apex Tests

No AuthInfo found for name newPluralsight

newPluralsight is the scratch org's alias.

I have checked that the classes where pushed correctly to the scratch org in the developer console, and they are there. I am also correctly logged in; when I run the SFDX: Open default Org my scratch org gets opened.

Here's a screenshot of the sfdx force:org:list --all command output:

enter image description here

Everything seems fine to me. What am I missing? Why can't I run test classes?

1 Answer 1


Had the same issue; found wa: changing default org to other, and changing again to the valid

sfdx force:config:set defaultusername=<other_connected_org> sfdx force:config:set defaultusername=<org_where_you_want_to_run_tests>

running the tests after that, did the trick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.