SilkTest??????3-?????????Verify????
???????????? ???????[ 2013/1/30 11:10:27 ] ????????
????????????????????SilkTest?????? ?????????????“???” ????????????????μ??????????“???”??????????????С???У??????????????“?”??????“???????”??“???????”…
?????????????????????????SilkTest ???????ú??????????????????“SilkTest?????????2- ??д???????”?????????????frame ???壬????????????????CalWithFunction.t ????y???д??????????????CalWithFunction ?????????Cal123Plus123 ??
[-] testcase CalWithFunction()
[ ] ??????.SetActive ()
[ ] ??????.C.Click ()
[ ] String sResultValue = Cal123Plus123() // 1
[-] if(val(sResultValue) == 246)
[ ] Print(“Passed: Expect 123+123=246?? actually it is {sResultValue}”)
[-] else
[ ] raise 1?? “Failed: Expect 123+123=246?? actually it is {sResultValue}”
[ ]
[-] String Cal123Plus123() //2
[ ] ??????.N1.Click ()
[ ] ??????.N2.Click ()
[ ] ??????.N3.Click ()
[ ] ??????.Plus.Click ()
[ ] ??????.N1.Click ()
[ ] ??????.N2.Click ()
[ ] ??????.N3.Click ()
[ ] ??????.Equal.Click ()
[ ] String sResultValue = ??????.CalResult.GetText() //3
[ ] return sResultValue //4
??????????????????????????????е?WriteScript.t ????????????????CalWithFunction.t ??WriteScript.t ????????????????????????????WriteScript.t ???Щ????????????????????Cal123Plus123 ??????????????CalWithFunction ?е???????????????????????1 ?????д?????????????????????????sResultValue ?????????ú???Cal123Plus123() ?????????????sResultValue ??
????????????????????2 ??????????????????????String ?????Cal123Plus123 ??????????б???????ú????????????????????String ?????????????3????????????????????????????4 ???潫??????????????
????OK ????????????????????case ????????testcase ?????Cal123Plus123 ????????????????????λ?????????????????????????????????case ????????
???????????????????????????????б???????
[-] if(val(sResultValue) == 246)
[ ] Print(“Passed: Expect 123+123=246?? actually it is {sResultValue}”)
[-] else
[ ] raise 1?? “Failed: Expect 123+123=246?? actually it is {sResultValue}”
????????????????????SilkTest ????????Verify ???????????д???????????????Verify ?????????
??????silktest ?У?Verify ?????????????????????????????ж?????????????????????????????????е???????????????????????
????Verify ????????????Verify (aActual?? aExpected [?? sDesc])
????????aActual ?????????????????????AnyType??
????aExpected ???????????????????????????????????aActual ??aExpected ?????????????ò???????????AnyType ??
????sDesc ???????????????????????????????String??
????Verify ???????????????????????????NULL ?????aActual ?? aExpected ???????????????????E_TYPE_MISMATCH ???????????????????????????????????E_VERIFY ???????????? ???????????????????????????testcase ?????С?
????OK ???????????????????????д?????????????д????ɡ????б????????????sResultValue ?????????246 ??????????????????????????????
????Verify(val(sResultValue)?? 246?? “Expect: 246?? actually it is {sResultValue}”)
?????????????????????£?????Ч????Ρ?
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11