实际测试用例断言失败,但为什么报告显示是通过的?
下面是配置文件:
---
pluginList: []
saveScreen: true
reportTitle: ""
resultDir: "2021121301"
waitLoading: 500
waitLaunch: 6000
showCancel: true
maxTime: 60
maxDepth: 10
capability:
noReset: "true"
fullReset: "false"
appium: "http://127.0.0.1:4723/wd/hub"
appPackage: "com.cha.buyer"
appActivity: "com.cha.buyer.ui.MainActivity"
testcase:
name: "buyer_new AppCrawler"
steps:
- given: []
when: {xpath: "//*[@text = '我的']",action: click}
then: ["//*[contains(@text, '郭雨6585')]","//*[contains(@text, '充值')]"]
- given: []
when: {xpath: "//*[@text = '首页']",action: click}
then: ["//*[contains(@text, '精品')]"]
- given: []
when: {xpath: "//*[@text = '我的']",action: click}
then: []
selectedList:
- given: []
when: null
then: []
xpath: "//*[contains(name(), 'Button')]"
action: null
actions: []
times: 0
- given: []
when: null
then: []
xpath: "//*[contains(name(), 'Text') and @clickable='true' and string-length(@text)<10]"
action: null
actions: []
times: 0
- given: []
when: null
then: []
xpath: "//*[@clickable='true']/*[contains(name(), 'Text') and string-length(@text)<10]"
action: null
actions: []
times: 0
- given: []
when: null
then: []
xpath: "//*[contains(name(), 'Image') and @clickable='true']"
action: null
actions: []
times: 0
- given: []
when: null
then: []
xpath: "//*[@clickable='true']/*[contains(name(), 'Image')]"
action: null
actions: []
times: 0
- given: []
when: null
then: []
xpath: "//*[contains(name(), 'Image') and @name!='']"
action: null
actions: []
times: 0
- given: []
when: null
then: []
xpath: "//*[contains(name(), 'Text') and @name!='' and string-length(@label)<10]"
action: null
actions: []
times: 0
firstList: []
lastList:
- given: []
when: null
then: []
xpath: "//*[@selected='true']/..//*"
action: null
actions: []
times: 0
- given: []
when: null
then: []
xpath: "//*[@selected='true']/../..//*"
action: null
actions: []
times: 0
backButton:
- given: []
when: null
then: []
xpath: "Navigate up"
action: null
actions: []
times: 0
triggerActions:
- given: []
when: null
then: []
xpath: "share_comment_guide_btn"
action: null
actions: []
times: 0
xpathAttributes:
- "class"
- "name"
- "label"
- "value"
- "resource-id"
- "content-desc"
- "instance"
- "text"
sortByAttribute:
- "depth"
- "list"
- "selected"
findBy: "default"
defineUrl: []
baseUrl: []
appWhiteList: []
urlBlackList: []
urlWhiteList: []
blackList:
- given: []
when: null
then: []
xpath: ".*[0-9]{2}.*"
action: null
actions: []
times: 0
beforeRestart: []
beforeElement:
- given: []
when: null
then: []
xpath: "/*"
action: "Thread.sleep(500)"
actions: []
times: 0
afterElement: []
afterPage: []
afterPageMax: 2
tagLimitMax: 2
tagLimit:
- given: []
when: null
then: []
xpath: ""
action: null
actions: []
times: 1000
- given: []
when: null
then: []
xpath: ""
action: null
actions: []
times: 1000
- given: []
when: null
then: []
xpath: "share_comment_guide_btn_name"
action: null
actions: []
times: 1000
assertGlobal: []```