863 questions
0
votes
0
answers
17
views
Immediately write single-line progress to Azure Devops log
In Azure Devops, the log seems to be buffered until a newline character is printed.
Some programs use single-line progress bars, like Cucumber's progress or cucumber-js's progress-bar outputs.
This is ...
0
votes
0
answers
36
views
Wdio Cucumber filter steps in feature file based on tag
I've wdio cucumber feature file:
@T555
Feature: T555 Car Purchase Flow
Background:
Given I am logged in
Scenario: Verify the process of purchasing T555 Car
Given I navigate to &...
0
votes
0
answers
59
views
How to get detailed cucumber test step reporting within VS Code Terminal
In my current framework, utilizing cucumber in vs code, I was executing my automated tests via launch.json, and I was able to get this detailed step pass/fail output.
cucumber output
That ...
0
votes
1
answer
289
views
Getting Error: toMatchAriaSnapshot() must be called during the test in Playwright+cucumber+js [closed]
I have been facing the issue at toMatchAriaSnapshot() assertion in playwright with cucumber and javascript. Did anybody come across this issue? Please help me in resolving this issue?
const { expect } ...
0
votes
0
answers
706
views
How to Configure VS Code Testing Tab for Cucumber.js with TypeScript and Playwright to run and debug tests?
Description:
I'm working on a project using TypeScript and Playwright, and I'm writing tests with Cucumber.js. I can successfully run the tests from the terminal using the script defined in my package....
0
votes
0
answers
807
views
Gherkin Steps Not Linked to Step Definitions in Playwright TypeScript Cucumber Setup on Windows
Summary
I’m using Playwright with TypeScript and Cucumber.js on Windows, but my Gherkin steps in .feature files aren’t linking to the step definitions. I've set up what I believe to be correct ...
0
votes
1
answer
59
views
How to access params of example/template data table (cucumber)?
We use codeceptjs with cucumber for api tests. In the test steps we decided to use a docstring to hand over variables instead of a data tables.
Now the creation of a Scenario Outline (cucumber style) ...
0
votes
0
answers
66
views
Issues with Locating Features
When I run the command npx cucumber-js, it doesn't find the files, as if they were ignored.
I managed to set up the entire structure and configuration with cucumber.json.
Has anyone experienced this?
...
1
vote
2
answers
445
views
CucumberJS with Vue 3 and PlayWright: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".vue"
I can use the PlayWright experimental component testing to test my HelloWorld.vue component. This works:
import { test, expect } from '@playwright/experimental-ct-vue';
import HelloWorld from './...
0
votes
2
answers
59
views
Cannot loop all rows in cucumber.js examples table
In my automated test, I intend to automatically answer quiz and click the "next" button to proceed to the next page after each question is done in each page (questionNum). However, only the ...
0
votes
2
answers
863
views
Getting Unable to connect to "http://localhost:4723/wd/hub" error with node 18 when run against mobile Apps
I have webdriverio + cucumberjs based tests and When using node 18, I,m getting error - http://localhost:4723/wd/hub
Setup:
node v18.20.3 (npm v10.7.0)
[email protected]
[email protected]
I am able to run ...
0
votes
0
answers
273
views
How to use zerostep ai function with the Cucumber.js BDD framework
We're trying to integrate the Zerostep AI function into our automation testing framework. We are using the following technologies in our framework: Playwright, JavaScript, Cucumber.js, and Zerostep AI....
0
votes
1
answer
131
views
How can we make data table as optional in the cucumber?
can we make the data table optional argument, I have two cases in the below for both cases
When(/^I (enter|select)?(( and select)? the following fields )?( "(.*?)" in the )("(.*?)" ...
0
votes
0
answers
443
views
Session storage not done properly in playwright
Trying to run cucumber scenarios in parallel. However the implementation is actually not working fine. When I run the command yarn cucumber-js path-to-feature.feature --parallel 4, all four tests are ...
0
votes
1
answer
33
views
Exclude some tests by tag
Is there a possibility to exclude some tests by tag. E.g.:
npx cucumber-js -t !@foobar
So that all tests executed except tests with tag foobar.
0
votes
2
answers
2k
views
How to access localhost from a step in GitHub actions?
I have 2 repo, one is for my NextJS app let's call it repo A. Another one for my testing suite that uses cucumber and playwright, let's call it repo B.
I want to run a Github Actions workflow, ...
1
vote
0
answers
149
views
Running Cucumber in Deno
I am very happy with CucumberJS for running integration tests in my Typescript projects.
I now wanted to try Deno for easier and direct Typescript support. However I could not find a way of getting ...
0
votes
1
answer
518
views
Multi tab in playwright and cucumber
I'm working on a POC to see if we can migrate our existing selenium/cucumber tests to playwright/cucumber but when it comes to handling multi-tab situations i couldn't find a way to do it.
I have ...
1
vote
0
answers
76
views
Cucumber HTML Report includes some Features not executed
Running tests using Cucumber.js from CLI always generates HTML Reports with some Features that weren't executed on that run.
Example, executing a single Scenario:
$ ./node_modules/.bin/cucumber-js --...
0
votes
1
answer
196
views
Cucumber - Js load json data for examples for request
Feature: Api test for Login user and get token
Scenario Outline: Auth login get token
Given A login
When I send the POST request to /auth/login
Then I get response statusCode 200
Then I get response ...
0
votes
0
answers
148
views
Cucumber, TypeScript, Error: No tests found when running without examples
I faced an issue when I removed examples from my test feature file then I've got an error Error: No tests found. Before that It was working without any problems even without using examples. I removed ...
0
votes
0
answers
448
views
Markdown in cucumber/gherkin descriptions and html formatter
I am trying to use Markdown in Gherkin/Cucumber feature's descriptions. What I learned from https://cucumber.io/docs/gherkin/reference/
Descriptions can be in the form of Markdown - formatters ...
1
vote
0
answers
72
views
CucumberJS only shows diagnostic codes after ESM upgrade
We've recently upgraded our test suite to ESM rather than CommonJS. This involved a few things such as setting the following Node options
--experimental-specifier-resolution=node --loader ts-node/esm
...
0
votes
1
answer
156
views
facing issue in Pactum cucumber undefined error
I'm encountering an issue with Pactum Cucumber where I'm getting an undefined error, despite receiving the expected output when testing the same request in the Postman application. Below, I've ...
0
votes
0
answers
50
views
Vuetify | Values does not persist using DOM methods
I am using Vuetify form fields like v-text-field or v-text-area and I have a use case in which am trying to directly update the value of the input fields using DOM methods document.querySelector ...
0
votes
1
answer
164
views
How can I prevent Selenium Webdriver opening multiple instances of Firefox?
I am writing some automated tests using Selenium Webdriver on Node.js. So far they are working fine, but I have one problem: Whenever I run a test (just 1 test), 4 instances of Firefox open. The test ...
0
votes
1
answer
73
views
Step definitions remain 'Undefined' while using Examples keyword despite being defined
I've created the following scenario in my feature file:
Scenario Outline: User can navigate to expected url by selecting the associated link
Given Application configured for testing
...
0
votes
1
answer
444
views
`UnexpectedAlertOpenError` in Selenium Webdriver on Node.js is present even after dismissing the alert
I am using Cucumber.js and Selenium Webdriver JS in a Node.js environment, using Firefox as my browser.
I am trying to test a page that shows an alert on load. I have created a Cucumber step to ...
0
votes
1
answer
106
views
How to run a command that performs an S3 upload AFTER ALL feature files/steps are executed?
I am currently executing some basic performance tests using the following:
js with Webdriverio for web elements identification/asserts
Cucumber for creating steps and execution of feature files/tests
...
0
votes
1
answer
45
views
How do I re-use expressions in Cucumber?
I have this scenario where I want to check if a banner element exists on each page.
I have created a separate banners.js file that contains the (Selenium Webdriver) Javascript that does the check:
./...
0
votes
1
answer
41
views
How do I abstract a function with Selenium's `this.item.findElement()` into another file?
I'm trying to set up a test with Selenium Webdriver and Cucumber.js on Node.js.
I have a check in a homePageSteps.js file to simply see if a banner exists on a page, eg:
Then('there should be a banner'...
0
votes
0
answers
278
views
How can I add dynamic examples into Cucumber feature file
Is it possible to add examples in future file as the result of js function? Or how differently can I generate example and pass them into future file.
In my example:
Examples:
| no. | ...
1
vote
1
answer
4k
views
Run cucumber by tag or run all tests
I am having hard time with running cucumber. I want to run either all scenarios if tags are not passed as CLI argument or certain scenarios according to passed tags as CLI argument.
Here is my config ...
0
votes
1
answer
335
views
Cannot use import statement outside a module in cucumber.js for private npm package
I am using cucumberjs for testing several components of my project which works. However in one step I use a zod schema which is defined in a private npm module:
// in private npm package:
// constant....
3
votes
1
answer
706
views
Multiple TS step definitions in ESM project
I have an ESM project (so "type": "module" in my package.json).
I want to write tests with cucumber and I would like my steps definition to be in ts.
I have this structure :
- ...
0
votes
1
answer
1k
views
Cucumber BeforeAll hook is not being executed
I am using Cucumber with Playwright. I need to launch the Chromium browser via Playwright in BeforeAll hook, and pass the browser instance to page objects so that they can control the browser.
Here ...
3
votes
1
answer
4k
views
Cucumber with playwright does not recognize .TS files in ES2022 module configuration
I'm trying to implement cucumber with playwright tests in that way:
has one cucumber.cjs file which will be my runner
has tests > acceptance > features > {here all .features files}
has tests ...
0
votes
1
answer
124
views
Cannot connect to SQL Server database - Cucumber, mssql nodejs, typescript
I am trying to connect to a SQL Server database but I got an error and it says nothing to me...
This is my Db connection file:
import { error } from 'console'
import sql from 'mssql'
const sqlConfig =...
0
votes
0
answers
223
views
Is it possible to define custom parameter in cucumber with Regular expression?
I know you can define custom parameter type with defineParameterType function in cucumber-js. But only then it can be used with cucumber expressions instead of Regular expressions.
I wonder if it is ...
0
votes
1
answer
314
views
Can not run cucumber-jest features in my project
I am having trouble to run a feature file in my project with jest-cucumber. Since I am using already jest in my project I assume that the issue is some wrong configuration or version conflict.
I am ...
0
votes
1
answer
498
views
Check unused cucumber step definitions
I am using webdriverio with cucumber and would like to clear my project from unused step definitions and code. I tried to use this "cucumber-js --dry-run --format usage" but I received "...
0
votes
1
answer
437
views
Use default run configuration for Cucumber JS
I have one folder with two sets of Cucumber JS tests
- js-tests
- api
- component
- node_modules
...
This folder contains one instance of Cucumber JS and then I'm using run configurations to ...
0
votes
0
answers
1k
views
How to setup cucumber with playwright API testing using typescript
I am unable to use the GET,POST,PUT any http request when I am using the cucumber with playwright. In the step definition I am trying to use the request.get but it says not a function. when I create ...
4
votes
5
answers
8k
views
Custom message for failed assertion in playwright (using cucumber.js)
In project I use node js 20.5.1, playwright 1.37. with cucumber 8.0.0.
I want to add own customer message if expected method return me a failed. I thought I could do it like below:
expect(3),"My ...
0
votes
1
answer
797
views
How to get the failed step of a scenario in cucumber-js?
I am trying to create a custom report, so far I have got these values in my failed.json
{
"status": "FAILED",
"feature": "tc795639 To verify the negative ...
0
votes
1
answer
547
views
How to get LambdaTest session ID from within Playwright tests?
I have automation tests written in Playwright, I'm using CucumberJS with it and my tests are running on LambdaTest. Inside my code I want to print LambdaTest session ID that is generated for each ...
0
votes
1
answer
973
views
Reading dotenv variables in a yaml file in a node project
I'm using Cucumber-js to run tests on browserstack. I'm pretty new to it all, but I'm trying to use dotenv to store the credentials and have my yaml read from the environment variables. It works if I ...
1
vote
1
answer
326
views
Enum as parameter in step definition in Cucumber (Typescript)
Can you tell me is there any way to use enum as parameter in step definition ? :/
e.g.
User opened page on selected {MyEnum} tab'
I found the example how I could create a new parameter on https://...
0
votes
1
answer
408
views
How to generate cucumber-js html report in Memory
I'm using AWS lambda to execute API tests in my project. At the end of the test I'm generating Cucumber HTML report.
Now I want to generate cucumber-js HTML report in memory and read the HTML report ...
0
votes
1
answer
539
views
Page Object Manager in Cucumber-js with Typescript
I am writing Playwright Cucumber TypeScript framework (stack must be like this, even though we don't do BDD at all).
I created POManager to manage all Page Object classes (what do you think about this ...