t测试突然停止

时间:2019-02-26 08:28:24

标签: testing chatbot

我用Botium测试了我们的聊天机器人。但是在过程的中间,测试突然停止了。

即使我的测试尚未完成,也不确定为什么“停止通话”。这是我通过--verbose运行得到的。

2019-02-26T07:42:23.973Z botium-Convo Library Test wait for bot null
2019-02-26T07:42:24.202Z botium-connector-webdriverio Found new bot response element .vcw-message-container, id 0.9475738262354745-147
CHECKING ELEMENT 0.9475738262354745-147
2019-02-26T07:42:24.203Z botium-connector-webdriverio polling for bot output (.vcw-message-container)
FROM ME DECIDED 0.9475738262354745-147
no images: 0.9475738262354745-147
no audio: 0.9475738262354745-147
no video: 0.9475738262354745-147
    1) Library Test
2019-02-26T07:42:25.230Z botium-connector-webdriverio Stop called
2019-02-26T07:42:25.288Z botium-connector-webdriverio Clean called
2019-02-26T07:42:25.289Z botium-BaseContainer Cleanup rimrafing temp dir /var/lib/jenkins/workspace/botium-widget-prodtest/botiumwork/Production-Test-20190226-144119-7H0sV


  0 passing (1m)
  1 failing

下面是我的botium.json文件(出于安全目的而修改的URL):

{
  "botium": {
    "Capabilities": {
      "PROJECTNAME": "Production Test",
      "CONTAINERMODE": "webdriverio",
      "WEBDRIVERIO_OPTIONS": {
        "desiredCapabilities": {
          "browserName": "chrome",
          "chromeOptions": {
            "args": [ "--headless", "--no-sandbox", "--disable--dev-shm-usage" ]
          } 
        }
      },
      "WEBDRIVERIO_URL": "https://example.com",
      "WEBDRIVERIO_OPENBOT": "./actions/open_test",
      "WEBDRIVERIO_IGNOREWELCOMEMESSAGES": 2,
      "WEBDRIVERIO_SENDTOBOT": "./actions/send",
      "WEBDRIVERIO_GETBOTMESSAGE": "./actions/parse_response",
      "WEBDRIVERIO_INPUT_ELEMENT": "#vc-input",
      "WEBDRIVERIO_INPUT_ELEMENT_SENDBUTTON": "#vc-btn-send",
      "WEBDRIVERIO_OUTPUT_ELEMENT": ".vcw-message-container",
      "WEBDRIVERIO_START_SELENIUM": true,
      "WEBDRIVERIO_START_SELENIUM_OPTS": {
        "drivers": {
          "chrome": {
            "version": "2.36"
          }
        }
      },
      "ASSERTERS": [
        {
          "ref": "GALLERY",
          "src": "./asserters/gallery",
          "global": true
        }
      ]
    }
  }
}

这是我用于测试的convo文件(已修改):

Library Test

#me
Who can I contact if I lost something?

#bot
If you are at the premises, please approach staff for assistance. Otherwise, please email us.

If you've lost your library card or any card linked to your NRIC, please report your loss of card through the link below.
BUTTONS Report Lost Cards

#me
Why can't I download information from the multimedia stations onto my USB thumbdrive?

#bot
Content from databases and websites may be protected by copyright. As such, the library does not encourage downloading content onto any media in the library.

#bot
BUTTONS Multimedia Stations

#me
Do you have word processing facilities?

#bot
Unfortunately, we do not offer word processing services. Hope we can help you with other services.

#bot
BUTTONS FAQ

#me
Can I collect my multimedia printouts at any floor?

#bot
You may collect your printouts after you have signed in with your username and password at the printout station. For more information, please approach our staff.

#bot
BUTTONS Multimedia Stations | Printing | Photocopy/Scan

#me
How do I use your Reference Enquiry services?

#bot
You may submit your enquiries using our online form from the link below.
BUTTONS Ask us

#bot
BUTTONS FAQ

#me
How do I use your ASK service?

#bot
You may submit your enquiries using our online form from the link below.
BUTTONS Ask us

#bot
BUTTONS FAQ

#me
Can I photocopy a whole book borrowed from the library? 

#bot
Users may photocopy 10% of the total number of pages or one chapter for published works that are not less than 10 pages and are not an artistic work. For more details on the Copyright Act, you may refer to the following link.
BUTTONS Copyright Act

#bot
BUTTONS Photocopy | Printing

#me
Can overseas foreigners have access to eResources?

#bot
We seek your understanding that our online eResources are available only to registered members. Currently we do not offer overseas memberships. We thank you once again for your interest.
BUTTONS E-Resources

