Posted 5 months ago. Visible to the public.

How to: Run geordi in a single proccess with parallel test setup

Geordi uses parallel_tests if available for running the test suite. To debug an application it is very unhandy to have multiple processes as your terminal I/O will not work as expected once a breakpoint is hit.

Even parallel_tests support an option to enable a single process run, it is not possible to pass this option through geordi. But you can set the number of processes via ENV variable manually:

Copy
PARALLEL_TEST_PROCESSORS=1 bundle exec geordi cucumber

Alternatively, you can run the vanilla cucumber command with Geordi's VNC niceties with

Copy
geordi firefox b cucumber geordi chrome b cucumber # Alias

The suggestion solution is only necessary if it is relevant to run all tests. Single tests are always run single threaded:

Copy
bundle exec geordi cucumber features/some.feature

Use cases:
- Somewhere in the test run a deprecation warning is thrown and you want to find out which test throws this deprecation warning.


There are other workarounds, too:
- Rspec: bundle exec rspec
- Cucumber: DISPLAY=:17 bundle exec cucumber (Just like geordi uses port 17 for VNC to not see a test browser)

By refactoring problematic code and creating automated tests, makandra can vastly improve the maintainability of your Rails application.

Owner of this card:

Avatar
Emanuel De
Last edit:
5 months ago
by Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Emanuel De to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more