Open mollerhoj opened 7 years ago
You probably don't have the spec file named correctly. It needs to end with _spec.js
.
I'm experiencing the same problem.
Tests work as expected in the browser:
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
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
Is there anyway to fail teaspoon
command with non-zero output when it finds 0 tests?
@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.
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:
I've tried with capybara_webkit and phantomjs. No luck