I deployed source to a scratch org, then ran some unit tests locally in the org.

Now when I do sfdx force:source:pull I get:

ERROR running force:source:pull: Can't retrieve non-customizable CustomObject named: ApexTestResult.

Running sfdx force:source:status gives:

Remote Add ApexTestResult CustomObject

Is there any way to get the pull to ignore this type? I tried everything I could think of with .forceignore but nothing works.

Does this mean it is basically not supported to run unit tests locally in Scratch orgs?

EDIT: I suspect this may be related to the fact that I created a list view for the Apex Test Results in the scratch org. Haven't verified that yet -- I will create a new scratch org to check.


1 Answer 1


Looking at the documentation, it appears that ListView is currently not a supported Metadata API Type (for first-generation packages). See here: Supported Metadata API Types

It is however supported by second-generation packages, which is currently in BETA. See here: Supported Component Types (Beta)

In the meantime, you can try one of two things:

  1. Exclude the List View from your source. (see instructions here: How to Exclude Source When Syncing or Converting
  2. If you don't need the List View, simply delete it from your Scratch Org.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .