目录

Instrument Test Error Codes

00501001 Variables Included in the Test Suite Name

Error Message

XXX is a Variable. Please use string as a describe name.

Symptom

The test suite name contains a variable.

Possible Causes

The test suite name contains a variable.

Solution

Use a string as the test suite name.

00501002 Invalid Characters Included in the Test Case Name

Error Message

XXX is an invalid it value. Enter a value that contains only digits, letters, underscores (_), and periods (.) or run from a higher level portal.

Symptom

The test case name contains invalid characters. The name must contain only digits, letters, underscores (_), or periods (.), or the test must be run from a higher-level entry point.

Possible Causes

The test case name contains invalid characters.

Solution

00501003 Duplicate Test Case Name

Error Message

Testing failed due to the duplicate test case name XXX. The test case name must be unique in a test suite.

Symptom

The test case name is duplicated. Test case names must be unique within a test suite.

Possible Causes

Test cases with the same name exist within a test suite.

Solution

Ensure that test case names are unique within the test suite.

00501004 Duplicate Test Suite Name

Error Message

Testing failed due to the duplicate test suite name XXX. The test suite name must be unique in a test package.

Symptom

The test suite name is duplicated. Test suite names must be unique within a test directory.

Possible Causes

Duplicate test suite names exist within the test directory.

Solution

Ensure that test suite names are unique within the test directory.

00501005 Variables Included in the Test Case Name

Error Message

XXX is a Variable. Please use string as an It-name or execute from the higher running entrance.

Symptom

The test case name contains a variable. Use a string as the test case name, or run the test from a higher-level entry point.

Possible Causes

The test case name contains a variable.

Solution

00501006 Variables Included in the Test Case Name

Error Message

XXX is a Variable. Please use string as an It-name.

Symptom

The test case name contains a variable. Use a string as the test case name.

Possible Causes

The test case name contains a variable.

Solution

00501007 Invalid Test Suite Name

Error Message

XXX is an invalid describe value. The value entered must contain only digits, letters, underscores (_), and periods (.) and can only start with a letter.

Symptom

The test suite name is invalid. The name must contain only digits, letters, underscores (_), or periods (.), and must start with a letter.

Possible Causes

The test suite name is invalid.

Solution

Ensure that the test suite name contains only digits, letters, underscores (_), or periods (.), and starts with a letter.

00502001 Corresponding Test Case Not Found in the Test File

Error Message

Current test case XXX not found in the test file.

Symptom

The corresponding test case cannot be found in the test file.

Possible Causes

The corresponding test case cannot be found in the test file.

Solution

00502002 No Test Case Found

No Any Test Case Found In The XXX.

Symptom

No test case can be found in the specified target.

Possible Causes

No test case is defined in the test file.

Solution

Ensure that at least one test case exists in the test file.

00502003 Test File Does Not Exist

Error Message

File does not exist: XXX.

Symptom

The test file does not exist.

Possible Causes

The test file may have been deleted or moved.

Solution

Select an existing file for the test.

00502004 No Function Registered in List.test.ets for the Current File

Error Message

The current file does not have any function registered in the list file.

Symptom

None of the functions in the current file are registered in the List.test.ets file.

Possible Causes

None of the functions in the current file are registered in the List.test.ets file.

Solution

Register the function in the List.test.ets file, as shown in the following example:

00502005 No Function Registered in List.test.ets for the Current Test Package

Error Message

The current package does not have any function registered in the list file.

Symptom

None of the functions in the current test package are registered in the List.test.ets file.

Possible Causes

None of the functions in the current test package are registered in the List.test.ets file.

Solution

Register the function in the List.test.ets file, as shown in the following example:

00502006 Function Not Registered in List.test.ets

Error Message

The function where the suite XXX is located is not registered in the ''List.test.ets'' file!

Symptom

The function that contains the test suite is not registered in the List.test.ets file.

Possible Causes

