目录

CLI Test Error Codes

00507001 Path Does Not Exist

Error Message

The path XXX does not exist. Check whether the hap/hsp package is signed.

Symptom

The path does not exist.

Possible Causes

The corresponding HAP or HSP package is not signed.

Solution

Check whether the HAP/HSP package is signed. If not, configure a debug signature.

00507002 Invalid Value of scope

Error Message

scope=XXX is invalid. Enter a value that contains only digits, letters, underscores (_), and periods (.). Use commas (,) to separate multiple test suites or test cases.

Symptom

The value of scope in the command is invalid. Enter a value containing only digits, letters, underscores (_), or periods (.), and use commas (,) to separate multiple test suites or test cases.

Possible Causes

The value of scope in the command is invalid.

Solution

Set scope to a value containing only digits, letters, underscores (_), or periods (.), and use commas (,) to separate multiple test suites or test cases.

00507003 No Test Results Due to Failure to Unlock the Screen

Error Message

No test results because unlock screen failed in developer mode.

Symptom

No test results are generated due to the failure to unlock the screen.

Possible Causes

The device screen is locked with a password, and the attempt to unlock the screen failed.

Solution

Unlock the screen and run the test again.

00507004 coverageFile Contains Paths Pointing to Files That Do Not Exist

Error Message

coverageFile contains a file that does not exist.

Symptom

The coverageFile parameter contains paths pointing to files that do not exist.

Possible Causes

The files pointed to by the paths in the coverageFile parameter do not exist.

Solution

Ensure that the path specified in the parameter exists.

00507005 Project Path Does Not Exist

Error Message

projectPath does not exist.

Symptom

The project path does not exist.

Possible Causes

The path specified in the projectPath parameter does not exist during the execution of the hvigorw command.

Solution

Ensure that the path specified in the parameter exists.

00507006 Report Path Does Not Exist

Error Message

reportPath does not exist.

Symptom

The report path does not exist.

Possible Causes

The path specified in the reportPath parameter does not exist during the execution of the hvigorw command.

Solution

Ensure that the path specified in the parameter exists.

00507007 Path Specified in coverageFile Does Not Exist

Error Message

coverageFile does not exist.

Symptom

The path specified in coverageFile does not exist.

Possible Causes

The path specified in the coverageFile parameter does not exist during the execution of the hvigorw command.

Solution

Ensure that the path specified in the parameter exists.

00507008 Failed to Obtain the Initial Coverage Data

Error Message

getInitCoverageData failed.

Symptom

Failed to obtain the initial coverage data.

Possible Causes

The init_coverage.json file contains incorrect content.

Solution

Choose Build > Clean Project on the menu bar to clear the cache and run the test again.

00507009 Failed to Obtain the JS Coverage Data

Error Message

getjsCoverageData failed.

Symptom

Failed to obtain the JS coverage data.

Possible Causes

The js_coverage.json file contains incorrect content.

Solution

Choose Build > Clean Project on the menu bar to clear the cache and run the test again.

00507010 Failed to Merge the Coverage Data

Error Message

merge coverageJson failed.

Symptom

Failed to merge the coverage data.

Possible Causes

The changes introduced in DevEco Studio 5.0.2 modified the coverage data structure, so coverage data collected before and after this version cannot be merged.

Solution

Use the coverage data generated by the same version of DevEco Studio for merging.

00507011 Same Path Specified in include and exclude

Error Message

The same path defined in include and exclude list in coverage-filter.json5.

Symptom

The same path is specified in both the include and exclude parameters in the coverage-filter.json5 file.

Possible Causes

The same path is specified in both the include and exclude parameters.

Solution

Ensure that different paths are specified for include and exclude.

00507012 Failed to Generate the Coverage Report

Error Message

report failed, error: XXX.

Symptom

Failed to generate the coverage report.

Possible Causes

An exception occurs when the contents of the folder pointed to by reportPath are cleared during report generation.

Solution

Modify reportPath or manually clear the folder pointed to by reportPath.

00507013 Failed to Connect to the Device

Error Message

[Fail]ExecuteCommand need connect-key? please confirm a device by help info.

Symptom

The device connection failed. Follow the prompts to establish a connection.

Possible Causes

  1. No device is connected, or USB debugging is not enabled in Developer options.
  2. Multiple devices are connected when you run tests via the CLI.

Solution

  1. Connect to the device by referring to Running Your App on a Local Real Device and enable USB debugging in Developer options.
  2. Remove any extra connected devices to ensure only one device is connected.

00507014 Path Does Not Exist

Error Message

XXX does not exist. Please clean the project and run again.

Symptom

The path does not exist.

Possible Causes

  1. The file in the .test directory cannot be found.
  2. The build directory exists, while the .test directory is missing.

Solution

Choose Build > Clean Project on the menu bar to clear the cache and try again.

00507015 Runtime Error

Error Message

A runtime error occurs. The specific error message depends on the situation.

Symptom

A runtime error occurs.

Possible Causes

Unknown.

Solution

Troubleshoot based on the specific error message.

00507016 C/C++ Methods Not Supported in Local Tests

Error Message

Testing on C/C++ methods not supported.

Symptom

C/C++ methods are not supported in local tests.

Possible Causes

C/C++ methods are not supported in local tests.

Solution

Use instrument tests to test C/C++ methods.

00507017 Duplicate includeHar Entries

Error Message

The same path defined in includeHar list in coverage-filter.json5.

Symptom

Duplicate paths are configured for the includeHar field in coverage-filter.json5.

Possible Causes

Duplicate paths are configured for the includeHar field in coverage-filter.json5.

Solution

Delete duplicate paths to ensure that all paths are unique.

00507018 Duplicate extraAbilities Entries

Error Message

The same path defined in extraAbilities list in coverage-filter.json5.

Symptom

Duplicate paths are configured for the extraAbilities field in coverage-filter.json5.

Possible Causes

Duplicate paths are configured for the extraAbilities field in coverage-filter.json5.

Solution

Delete duplicate paths to ensure that all paths are unique.

00507019 Duplicate Entries in includeHar and include

Error Message

The same path defined in includeHar and include list in coverage-filter.json5.

Symptom

Duplicate paths are configured for the includeHar and include fields in coverage-filter.json5.

Possible Causes

Duplicate paths are configured for the includeHar and include fields in coverage-filter.json5.

Solution

Delete duplicate paths to ensure that all paths are unique.

00507020 Duplicate Entries in includeHar and exclude

Error Message

The same path defined in includeHar and exclude list in coverage-filter.json5.

Symptom

Duplicate paths are configured for the includeHar and exclude fields in coverage-filter.json5.

Possible Causes

Duplicate paths are configured for the includeHar and exclude fields in coverage-filter.json5.

Solution

Delete duplicate paths to ensure that all paths are unique.