Skip to content

Commit f606104

Browse files
committed
fix: call testService method to store testRunId
1 parent 6f9d122 commit f606104

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/commands/apex/run/test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ export default class Test extends SfCommand<RunCommandResult> {
160160
// Log the proper 'apex get test' command for the user to run later
161161
this.log(messages.getMessage('runTestReportCommand', [this.config.bin, result.testRunId, conn.getUsername()]));
162162
this.info(messages.getMessage('runTestSyncInstructions'));
163+
164+
if (flags['output-dir']) {
165+
// testService writes a file with just the test run id in it to test-run-id.txt
166+
// github.com/forcedotcom/salesforcedx-apex/blob/c986abfabee3edf12f396f1d2e43720988fa3911/src/tests/testService.ts#L245-L246
167+
await testService.writeResultFiles(result, { dirPath: flags['output-dir'] }, flags['code-coverage']);
168+
}
169+
163170
return result;
164171
}
165172
}

0 commit comments

Comments
 (0)