Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress should fail if no spec files are found #515

Closed
bahmutov opened this issue May 25, 2017 · 2 comments
Closed

Cypress should fail if no spec files are found #515

bahmutov opened this issue May 25, 2017 · 2 comments

Comments

@bahmutov
Copy link
Contributor

  • Cypress Version: 0.19.2

feature

Current behavior:

Imagine you have no spec files for some reason. cypress run will happily report 0 tests and will finish with exit code 0

Expected behavior:

Having nothing to run is a sign of misconfiguration / missing files. Cypress should error if there are no spec files.

@bahmutov bahmutov added cli type: enhancement Requested enhancement of existing feature type: feature New feature that does not currently exist labels May 25, 2017
@zakhenry
Copy link

This situation can also occur if the browser crashes out of memory - I had a OOM crash which didn't crash cypress somehow, causing there to be 0 tests run an a successful build.

Tue, 13 Feb 2018 21:37:53 GMT cypress:server:timers queuing timer id 18 after 85000 ms
Tue, 13 Feb 2018 21:37:53 GMT cypress:server:timers child received timer id 18
Tue, 13 Feb 2018 21:38:03 GMT cypress:server:timers child sending timer id 15
Tue, 13 Feb 2018 21:38:18 GMT cypress:server:timers clearing timer id 18 from queue { '18': { args: [], ms: 85000, cb: [Function] } }
Tue, 13 Feb 2018 21:38:18 GMT cypress:server:timers queuing timer id 19 after 85000 ms
Tue, 13 Feb 2018 21:38:18 GMT cypress:server:timers child received timer id 19
Tue, 13 Feb 2018 21:38:28 GMT cypress:server:timers child sending timer id 16
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
 2: 0x7f7d06c5d2a7 [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
 3: v8::Utils::ApiCheck(bool, char const*, char const*) [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
 5: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
 6: v8::internal::Factory::NewScopeInfo(int) [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
 7: v8::internal::ScopeInfo::Create(v8::internal::Isolate*, v8::internal::Zone*, v8::internal::Scope*) [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
 8: 0x7f7d0667e5ce [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
 9: v8::internal::Compiler::Compile(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag) [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
10: 
<--- Last few GCs --->

  220086 ms: Mark-sweep 1412.8 (1522.0) -> 1412.7 (1522.0) MB, 1481.1 / 0.0 ms [allocation failure] [GC in old space requested].
  221399 ms: Mark-sweep 1412.7 (1522.0) -> 1412.7 (1491.0) MB, 1312.6 / 0.0 ms [last resort gc].
  222736 ms: Mark-sweep 1412.7 (1491.0) -> 1412.7 (1491.0) MB, 1336.4 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

    2: arguments adaptor frame: 1->3
Security context: 0x1415373cc421 <JS Object>
    3: /* anonymous */ [fs.js:~494] [pc=0x2529fe18ed5e](this=0x19e6d15bd471 <an Object with map 0x323bdab9f121>,path=0x218401e16f39 <String[62]: /builds/dev/frontend/node_modules/aws-sdk/lib/services/s3.d.ts>,options=0x1415373d5ed1 <String[4]: utf8>)
    4: readFileSync [ELECTRON_ASAR.js:511] [pc=0x2529fd8889dd](this=0x19e6d15bd471 <an Object with map 0x323b...

v8::internal::Runtime_CompileLazy(int, v8::internal::Object**, v8::internal::Isolate*) [/builds/dev/frontend/node_modules/cypress/dist/Cypress/libnode.so]
11: 0x2529fd206147
Tue, 13 Feb 2018 21:38:43 GMT cypress:server:timers clearing timer id 19 from queue { '19': { args: [], ms: 85000, cb: [Function] } }
Tue, 13 Feb 2018 21:38:43 GMT cypress:server:timers queuing timer id 20 after 85000 ms
Tue, 13 Feb 2018 21:38:43 GMT cypress:server:timers child received timer id 20
Tue, 13 Feb 2018 21:38:53 GMT cypress:server:timers child sending timer id 17
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers clearing timer id 20 from queue { '20': { args: [], ms: 85000, cb: [Function] } }
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers queuing timer id 21 after 85000 ms
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers child received timer id 21
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers clearing timer id 21 from queue { '21': { args: [], ms: 85000, cb: [Function] } }
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers queuing timer id 22 after 85000 ms
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers child received timer id 22
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:project onSetRunnables
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:project runnables null
Tue, 13 Feb 2018 21:38:58 GMT cypress:server loading reporter spec
Tue, 13 Feb 2018 21:38:58 GMT cypress:server spec is Mocha reporter
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers clearing timer id 22 from queue { '22': { args: [], ms: 85000, cb: [Function] } }
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers queuing timer id 23 after 85000 ms
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers child received timer id 23
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:project onMocha start

Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers clearing timer id 23 from queue { '23': { args: [], ms: 85000, cb: [Function] } }
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers queuing timer id 24 after 85000 ms
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:project onMocha end
Tue, 13 Feb 2018 21:38:58 GMT cypress:server:timers child received timer id 24

  0 passing (38ms)


  (Tests Finished)

  - Tests:           0
  - Passes:          0
  - Failures:        0
  - Pending:         0
  - Duration:        0 seconds
  - Screenshots:     0
  - Video Recorded:  true
  - Cypress Version: 1.4.1
Tue, 13 Feb 2018 21:38:59 GMT cypress:server:timers queuing timer id 25 after 30000 ms
Tue, 13 Feb 2018 21:38:59 GMT cypress:server:timers child received timer id 25
Tue, 13 Feb 2018 21:38:59 GMT cypress:server:timers clearing timer id 25 from queue { '24': { args: [], ms: 85000, cb: [Function] }, '25': { args: [], ms: 30000, cb: [Function: bound cleanupWebsocketResources] } }
Tue, 13 Feb 2018 21:38:59 GMT cypress:server:timers clearing timer id 24 from queue { '24': { args: [], ms: 85000, cb: [Function] } }
Tue, 13 Feb 2018 21:38:59 GMT cypress:server:timers clearing timer id 24 from queue {}


  (Video)

  - Started processing:   Compressing to 32 CRF
  - Finished processing:  /builds/dev/frontend/cypress/videos/hcuvv.mp4 (11 seconds)
Tue, 13 Feb 2018 21:39:14 GMT cypress:server:headless Should copy Circle Artifacts? false


  (All Done)

Tue, 13 Feb 2018 21:39:14 GMT cypress:server about to exit with code 0
2018-02-13T21:39:14.263Z cypress:cli Stopping XVFB
Done in 270.31s.

@jennifer-shehane jennifer-shehane added the stage: ready for work The issue is reproducible and in scope label Sep 14, 2018
@jennifer-shehane
Copy link
Member

cypress run now throws an error immediately when no spec files are found.

$ cypress run
Can't run because no spec files were found.

We searched for any files inside of this folder:

/Users/jennifer/Dev/cypress-tests/foo

Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants