> For the complete documentation index, see [llms.txt](https://knowledgebase.autorabit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.autorabit.com/product-guides/codescan/report-and-analysis/importing-salesforce-cli-code-coverage.md).

# Importing Salesforce CLI Code Coverage

CodeScan can take JSON coverage files generated by the Salesforce CLI and apply the coverage in your analysis.

If you are using the Salesforce CLI to run the analysis, [see our guide here](/product-guides/codescan/codescan-integration/codescan-sfdx-plugin/importing-code-coverage-from-sfdx-projects.md).&#x20;

If you have a Git project created in CodeScan Cloud:

* Open your project and navigate to **Project Settings > General Settings** at the top right of the screen
* Click the **CodeScan** tab on the right
* Scroll down to the **Testing** section
* Add the JSON code coverage file name and re-run the analysis

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FVgLqIDIRHIBHdDof4Nmj%2Fimage.png?alt=media&amp;token=30706340-b9a3-4fa8-a77c-0e342d148af4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
When you are generating your coverage file with the Salesforce CLI, the JSON file name will be generated dynamically.  Rename this file after it is created to make sure it can be referenced consistently.
{% endhint %}

After the analysis completes you will be able to view the coverage percentage on your project overview.

<figure><img src="https://1912836914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9vAxMuDrkUkB4OXlH9CL%2Fuploads%2FmyyM2Cu7SSoZPq8bn7wg%2Fimage.png?alt=media&amp;token=796115a7-ef35-451e-8293-4e02893929cc" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://knowledgebase.autorabit.com/product-guides/codescan/report-and-analysis/importing-salesforce-cli-code-coverage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
