Java 乐山LWM2M服务器

Java 乐山LWM2M服务器,java,maven,lwm2m,Java,Maven,Lwm2m,我在乐山工作() 我已经在命令行中运行了乐山项目,因此我使用此命令启动测试: mvn test 我有错误: Results : Failed tests: BootstrapTest.bootstrap:59 expected:<1> but was:<0> SecurityTest.register_update_reregister_device_with_psk_to_server_with_psk:130 Values

我在乐山工作()

我已经在命令行中运行了乐山项目,因此我使用此命令启动测试:

mvn test
我有错误:

 Results :
    
    Failed tests:
      BootstrapTest.bootstrap:59 expected:<1> but was:<0>
      SecurityTest.register_update_reregister_device_with_psk_to_server_with_psk:130 Values should be different. Actual: qtjLtAHNqi
    Tests in error:
      ObserveTest.can_observe_object:137 NullPointer
      WriteTest.can_write_string_resource_in_tlv:74->write_string_resource:90 NullPointer
    
    Tests run: 100, Failures: 2, Errors: 2, Skipped: 13
    
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO]
    [INFO] leshan ............................................. SUCCESS [0.092 s]
    [INFO] leshan - core ...................................... SUCCESS [9.903 s]
    [INFO] leshan - server core ............................... SUCCESS [1.666 s]
    [INFO] leshan - server californium ........................ SUCCESS [2.778 s]
    [INFO] leshan - client core ............................... SUCCESS [1.663 s]
    [INFO] leshan - client californium ........................ SUCCESS [0.260 s]
    [INFO] leshan - integration tests .........................FAILURE [33.324 s]
    [INFO] leshan - server demo ............................... SKIPPED
    [INFO] leshan - client demo ............................... SKIPPED
    [INFO] leshan - bootstrap server demo ..................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 51.197 s
    [INFO] Finished at: 2016-06-07T13:50:17+02:00
    [INFO] Final Memory: 29M/288M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19:test (default-test) on project leshan-integration-tests: There are test failures.
    [ERROR]
    [ERROR] Please refer to C:\dvp_win\leshan-master\leshan-integration-tests\target\surefire-reports for the individual test results.
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    [ERROR]
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR]   mvn <goals> -rf :leshan-integration-tests
结果:
失败的测试:
BootstrapTest.bootstrap:59应为:但为:
SecurityTest.register_update_reregister_device_with_psk_to_server_with_psk:130的值应该不同。实际:qtjLtAHNqi
错误测试:
ObserveTest.can_observe_对象:137空指针
WriteTest.can_write_string_resource_in_tlv:74->write_string_resource:90空指针
测试运行:100,失败:2,错误:2,跳过:13
[信息]------------------------------------------------------------------------
[信息]反应堆概要:
[信息]
[信息]乐山。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。成功[0.092秒]
[信息]乐山-核心。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。成功[9.903秒]
[信息]乐山-服务器核心。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。成功[1.666秒]
[信息]乐山-服务器加州。。。。。。。。。。。。。。。。。。。。。。。。成功[2.778秒]
[信息]乐山-客户核心。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。成功[1.663秒]
[信息]乐山-客户加利福尼亚州。。。。。。。。。。。。。。。。。。。。。。。。成功[0.260秒]
[信息]乐山-集成测试失败[33.324 s]
[信息]乐山-服务器演示。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。跳过
[信息]乐山-客户演示。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。跳过
[信息]乐山-引导服务器演示。。。。。。。。。。。。。。。。。。。。。跳过
[信息]------------------------------------------------------------------------
[信息]生成失败
[信息]------------------------------------------------------------------------
[信息]总时间:51.197秒
[信息]完成时间:2016-06-07T13:50:17+02:00
[信息]最终内存:29M/288M
[信息]------------------------------------------------------------------------
[错误]无法执行目标org.apache.maven.plugins:maven surefire plugin:2.19:test(默认测试)对项目leshan集成测试:存在测试失败。
[错误]
[错误]请参阅C:\dvp\U win\leshan master\leshan integration tests\target\surefire报告以了解单个测试结果。
[错误]->[帮助1]
[错误]
[错误]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
[错误]使用-X开关重新运行Maven以启用完整调试日志记录。
[错误]
[错误]有关错误和可能的解决方案的更多信息,请阅读以下文章:
[错误][帮助1]http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[错误]
[错误]纠正问题后,可以使用命令恢复生成
[错误]mvn-rf:乐山集成测试

你能帮我解决这个问题吗?

这不是个好问题。但是你的答案在Maven的输出中

Failed tests:
  BootstrapTest.bootstrap:59 expected:<1> but was:<0>
  SecurityTest.register_update_reregister_device_with_psk_to_server_with_psk:130 Values should be different. Actual: qtjLtAHNqi
Tests in error:
  ObserveTest.can_observe_object:137 NullPointer
  WriteTest.can_write_string_resource_in_tlv:74->write_string_resource:90 NullPointer
失败的测试:
BootstrapTest.bootstrap:59应为:但为:
SecurityTest.register_update_reregister_device_with_psk_to_server_with_psk:130的值应该不同。实际:qtjLtAHNqi
错误测试:
ObserveTest.can_observe_对象:137空指针
WriteTest.can_write_string_resource_in_tlv:74->write_string_resource:90空指针

查看BootstrapTest和SecurityTest。

如果您想运行project而不失败,最好跳过测试。 命令-
mvn清洁安装-DskipTests

请参阅github

问题,寻求除错帮助(“为什么此代码不起作用?”)必须包括所需的行为、特定问题或错误以及在问题本身中重现它所需的最短代码。没有明确问题陈述的问题对其他读者没有用处。请参阅:。