This Skill combines XTS compilation (/oh-xts-build) and running (/oh-xts-run) into a complete workflow.
Workflow
-
Execute compilation: run
/oh-xts-build- Update List.test.ets to register test cases
- Use hvigorw to compile and generate the HAP file
- Check whether the main HAP and test HAP are generated successfully
-
Determine the result:
- If compilation fails → stop the process and return the compilation error
- If compilation succeeds → continue to execute running
-
Execute running: run
/oh-xts-run [参数]- Automatically parse the package name (from pack.info or module.json5)
- Run the test and parse the result statistics
- Summarize results: uniformly display the complete output of compilation and running
Parameters
--package=<package-name>: specify the package name (optional)--api=<api-name>: specify the test class name (optional)
Implementation location
- Compile command:
packages/cli/src/ui/commands/ohXtsBuildCommand.ts - Run command:
packages/cli/src/ui/commands/ohXtsRunCommand.ts - Core module:
packages/cli/src/modules/xts/build-runner.ts