The function is not registered in the List.test.ets file.

Solution

Register the function in the List.test.ets file, as shown in the following example:

00502007 Test Suite Not Found in the Test File

Error Message

Current suite XXX not found in the test file.

Symptom

The test suite cannot be found in the test file.

Possible Causes

The test suite does not exist in the test file.

Solution

00503001 Invalid HAP Name

Error Message

Invalid HAP file name.

Symptom

The HAP name is invalid.

Possible Causes

The HAP name contains invalid characters.

Solution

Ensure that the HAP name contains only digits, letters, underscores (_), hyphens (-), or periods (.).

00503002 File Not Found in the HAP

Error Message

The XXX file in the hap file does not exist.

Symptom

The file cannot be found in the HAP.

Possible Causes

The corresponding file does not exist in the HAP.

Solution

Rebuild the HAP.

00503003 Empty File

Error Message

The XXX file is empty.

Symptom

The file is empty.

Possible Causes

The file in the HAP does not exist or has an incorrect format.

Solution

Rebuild the HAP.

00504001 Test Suite Name Not Specified

Error Message

The 'Suite name' is not specified.

Symptom

The test suite name is not specified.

Possible Causes

No test suite is selected in the run configuration.

Solution

Select a test suite.

00504002 Test Package Not Specified

Error Message

The 'Package' is not specified.

Symptom

The test package is not specified.

Possible Causes

No test package is selected in the run configuration.

Solution

Select a test package.

00504003 Test Case Not Specified

Error Message

The 'Method name' is not specified.

Symptom

The test case is not specified.

Possible Causes

No test case is selected in the run configuration.

Solution

Select a test case.

00504004 Test File Not Specified

Error Message

The 'File name' is not specified.

Symptom

The test file is not specified.

Possible Causes

No test file is selected in the run configuration.

Solution

Select a test file.

00505001 Failed to Run the Instrument Test

Error Message

Instrumentation run failed due to XXX.

Symptom

Failed to run the instrument test.

Possible Causes

The test suite contains Promise(async, await).

Solution

Ensure that Promise(async, await) is not used in the test suite.

00506001 Mismatch Between Returned and Expected Number of Instrument Tests

Error Message

XXX. Expected YYY tests, received ZZZ.

Symptom

An error occurs during instrument test execution.

Possible Causes

The number of tests returned does not match the expected number.

Solution

Make corrections based on the error message.

00506002 No Test Results

Error Message

No test results because XXX.

Symptom

No test results are generated.

Possible Causes

The device screen is locked with a password and has not been unlocked.

Solution

Unlock the screen and run the test again.

00506003 Failed to Execute the Historical Test Task

Error Message

Build history project failed.

Symptom

Failed to execute the historical test task.

Possible Causes

The historical task is no longer valid, or the execution environment has been modified.

Solution

Do not execute the historical task. Create a new one instead.

00508010 Failed to Generate the Coverage Report

Error Message

Coverage report generation failed! Please attempt to clean project first.

Symptom

Failed to generate the coverage report. Clean the project and retry.

Possible Causes

The coverage report cannot be generated.

Solution

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

00508013 App Launch Timeout

Error Message

App launch timed out. Make sure the screen is unlocked.

Symptom

The app launch timed out. Ensure that the screen is unlocked.

Possible Causes

The device screen is locked.

Solution

Unlock the device screen.

00508014 App Not Supported by the Previewer

Error Message

Previewer does not support this app.

Symptom

The Previewer does not support this app.

Possible Causes

The Previewer is used to run an instrument test.

Solution

The Previewer does not support instrument tests. Use a real device or an emulator to run the test.

00508015 Missing the .test.ets Suffix

Error Message

File XXX does not end with '.test.ets'.

Symptom

The file name does not have the required .test.ets suffix.

Possible Causes

The test file name does not have the required .test.ets suffix.

Solution

Rename the test file to use the .test.ets suffix.