如何获得测试用例的完整执行时间?

时间:2013-03-20 00:02:58

标签: html selenium coding-style

从Selenium IDE中的测试用例的开始到结束 - HTML。

要执行的命令/目标有用吗?

请举个例子?

1 个答案:

答案 0 :(得分:0)

有点大,但它的工作原理= P

[info] Executing: |storeEval | javascript{(new Date().getHours())} | hStart |
[info] script is: 2
[info] Executing: |storeEval | javascript{(new Date().getMinutes())} | mStart |
[info] script is: 8
[info] Executing: |storeEval | javascript{(new Date().getSeconds())} | sStart |
[info] script is: 0
[info] Executing: |storeEval | ${hStart}*60*60 | hStartTos |
[info] script is: 2*60*60
[info] Executing: |storeEval | ${mStart}*60 | mStartTos |
[info] script is: 8*60
[info] Executing: |storeEval | ${hStartTos}+${mStartTos}+${sStart} | sStartTotal |
[info] script is: 7200+480+0
[info] Executing: |storeEval | ${sStartTotal}/60 | sTomStartTotal |
[info] script is: 7680/60

[info] Executing: |pause | 300000 | Here your testcase |

[info] Executing: |storeEval | javascript{(new Date().getHours())} | hEnd |
[info] script is: 2
[info] Executing: |storeEval | javascript{(new Date().getMinutes())} | mEnd |
[info] script is: 13
[info] Executing: |storeEval | javascript{(new Date().getSeconds())} | sEnd |
[info] script is: 0
[info] Executing: |storeEval | ${hEnd}*60*60 | hEndTos |
[info] script is: 2*60*60
[info] Executing: |storeEval | ${mEnd}*60 | mEndTos |
[info] script is: 13*60
[info] Executing: |storeEval | ${hEndTos}+${mEndTos}+${sEnd} | sEndTotal |
[info] script is: 7200+780+0
[info] Executing: |storeEval | ${sEndTotal}/60 | sTomEndTotal |
[info] script is: 7980/60
[info] Executing: |storeEval | ${sTomEndTotal}-${sTomStartTotal} | ExeTime |
[info] script is: 133-128
[info] Executing: |echo | ${ExeTime} Minutes | |
[info] echo: 5 Minutes