runApexTestsWithResults
runApexTestsWithResults(
options):Promise<RunApexTestsWithResultsResult>
Defined in: packages/simply-apex-core/src/apexTestRun.ts:198
Runs Apex tests asynchronously and writes the same result files
sf apex test run --result-format junit --output-dir <dir> [--code-coverage] writes:
test-run-id.txt, test-result-<id>.json, test-result-<id>-junit.xml, test-result.xml, and
with coverage, test-result-<id>-codecoverage.json and test-result-codecoverage.json.
Failing tests are not an error: check outcome. A run still going when wait runs out returns
completed: false (only test-run-id.txt is written), as the CLI does.
Parameters
Section titled “Parameters”options
Section titled “options”RunApexTestsWithResultsOptions
Returns
Section titled “Returns”Promise<RunApexTestsWithResultsResult>
Throws
Section titled “Throws”If the run can’t be started or polled (bad suite name, auth failure, …).