feature startup speed
See original GitHub issueLongtime 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:
- Created 4 years ago
- Comments:17 (6 by maintainers)
Top GitHub Comments
@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.
Above command hangs.