在docker中运行的BlogPlayground E2E测试在等待元素

时间:2019-04-30 07:54:55

标签: selenium docker

在docker中进行硒测试时,总是会出现超时错误。但是我们通过VS在本地系统中运行。

  1. 在powershell中使用导航到我们的项目位置
  2. 在Powershell中键入docker-compose build
  3. 然后在powershell中键入docker-compose up -d
  4. 接下来键入docker-compose exec <> bash powershell
  5. 然后导航到我们的项目根目录
  6. 在Powershell中键入dotnet restore
  7. 在Powershell中键入dotnet构建
  8. 导航到我们的E2ETest路径,例如:BlogPlayground.E2ETest
  9. 然后输入-npm在powershell中运行test:chrome

实际行为

Starting web application. Log found at: .test-results/server.log
Starting selenium server... started - PID:  790

[0 Smoke Test] Test Suite
=============================

Running:  can login with test user
 ✖ Timed out while waiting for element <.form-login> to be present for 10000 milliseconds.  - expected "visible" but got: "not found"
    at Object.exports.command (/app/BlogPlayground/BlogPlayground.E2ETest/commands/login.js:6:10)


FAILED:  1 assertions failed (11.902s)

[Articles Test] Test Suite
==============================
 ✖ Timed out while waiting for element <.form-login> to be present for 10000 milliseconds.  - expected "visible" but got: "not found"
    at Object.exports.command (/app/BlogPlayground/BlogPlayground.E2ETest/commands/login.js:6:10)


[Login Neg Test] Test Suite
===============================
 ✖ Timed out while waiting for element <.form-login> to be present for 10000 milliseconds.  - expected "visible" but got: "not found"
    at Object.exports.command (/app/BlogPlayground/BlogPlayground.E2ETest/commands/login.js:6:10)

0 个答案:

没有答案