Customization > Validation Guidelines for Automation of Customizations > Guidelines to Handle Unit Test Failure
Guidelines to Handle Unit Test Failure
This section provides an overview of guidelines to handle unit test failures.
The build logs and test execution logs provide the required information about the errors or issues in the test build and execution processes. If a test reports an error or failure, then check the stack trace provided in the index.html report file located at the <WT_HOME>\buildlogs\customizationLogs\UnitTest\<moduleName>\TestExecutionReport directory. Also check unit test execution logs located at the <WT_HOME>\buildlogs\customizationLogs directory and take corrective action as per the stack trace. Even verify the mock unit test along with the source code.
If you see the error java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing while executing the test.unit target, then it is due to missing hamcrest.jar file in the <WT_HOME>\lib directory. Make the required test dependency available and re-execute the test.
If you see the error Error opening zip file or JAR manifest missing: <WT_HOME>\lib\jacocoagent.jar while executing the test.coverage.report target, then it is due to missing jacocoagent.jar file in the <WT_HOME>\lib directory. Make the required test dependency available and re-execute the test.
If you see the error Error: Unable to access jarfile <WT_HOME>\lib\jacococli.jar while executing the test.coverage.report target, then it is due to missing jacococli.jar file in the <WT_HOME>\lib directory. Make the required jar file available and re-execute the test.
If you see the error package org.junit does not exist while executing the compile.test target, then it is due to missing junit.jar file in the <WT_HOME>\lib directory.
Was this helpful?