#bot
BUTTONS Register As Member | Create Account | Using The Library

#me
How can I sell books to the library?

#bot
Please note that we can only purchase library materials from a panel of vendors. We cannot purchase library materials directly from any other vendors/publishers/suppliers.

#bot
BUTTONS Donate Books

#me
Can I return library materials at the Sports Hub Library?

#bot
Materials borrowed from the network of public libraries cannot be returned at the Sports Hub Library.

#bot
BUTTONS Return Elsewhere | Return eBooks Early | Return eBooks

#me
Do I have to be a member to use public libraries services?

#bot
Our public libraries can be visited by anyone during the opening hours and you do not have to pay for entering the library and browsing the materials on-site.

#bot
BUTTONS Register As Member | Using eResources

#me
How many books can I borrow as a library member?

#bot
Here's information on borrowing privileges!

#bot
MEDIA https://example.com/files/1536227184506.png

#bot
You may renew an item if: 
- the item has not been reserved by another member;
- the item has not been renewed before; and
- the item is not overdue.

Each item can only be renewed once.

#bot
BUTTONS Check Current Loans | How To Renew | How To Reserve

#me
How to access the multimedia stations in the libraries?

#bot
Users can use the multimedia stations in our libraries to access eResources and the Internet as well as to print their documents. To use the multimedia station, you need to register for a ID.

#bot
No prior booking for the multimedia stations is needed as they are available on first-come-first-use basis. More information can be viewed below.
BUTTONS More Information | Create ID

#bot
BUTTONS eNewspapers | Free Internet | Printing

#me
Can I return books borrowed from one library at another library?

#bot
You can return your books borrowed from one library at any other public library using the usual book drop. View the locations of all public libraries here.
BUTTONS Locations

#bot
BUTTONS Return eBooks | Sports Hub Library | Return eBooks Early

#me
How to amend my notification details?

#bot
- Go to https://example.com 
- Click [myLibrary] 
- Login with your myLibrary ID & Password 
- Go to [Account > Notification Settings] to review alerts setup
- Click [Submit]
BUTTONS myLibrary Home

#bot
BUTTONS Change Address | Amend Details | Update Particulars

#me
How to amend my email and contact details recorded by library?

#bot
- Go to https://example.com
- Click [myLibrary] 
- Login with your myLibrary ID & Password 
- Go to [Account > Personal Profile] to review your contacts
- Tick [Update Phone Details] or [Update Email Details]
- Amend contacts
- Click [Submit]
BUTTONS myLibrary Home

#bot
BUTTONS Change Address | Amend Notifications | Update Particulars

#me
Do you have free Internet in the libraries?

#bot
You can access the Internet through the "Wireless@ex" network. Please refer to the link below should you need assistance on how to set up Wireless@ex.
BUTTONS Wireless@ex FAQ

#bot
BUTTONS Multimedia Stations | Room For Self-study

#me
Do you have photocopy/scanning service in the libraries?

#bot
There is no photocopying/scanning service at all the public libraries.

#bot
BUTTONS Printing | Multimedia Stations

#me
Do you have printing service in the libraries?

#bot
You can print documents at a fee of $0.30 per A4 page (only black & white) via our multimedia stations.

#bot
Our multimedia stations can be used to access eResources or browse the Internet. However, there is no Microsoft Office or any software applications installed in these computers; neither are there any slots for thumb drives but you can print out documents if they can be opened via web-based emails (e.g. Word, Excel, PowerPoint or PDF documents from your email).

#bot
BUTTONS Multimedia Stations | Card Topups

2 个答案:

答案 0 :(得分:0)

在日志输出中,有消息

2019-02-26T07:42:23.973Z botium-Convo Library Test wait for bot null

这意味着漫游器没有及时响应。您可以使用名为WAITFORBOTTIMEOUT

的功能来增加此超时时间

如果不了解您的DOM结构的更多信息,就不可能给出更多的提示。选择器非常重要,但是从您的配置中,我可以看到您已经是一位经验丰富的Selenium开发人员(here中描述了与Botium一起使用的选择器)

"WEBDRIVERIO_GETBOTMESSAGE": "./actions/parse_response",

我建议对该文件添加更多日志记录-显然,它会收到有关新的bot响应元素的通知,但无法从其中提取文本。

答案 1 :(得分:0)

对不起,实际上还有另一条错误消息。

  

超时超过60000ms。对于异步测试和挂钩,请确保   称为“ done()”;如果返回了Promise,请确保它可以解决。

似乎通过使用'--timeout'命令增加超时可以解决此问题。 默认的60000毫秒超时不足以完成测试。