...seems to forget cookies / sessions when you run it with Selenium check if the test travels in time like here: Given the date is 2017-10-20

makandracards.com

...so it should be a drop-in replacement for all your projects. For Rack::Test the step no longer uses XPath so you should be able to understand it when...

makandra dev

In order to go back one page in your Cucumber tests, you can use the following step definition for Capybara: When(/^I go back$/) do visit page.driver.request.env['HTTP_REFERER']

...on your production site only. Otherwise it will spoil your statistics. To prevent this, test for the right environment and place the JS-code afterwards: - if Rails.env.production? :javascript

...parallel makes some trouble with PDF generation. Use geordi rspec spec to force sequential tests for the whole application or failed specs only. geordi rspec RTeX::Document::GenerationError in '...'

opensoul.org

Great presentation about writing Javascript like you write everything else: Well-structured and tested. JavaScript is no longer a toy language. Many of our applications can’t function without it...

...and love work just as well in JavaScript as they do any other language. Test driven development forces us to write modular, decoupled code...

...handler. The attached initializer makes I18n just raise any exception (in a development or test environment...

github.com

...get full SQL syntax highlighting in the editor of your choice and can easily test your SQL in the database console during development. https://robots.thoughtbot.com/announcing-scenic--versioned-database-views-for-rails Notes: PostgreSQL only

blog.plataformatec.com.br

...version specially created for mobiles, such as the iPhone. This specific application was entirely tested with Capybara, Steak and Selenium Webdriver. Although the test suite wasn’t the fastest one...

...in the world, the web application was very well tested, and to guarantee that we would also be testing the mobile version, we would have to simulate an iPhone user...

Generally, Selenium tests use the browser to interact with the page. If it's unavailable, a timeout error is thrown. Now, consider a scenario like this: @javascript Scenario: Receive...

Errors happening on the target page are not "visible" to the test If the browser is still waiting for further responses from the server (like after following...

To test if you can connect to a host using password authentication and explicitly deny public key authentication: ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no user@host This also works...

makandra dev
github.com

...this to run a full setup. After basic setup (see geordi help setup), runs tests and loads a staging dump into the database. geordi security-update Guides through our security...

...Then console step from spreewald in combination with geordi vnc from geordi to debug tests within a real browser. Sometimes when you type in the browser it suddenly disappears. You...

I recently encountered the error above when I was running selenium tests. Thanks to a post on stackoverflow I found out that clearing all files in tmp/cache in my project...

You should test the callback methods and its correct invocation in two separate tests. Understand the ActiveRecord note before you move on with this note. Say this is your Spaceship...

...docked => :en_route end before_transition :on => :launch, :do => :release_docking_clamps end end Testing that a state_machine callback is called at the correct point in a record's...

gist.github.com

Since we're using RSpec on most projects, I've transformed the test for it to a spec. See the attached link...

perlstalker.vuser.org

While you can set your own font in your terminal or other tools, it will not change the default "Monospace...

Don't simply test for the presence of the magic Paperclip attribute, it will return a paperclip Attachment object and thus always be true: - if user.photo.present? # always true

makandra dev
github.com

...developed as a C extension, so it's fast. And it has a full test suite so it's reliable. Note that byebug works only for ruby 2.0.0 or newer...

github.com

When running tests via parallel_tests, you may encounter an error: cannot load such file -- parallel_tests/gherkin/runtime_logger Error creating formatter: ParallelTests::Gherkin::RuntimeLogger (LoadError) This will happen when you upgrade...

Code coverage is the ratio of code lines kissed by a test vs. the total number of lines in your source files. This sounds meaningful, but isn't. Total coverage...

...For Spreewald >= 1.9.0 it is as described in Solution 1. When doing integration testing with cucumber and selenium you will often encounter problems with timing - For example if your test...

...runs faster than your application, html elements may not yet be visible when the test looks for them. That's why Spreewald (a collection of cucumber steps) has a concept...

...below by copying it somewhere to your .bashrc. # Usage: ptcommits 123456 function ptcommits { if test "$1" then local PTID=$(echo "$1" | grep "[0-9]*" -o) # Allow URLs git log --oneline...

...the visibility: hidden rule is not checked at all. Selenium Selenium is an integration test framework that consists of different tools to test websites and web-applications with real browsers...

...method? Due to the fact that a real browser is used for your website tests, the browser itself is aware of all visible and hidden elements since it parses CSS...