question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feature startup speed

See original GitHub issue

Longtime cucumber user, but relatively new to cypress so first, thank you for this!

It seems that cypress resets the world between each feature file. That results in some noisy logging after each feature…

  Running: user-dropdown/logout.feature...                                               (24 of 25) 

  [β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬]

  2 passing (3s)


  (Results)

  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  β”‚ Tests:        2                            β”‚
  β”‚ Passing:      2                            β”‚
  β”‚ Failing:      0                            β”‚
  β”‚ Pending:      0                            β”‚
  β”‚ Skipped:      0                            β”‚
  β”‚ Screenshots:  0                            β”‚
  β”‚ Video:        true                         β”‚
  β”‚ Duration:     3 seconds                    β”‚
  β”‚ Spec Ran:     user-dropdown/logout.feature β”‚
  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

I could live with the logging, but my main problem is that this more than doubles the execution time for the test run of all features.

The tests are pretty fast once they get going, but there is a noticeable lag to get them started.

Is there any way to organization features and/or scenarios in a way that it runs them all in the same β€œtest run”.

I am running the oldschool step definition structure and I noticed the bit about startup speed in the readme. Is that what I’m seeing here? We have 110 step definitions used across 25 feature files.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
darrinholstcommented, Jul 31, 2019

@lgandecki sorry for the delay. Here is an example repo using the features from this repo itself

https://github.com/dholst/cypress-cucumber-preprocessor-example.

I added an index.features file and specified which way I want to run them in the --spec config.

Here is the normal test run - https://gist.github.com/darrinholst/be3eaf9016aa63c094111e0744d56ca9 which took 4.25 minutes.

Here is the run with my changes - https://gist.github.com/darrinholst/80ea8820a12b0185e7d36f2ac7f03bb1 which took 22 seconds.

You’ll notice that there was 1 failure there which is due to this project’s take on isolated step definitions. Since all the features run in one context this way all the step definitions have to be loaded which kind of breaks the isolation. I think there is probably a way to fix it by passing all the required step definitions to the createTestsFromFeature function and requiring them in there…maybe.

I don’t use that feature and I’d be curious to know what existing cucumber users think of it. The official stance from cucumber developers themselves is that it’s an anti-pattern, but that’s a discussion for another day. πŸ˜„

I hope the example repo and the results show what I was trying to do and the speed improvements that are possible.

1reaction
amitguptagwlcommented, Dec 2, 2019
  1. To use bundled file, should I create empty index.features file in features folder?
npx cypress run --spec \"**/*.features\"

Above command hangs.

  1. What would be the syntax if I want to use while giving the list of tags to run
npx cypress-tags run -e TAGS='not @Ignore' --spec \"**/*.features\"
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Speed Up Windows 10 Startup in 3 Simple Steps
Our first tip on how to speed up Windows 10 startup is to turn on the Fast Startup feature. It's a little on...
Read more >
What Is Windows Fast Startup? (And Why You Should Disable It)
Windows Fast Startup is a feature that lets you boot your PC quicker than normal bootup. Introduced with Windows 8 in 2016, it...
Read more >
Get Moving: How to Make Your Windows PC Boot Faster
Open Control Panel and choose Power Options > Choose what the power buttons do. You should see a checkbox next to Turn on...
Read more >
How to disable Windows 10 fast startup (and why you'd want to)
How to enable and disable fast startup on Windows 10 ; Right-click the Start button. Click Search.
Read more >
How to Speed Up Boot Time on Your PC or Laptop - AVG
The Windows 10 fast startup feature is a built-in way to speed up boot times. It's been part of Windows since Windows 8...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found