所以我使用了testcafe的默认docker,它在docker hub上是testcafe/testcafe,我必须运行一些testcafe脚本.
但是,我需要将错误触发的屏幕截图上传到我可以在docker镜像运行完毕后查看它的某个地方.
我正在使用使用bash的imgur程序,所以我重新做了一些事情,使它兼容并且一切正常,除了我需要卷曲.我试过跑步
apk add curl
Run Code Online (Sandbox Code Playgroud)
但是我收到了错误
ERROR: Unable to lock database: Permission denied ERROR: Failed to open apk database:
Run Code Online (Sandbox Code Playgroud)
现在我没有这意味着我没有权限这样做但是我可以解决这个问题,有一些方法可以成为root(这是在bitbucket管道中).
我真的不想创建自己的docker.
另请注意我发现的与此相关的所有问题都是关于在创建docker时安装,但我的问题是如何在创建docker之后执行此操作.thx(一个很好的答案是保存屏幕截图的另一种方法,但最好不用ssh).
我目前正在使用 TestCafe 进行一些 e2e 测试。我遇到了以下错误
1) - Error in Role initializer -
A JavaScript error occurred on "http://localhost:3000/".
Repeat test actions in the browser and check the console for errors.
If you see this error, it means that the tested website caused it. You can fix it or disable tracking JavaScript errors in TestCafe. To do the latter, enable the "--skip-js-errors" option.
If this error does not occur, please write a new issue at:
"https://github.com/DevExpress/testcafe/issues/new?template=bug-report.md".
JavaScript error details:
ResizeObserver loop …Run Code Online (Sandbox Code Playgroud) TestCafe克服了哪些问题证明它适用于Selenium?是否值得将旧的测试套装移植到TestCafe?
automated-tests web-testing selenium-webdriver e2e-testing testcafe
我想做DevExpress控件的自动测试.
我发现了一些像guia,NUnitForm等框架,但它们都是标准的WPF控件.
有没有其他框架可以帮助我测试DevExpress控件?
我了解TestCafe试图替换基于Webdriver的测试框架(如Selenium)。我还找不到与BDD(黄瓜)集成的示例。
为了开始我的项目,我跑了vue init webpack my-project,但我排除了E2E测试.现在,我改变了主意,也希望包括端到端测试.如何将它们添加到我的项目中?
读者注意:Tarun Lalwani的回答对我很有帮助.但是,您可能需要考虑使用TestCafe,因为它可以在没有任何配置的情况下工作.
我尝试使用该命令创建一个虚拟项目,vue init webpack my--project以便我可以复制粘贴test/e2e目录,然后尝试从那里工作,但它没有工作.我也复制粘贴了npm脚本,尝试运行npm run e2e然后根据我收到的错误消息更新了我的代码.
我已经达到了一个TypeError: webpack.optimize.ModuleConcatenationPlugin is not a constructor错误的地步.const webpack = require('webpack'),我已经跑去npm update确保webpack节点模块是最新的,所以我不知道为什么我会收到这个错误.
无论如何,这种尝试运行npm run e2e然后根据错误消息更新我的代码的方法似乎不太可能成功.
的package.json
{
"name": "premium-poker-tools",
"version": "1.0.0",
"description": "A Vue.js project",
"author": "Adam Zerner <azerner3@gmail.com>",
"private": true,
"scripts": {
"dev": "node build/dev-server.js",
"start": "node build/dev-server.js",
"build": "node build/build.js",
"test": "BABEL_ENV=test karma start …Run Code Online (Sandbox Code Playgroud) /**
Used to get the periodic analytic id.
Whenever we are viewing an asset, the server must respond with an id.
This id is later used by the client, to send periodic analytics.
@param {object} t Testcafe's test controller
@param {object} logger A testcafe's RequestLogger.
@returns {string} Returns the periodic analytic id.
*/
async getPeriodicAnalyticId(t, logger) {
const logPrefix = 'Get periodic analytic id > ';
let responseBody;
await t
.expect(logger.requests.length).gt(0, logPrefix + 'No …Run Code Online (Sandbox Code Playgroud) 我正在测试一个页面,该页面具有一个带有嵌入代码的文本框和一个“复制”按钮,该按钮应该将文本框的内容复制到剪贴板上,以便用户可以将其粘贴到其他地方。有没有办法测试单击“复制”按钮并验证剪贴板内容是否与文本框的内容匹配?谢谢!
在使用TestCafe编写测试时,我正在创建实用程序函数,但在任何函数中使用Selector('')方法时似乎存在问题.
Selector('')方法在测试文件中以及从另一个文件(utility_selectors.js)导入时都可以正常工作.我想我需要在函数中包含一些东西,但我卡住了,似乎无法找到解决方案.
我的目标是创建一个选择鼠标点击坐标的功能.
Utility_selectors.js
import { Selector } from 'testcafe';
export const viewport = Selector('.viewport').find('canvas');
Run Code Online (Sandbox Code Playgroud)
Utility_functions.js
import * as s from './selectors.js';
export const selectPoint = (x,y) => {
return s.viewport + ",{ offsetX :" + x + ", offsetY :" + y + "}"
}
Run Code Online (Sandbox Code Playgroud)
或(两者都不起作用)
export function selectPoint(x,y){
return s.viewport + ",{ offsetX :" + x + ", offsetY :" + y + "}"
}
Run Code Online (Sandbox Code Playgroud)
Testfile.js(实用功能在起作用)
import { selectPoint } from …Run Code Online (Sandbox Code Playgroud) 描述: \n引入该错误会阻止客户单击他应该单击的元素
\n如何?\n步骤说明: \n以下是在我们的模式中实现 Dialog HTML 标记后我们的支付页面应用程序上发生的情况:
\n我们使用的浏览器: chrome 和 firefox。
\n\ntestcafe 中的预期行为: Testcafe 应该\xe2\x80\x99t 能够像真实用户一样单击此 \xe2\x80\x9ccheckout\xe2\x80\x9d 按钮\n testcafe 中的实际行为:针对 bug 的绿色测试\nTestcafe 允许单击后台弹出窗口上的按钮。\n因为即使与模式组件中的另一个元素 Dialog HTML 标记重叠,它也会与按钮交互
\n测试后从 testcafe 收到此警告消息:
\nWhen something overlaps the action target, TestCafe performs the action with the topmost element at the original target\'s location.\nThe following element with a greater z-order replaced the original action target: <dialog …Run Code Online (Sandbox Code Playgroud) testcafe ×10
testing ×6
e2e-testing ×4
javascript ×2
reactjs ×2
alpine-linux ×1
automation ×1
bdd ×1
clipboard ×1
cucumber ×1
devexpress ×1
docker ×1
gui-testing ×1
node.js ×1
ui-testing ×1
vue-cli ×1
vue.js ×1
web-testing ×1
webpack ×1