有没有人尝试过在Cypress的步骤定义中使用|(管道符号)? 我写了这样的步骤定义 Then ('I can see that the product (displayed|not displayed)',(isDisplayed) =>{
//My code here
}) 但是柏树投掷错误 Step implementation missing for: I can see that the product displayed
node_modules/cypress-cucumber-preprocessor/lib/resolveStepDefiniti
我有一个测试,如下所示:
Feature: App example
I want to use the application
@focus
Scenario: Showing some text by clicking a button
Given I visit the application
When I click on a test button
Then I should see "Test Bar Foo" in the content section
以下是实现的步骤:
import { Given, When, Then
我正在尝试将我的测试从Cypress 8.7.0版本迁移到Cypress 10.10.0版本。安装了最新版本,并执行了以下设置,但出现以下错误。使用以下版本:Cypress 10.10.0、"@badeball/cypress-cucumber-preprocessor": "^11.4.0"、node v18.4.0、@bahmutov/cypress-esbuild-preprocessor": "^2.1.5"
Expected to find a global registry (this usually means you a
在Cucumber中导入一些依赖项时遇到问题。错误如下: Running: features\my_feature.feature... (1 of 1)
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
Oops...we found an error preparing this test file:
cypress\integration\features\my_feature.feature
在浏览器堆栈中使用cypress启动测试时
现在,通过在我的dev环境(ubuntu)上运行该命令来调试它
npm run browserstack
it calls the script from package.json "browserstack": "./node_modules/.bin/browserstack-cypress run --sync"
我的功能日志执行在浏览器堆栈构建仪表板中显示以下错误
Running: features\desktop.feature
我正在运行一个黄瓜特征文件在一个柏树跑。
db.feature
Feature: DB
Scenario: db test
When i try to connect to db
Then i get the code
我的步骤定义如下
db.ts
import { Given, When, Then, Before } from "cypress-cucumber-preprocessor/steps";
When(/^i try to connect to db$/, () => {
cy.task('log
当第一次尝试在Visual Studio代码中运行Cypress时,我收到以下输出:
It looks like this is your first time using Cypress: 6.4.0
× Verifying Cypress can run C:\Users\username\AppData\Local\Cypress\Cache\6.4.0\Cypress
→ Cypress Version: 6.4.0
Cypress failed to start.
This is usually caused by a missing library or depe
我尝试在GitLab CI runner中下载并安装Cypress,并得到以下错误输出: The cypress npm package is installed, but the Cypress binary is missing.
We expected the binary to be installed here: /root/.cache/Cypress/4.8.0/Cypress/Cypress
Reasons it may be missing:
- You're caching 'node_modules' but are not caching th
我正试着在我工作的地方和詹金斯一起做柏树测试。由于代理问题,我已经在s3中上传了我的本地节点模块,在运行测试之前,我将下载这些模块,然后使用以下命令运行测试。
但是我还不能理解的错误。有人能解释一下这里出了什么问题吗?
CYPRESS_CACHE_FOLDER=./cypress-cache ./node_modules/.bin/cypress run --headless --browser chrome --spec cypress/integration/api/api-test.spec.ts
The cypress npm package is installed, but the
当尝试在Chrome和Electron浏览器中运行我的测试时,似乎得到以下异常:
cypress-auto-framework\cypress\integration\Cucumber\EATest.feature:2
Test the EA Features
^
ParseError: Unexpected token
我的功能文件用于捕获需求:
Feature: EaTestFeature
Test the EA Features
Scenario: Test the login feature
Given I visit the
在我将Cypress迁移到版本10之后,Cucumber预处理器停止工作。我已经找到了一些我实现的解决方案,我还安装了最新的@badeball/cypress-cucumber预处理器。
现在我被困在如何设置cypress.config.js文件,因为原来的插件文件夹是不推荐的。
在插件文件夹下的旧index.js中,我有:
const cucumber = require("cypress-cucumber-preprocessor").default;
module.exports = (on, config) => {
// `on` is used to h
我有一个使用Cucumber预处理器支持TypeScript的Cypress项目,它突然开始抛出以下异常:
TypeError: Cannot read properties of undefined (reading 'uid')
有时,当我更改到不同的工作区时,它会工作,但当我打开Cypress运行器本身时,甚至在Jenkins中执行时,这个错误都会再次产生。
Cypress Runner: (v8.4.0)
Jenkins控制台: (v8.7.0)
The function exported by the plugins file threw an error
我试着用Cypress做测试。与Laravel和Yarn作为一个软件包(v8.3.1)在带有苹果M1芯片的MacBook上。安装是可以的,但是在cypress open之后我能看到的是: Cypress failed to start.
This may be due to a missing library or dependency. https://on.cypress.io/required-dependencies
Please refer to the error below for more details.
----------
rosetta error: /var/d
我想连接到Mysql在服务器上删除几条记录。我试过使用一些教程和答案。因为他们都是关于旧版本的柏树,我不知道是什么错误。这是密码。我很高兴知道是否有任何简单的方法与较少的代码或简单的配置。谢谢
cypress.config.js
const mysql = require("mysql")
function queryTestDb(query, config) {
// creates a new mysql connection using credentials from cypress.json env's
const connection = mysq
我正在尝试让cypress在远程服务器上的jenkins上运行(平台: linux (高山Linux - 3.7.0)。每次单击“立即构建”时,都会失败,并显示以下消息: + npm install
npm WARN cypress_test@1.0.0 No repository field.
up to date in 1.217s
[Pipeline] sh (Run tests)
+ npx cypress run
It looks like this is your first time using Cypress: 4.7.0
[?25l[17:51:40] Verifyi
我正在尝试将柏树添加到bitbucket管道中,但它告诉我我需要安装Xvfb,并且不知道如何继续运行。这是我的bitbucket.pipelines.yml
# Template NodeJS build
# This template allows you to validate your NodeJS code.
# The workflow allows running tests and code linting on the default branch.
image: node:14.15.4
pipelines:
default:
- step:
最初,xpath插件在我的cypress项目中工作得很好。安装了Typescript插件并从javascript移到了typescript。现在,它开始在xpath上抛出一个错误 Property 'xpath' does not exist on type 'cy & EventEmitter'.ts(2339) ? 请建议,如何在Cypress项目中使用xpath和typescript ? package.json中包含cypress-xpath": "^1.6.2", package.json文件如下: "
我的Jenkins部署失败,出现以下错误: [Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] cucumber
Error when executing always post condition:
org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
Perhaps you forgot to surround the