Capybara Sessions

by Andreas Knöpfle over 2 years ago
How you can simulate multiple parallel users with capybara.

Have you ever needed to write intgration tests that test the interaction of multiple users in parallel with Capybara. 

Just found out how it works: 

 


Capybara.session_name = "Person"

% some integration test
% navigate somewhere, click some links, login etc

Capybara.session_name = "Administrator" 

% now we are in a new session, 
% just like as we started the integration 
% test just now; but the other session lives as well

Capybara.session_name = "Person"

% and voila, we are in the old session again.
% simple is it ?

 

Back

Announcing treasures.io

Discover the internet of islands and sail through the online ocean.


asdf Version Manager & Postgres UUID

Compiling Postgres with UUID to use in asdf


Lombok Impressions

Our trip to the Indonesian island Lombok in October 2015


Deploying Phoenix app with dokku-alt and Dockerfile

My experiences in deploying a Elixir Phoenix app on my dokku-alt instance.


Moved to netcup and dokku-alt

How i moved this page to run on netcups vhosts with dokku-alt Docker instances