appcenter-cli
Version:
Command line tool for Visual Studio App Center
40 lines (32 loc) • 1.15 kB
text/typescript
import { CommandArgs, help, longName, hasArg } from "../../../util/commandline";
import { RunTestsCommand } from "../lib/run-tests-command";
import { EspressoPreparer } from "../lib/espresso-preparer";
import { Messages } from "../lib/help-messages";
(Messages.TestCloud.Commands.RunEspresso)
export default class RunEspressoTestsCommand extends RunTestsCommand {
(Messages.TestCloud.Arguments.EspressoBuildDir)
("build-dir")
buildDir: string;
(Messages.TestCloud.Arguments.EspressoTestApkPath)
("test-apk-path")
testApkPath: string;
(Messages.TestCloud.Arguments.NotSupported + " for Espresso")
("include")
include: string[];
constructor(args: CommandArgs) {
super(args);
}
protected prepareManifest(artifactsDir: string): Promise<string> {
if (!this.appPath) {
throw new Error("Argument --app-path is required");
}
const preparer = new EspressoPreparer(artifactsDir, this.buildDir, this.testApkPath, this.include);
return preparer.prepare();
}
protected getSourceRootDir() {
return this.buildDir;
}
}