myAppointment OPA test case issue

简介: myAppointment OPA test case issue

Sent: Monday, 2 November, 2015 4:04 PM

Test case description:

在create appointment view中,定义了一个这样的元素:image.png图1


在OPA里通过waitFor()方法找到了#responsibleText控件,并触发了它的LiveChange事件,去调用NewAppointment.controllers.js中的onEmployeeInputFieldChanged方法。但是很奇怪的是,Jekins的report显示,onEmployeeInputFieldChanged方法中,带红底色部分的代码并没有运行(见图2),从而没有为#responsibleText 这个input生成suggestionItems。OPA运行结果如图3.

image.pngimage.png图3


然后我就在chrome的里debug,发现其实浏览器是有跑图2的红底色代码的,但OPA frame里确实是没有可视的suggestionItems的。我尝试用写waitFor()方法去找suggestionItem所定义的类型(sap.ui.core.Item)的控件,也还是找不到,从而input的suggestionItemSelected事件也就无法继续写opa test case去测。


PS:

http://localhost:8080/cus.crm.mycalendar/test-resources/testsuite.opa.html?sap-language=EN&responderOn=true&testNumber=14,是本地访问这个testcase的URL.


solution

执行所有的test case是在浏览器地址栏里输入URL :http://localhost:8080/cus.crm.mycalendar/test-resources/testsuite.opa.html?sap-language=EN&responderOn=true;

如果不执行所有的test case,只执行指定的某一个,就是在上面你的URL后再加一个参数testNumber=xxx,它在OPA页面里是主窗口的每一行最前面test case的序号,也就是你的截图里的“1.”,比如

http://localhost:8080/cus.crm.mycalendar/test-resources/testsuite.opa.html?sap-language=EN&responderOn=true&testNumber=14 , 就是跑第14个test case(就是我现在有问题的这个case)

2. 括号里的三个参数的意义是:(arg1, arg2, arg3)

arg1——当前test case下,跑失败的子用例;

arg2——当前test case下,跑成功的子用例;

arg3——当前test case所包含的所有子用例的总数目。


就是说,每一个test case下面可以写子用例的意思是,其实就是一个分步骤的概念:比如我要测试点击一个button后会不会弹出一个dialog,这一整套动作是作为一个test case写的,但是需要分步骤来检测每一个控件的行为——首先找到button,写一条子用例语句来打印“find button AAA”,然后浏览器render出一个dialog,我们再写一个子用例来找dialog,写一条子用例语句来打印“find dialog BBB”。

image.pngimage.png

相关文章
|
5月前
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘thinkphp.test‘ don‘t exsit
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘thinkphp.test‘ don‘t exsit
93 0
|
5月前
[√]addr2line
[√]addr2line
71 0
sed: 1: “s/os.remove(“/xx/xxx. ...“: invalid command code f
sed: 1: “s/os.remove(“/xx/xxx. ...“: invalid command code f
|
自然语言处理 Python
A reportable application error has occurred. Conda has prepared the above report......
A reportable application error has occurred. Conda has prepared the above report......
178 0
A reportable application error has occurred. Conda has prepared the above report......
​Error -4075: File not found. An error occurred merging module <MODULENAME> for feature <FEATURENAME>.
​Error -4075: File not found. An error occurred merging module <MODULENAME> for feature <FEATURENAME>.
87 0
​Error -4075: File not found. An error occurred merging module <MODULENAME> for feature <FEATURENAME>.
OPA 21 - enter test case by testNumber
Created by Wang, Jerry on Nov 08, 2015
84 0
OPA 21 - enter test case by testNumber
SAP Enterprise search test report ESH_TEST_SEARCH debug in Q2D
SAP Enterprise search test report ESH_TEST_SEARCH debug in Q2D
106 0
SAP Enterprise search test report ESH_TEST_SEARCH debug in Q2D
my Note debug - add to function
Created by Wang, Jerry, last modified on Feb 03, 2015
103 0
my Note debug - add to function
How to find unit test class by code
Created by Wang, Jerry, last modified on Dec 20, 2014
102 0
How to find unit test class by code