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

No specs found in CLI #527

Open
mollerhoj opened this issue Jul 27, 2017 · 5 comments
Open

No specs found in CLI #527

mollerhoj opened this issue Jul 27, 2017 · 5 comments
Labels

Comments

@mollerhoj
Copy link

Hi, I'm new to this gem. I tried setting it up for my project. It seems to work fine the browser, but I can't get the CLI to work. Running:

bin/rake teaspoon

returns:

Starting the Teaspoon server...
Teaspoon running default suite at http://127.0.0.1:60536/teaspoon/default

Finished in 0.00100 seconds
0 examples, 0 failures

I've tried with capybara_webkit and phantomjs. No luck

@jwlms
Copy link

jwlms commented Aug 10, 2018

You probably don't have the spec file named correctly. It needs to end with _spec.js.

@rmm5t
Copy link

rmm5t commented Sep 6, 2018

I'm experiencing the same problem.

Tests work as expected in the browser:

teaspoon javascript test runner 2018-09-06 16-30-25

But don't show anything in the CLI. However, I do see console.log output in the CLI from the application, but no console output from the actual tests themselves.

Starting the Teaspoon server...
Puma starting in single mode...
* Version 3.12.0 (ruby 2.4.4-p296), codename: Llamas in Pajamas
* Min threads: 1, max threads: 1
* Environment: test
* Listening on tcp://127.0.0.1:62040
Use Ctrl-C to stop
Teaspoon running default suite at http://127.0.0.1:62040/teaspoon/default
<app console log output here>
<app console log output here>


Finished in 0.00200 seconds
0 examples, 0 failures

@rmm5t
Copy link

rmm5t commented Sep 7, 2018

I found a workaround.

The problem (at least that I was experiencing) was that the phantomjs driver wasn't working. When running the suite with that driver, the tests weren't being found (or loaded) for some reason. I confirmed this when trying to run phantomjs manually using the phantomjs.js script that ships with teaspoon.

I switched to the selenium driver (tied to chrome), and things are working as expected now.

# teaspoon_env.rb  
  config.driver = :selenium
  config.driver_options = { client_driver: :chrome }

Starting the Teaspoon server...
Puma starting in single mode...
* Version 3.12.0 (ruby 2.4.4-p296), codename: Llamas in Pajamas
* Min threads: 1, max threads: 1
* Environment: test
* Listening on tcp://127.0.0.1:64744
Use Ctrl-C to stop
Teaspoon running default suite at http://127.0.0.1:64744/teaspoon/default
..

Finished in 0.00900 seconds
2 examples, 0 failures

Yay! 🎉

@saikumar-everest
Copy link

Is there anyway to fail teaspoon command with non-zero output when it finds 0 tests?

@mathieujobin
Copy link
Collaborator

@saikumar-everest not that I know of.
I don't think rspec or cucumber complains about having ran no tests either, but I could be wrong.

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

No branches or pull requests

5 participants