testbed踩坑:New Test Case cannot be added to the sequence....

[复制链接]
 楼主| keer_zu 发表于 2023-1-12 16:03 | 显示全部楼层 |阅读模式
TEST, AD, AN, CAN, ST, TE



598263bfbe9e05065.png

遇到这种情况怎么解决?
 楼主| keer_zu 发表于 2023-1-12 16:11 | 显示全部楼层
在initialisation code中添加:ldra_qq_quiet_stubs=1; 再执行用例
ldra_qq_quiet_stubs=1;的作用是不打印桩函数log
 楼主| keer_zu 发表于 2023-1-12 16:14 | 显示全部楼层
这样的结果是不再报上面的错误,弹框可以看到PASS

但是覆盖结果仍然是:


6076063bfc12817182.png

且可以看到日志:
3635163bfc15520a8e.png

  1. Execution History Directory:
  2. d:\LDRA\unit\workarea\tbwrkfls\EMClient_EMClient_1_seqwrkfls\

  3. Validating Execution History File
  4. d:\LDRA\unit\workarea\tbwrkfls\EMClient_EMClient_1_seqwrkfls\EMClient_1.exh


  5. Split Execution History File:
  6. d:\LDRA\unit\workarea\tbwrkfls\EMClient_EMClient_1_seqwrkfls\EMClient_1.exh


  7. Dynamic Coverage Analysis

  8.            ***********************************************************
  9.            ****     IMPLEMENTATION RESTRICTION IN LDRA TESTBED    ****
  10.            ****                                                   ****
  11.            ****           CONTACT SUPPORT EITHER LOCALLY          ****
  12.            ****              OR AT LDRA LTD (U.K.) ON             ****
  13.            ****                                                   ****
  14.            ****            TEL.     +44 (0)151 649 9300           ****
  15.            ****            FAX.     +44 (0)151 649 9666           ****
  16.            ****            E-mail   support@ldra.com              ****
  17.            ****                                                   ****
  18.            ****           QUOTING THE FOLLOWING MESSAGES          ****
  19.            ****                                                   ****
  20.            ***********************************************************

  21. ERROR  104 OCCURRED IN DYNAMIC COVERAGE ANALYSIS

  22. State of Dynamic Coverage Analysis when error occurred
  23. ======================================================
  24. Execution history type                   =     10
  25. Execution history number                 =      1
  26. Number of execution history records read =       29
  27. Current execution history pair           =    135     0


  28. Attempt to look at top of empty stack.

  29. This usually occurs when the execution history data associated with
  30. procedure confirms (instrumentation at the first executable line of the
  31. procedure) or procedure returns (instrumentation immediately preceding
  32. return statements) is missing from the execution history trace that is
  33. presented to the tool suite for analysis.


  34. You have encountered an error in Dynamic Coverage Analysis. Please check
  35. whether your code is multi-tasking or multi-processing. If it is you will have
  36. to add a task or process ID to your instrumentation data file, re-instrument
  37. and utilise DynSplit to separate all of the tasks from the execution history
  38. prior to Dynamic Coverage Analysis.
  39. Please see the Instrumentation section of the User Manual for further details.

  40. If the problem persists, before contacting LDRA please create a zip or
  41. compressed tar file containing the following files:

  42.    The SIR file that appears when you press the F6 key.
  43. The instrumentation file (i.e. <lang>instr.dat).
  44.    This error message you are reading now.
  45.    The source file under analysis.
  46.    The instrumented version of the source file.
  47. The execution history file (i.e. history.exh or <sourcefile>.exh)

  48.    The following workfiles generated by LDRA Testbed. These will be located in
  49. the tbwkfls or <setname>_tbwrkfls directory:

  50. <sourcefile>.bra
  51. <sourcefile>.dtb
  52. <sourcefile>.ibr
  53. <sourcefile>.ref
  54. <sourcefile>.stb
  55. <sourcefile>.tib
  56. <sourcefile>.xbr
  57. <sourcefile>.xtx

  58.    It is possible not all of the workfiles listed appear
  59.    in your system. Please send those you have.

  60. E-mail these files in a compressed single file archive (zip file) to LDRA at:

  61.      support@ldra.com
  62. Dynamic Files stored after error

  63. Archiving Execution History File:
  64. d:\LDRA\unit\workarea\tbwrkfls\EMClient_1.exc
  65. To: d:\LDRA\unit\workarea\tbwrkfls\dyn_archive_EMClient_1_27\

  66. Analysis failure occurred, repeating analysis with empty execution history.
  67. Additional Execution History generated:
  68. STREAM3.DAT



  69. Unable to archive - no valid Execution history

  70. TBreports generation
  71. Generating:
  72. Test Manager Report
  73. Dynamic Coverage Report


  74. Command Line Mode Finished
  75. Dynamic analysis completed for
  76. Z:\src\basic_service\EM\src\EMClient\EMClient.cpp.


 楼主| keer_zu 发表于 2023-1-12 16:17 | 显示全部楼层
桩函数的log有些错位:

  1. # cat EMClient.sop
  2. N 2;1 1 16 1 V
  3. M ***
  4. M *** Starting Stub : nobo::infra::em::EMCommProxy::EMCommProxy
  5. M ***
  6. P S nobo::infra::em::EMCommProxy::EMCommProxy
  7. P E V
  8. M ###
  9. M ### Ending Stub : nobo::infra::em::EMCommProxy::EMCommProxy
  10. M ###
  11. M ***
  12. M *** Starting Stub : nobo::infra::em::EMCommProxy::registerMessageHandler
  13. M ***
  14. P S nobo::infra::em::EMCommProxy::registerMessageHandler
  15. P E V
  16. M ###
  17. M ### Ending Stub : nobo::infra::em::EMCommProxy::registerMessageHandler
  18. M ###
  19. I V Z alive
  20. E true
  21. I V M mClient
  22. E pclient
  23. C V
  24. O V N mClient->serverAlive
  25. M ***
  26. E
  27. M *** Starting Stub : nobo::infra::em::EMCommProxy::resIdle
  28. P M ***
  29. VP S nobo::infra::em::EMCommProxy::resIdle
  30. P E V
  31. trueM ###

  32. M ### Ending Stub : nobo::infra::em::EMCommProxy::resIdle
  33. O V O %
  34. M ###
  35. E
  36. P V 0
  37. D


 楼主| keer_zu 发表于 2023-1-12 16:19 | 显示全部楼层
此时test case的设置:

Initialisation code:

  1. /*
  2. * Test case initialisation code will be placed here
  3. * Variables declared in this section do not have global scope
  4. * Some compilers may not allow declarations here
  5. */
  6. /* Uncomment the function call below to call the file-based test case initialisation code
  7. * This function can perform common test case initialisation for multiple test cases
  8. *  ldra_qq_file_tc_init_code ();
  9. */
  10. ldra_qq_quiet_stubs=1;
  11. pclient = &nobo::infra::em::EMClient::getInstance(nobo::infra::em::FG_IPC);
  12. pclient->init(testPrint);


Global Declarations:

  1. /*
  2. * Test case global declaration code will be placed here
  3. * Variables declared in this section are at global scope
  4. */
  5. nobo::infra::em::EMClient* pclient;
  6. void testPrint(int level, const char *format, ...){
  7.         va_list arg;
  8.         va_start(arg, format);
  9.         vprintf(format, arg);
  10.         va_end(arg);
  11. }


 楼主| keer_zu 发表于 2023-1-12 16:28 | 显示全部楼层
再看当前sequence模式不是unit testing

7534163bfc480e2b93.png

需要选这个,ok,再试一下
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:qq群:49734243 Email:zukeqiang@gmail.com

1478

主题

12917

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部
个人签名:qq群:49734243 Email:zukeqiang@gmail.com

1478

主题

12917

帖子

55

粉丝
快速回复 在线客服 返回列表 返回顶部