makandra dev
filippo.io

Enter the hostname of a server to test it for CVE...

blog.buildbettersoftware.com

Mornings can be rough. To make them a little easier, leave yourself a failing test if your work isn’t finished. When you come back to the project, it makes...

log.reflectivesurface.com

The argument that using tests is a ideologic waster of time fails when one considers how it can help to insure architectural decisions...

netalive.org

I brought up the question whether tests should call the translation API when checking for the presence of a string...

tech.puredanger.com

Unit tests are to refactoring like a drop cloth is to painting. Both feel like more work at first but ultimately save you time by allowing you to move faster...

stackoverflow.com

...no way to do it in Capybara, unfortunately. But if you're running your tests with the Selenium driver (and probably other drivers that support JavaScript), you can hack it

slideshare.net

Interesting talk about a team that integrated automated security testing into their BDD workflow. There is also a video of the talk...

makandracards.com

Updated the card with our current best practice (shared app code and specs via symlinks).

makandracards.com

Our rcov:all task for aggregated RSpec/Cucumber coverage was overhauled extensively. Among other things it now works for Rails 2...

github.com

...app such as PHP, Perl, Java / JEE, etc. I like using cucumber for functional testing so I put together this project structure to use as a starting point for testing...

jqueryElement.is(':checked')

freelancefolder.com

...this article we’ve listed 7 fresh and simple tools for cross-browser compatibility testing, tools that actually make this stuff pretty easy. Not only that, but every single one...

celerity.rubyforge.org

Celerity is a JRuby wrapper around HtmlUnit – a headless Java browser with JavaScript support. It provides a simple API for...

gusiev.com

What do we expect from the custom finder? We expect that it should find assets A, B, C and should...

makandra dev

Test suites usually grow over time as more and more development time is spent on a projects. Overall run-time and performance of Cucumber suites in turn increases, too.

When testing with Cucumber / Caypbara, iframes are ignored, so you can't interact with them. To interact with your iframe, you have to explicitly tell your driver to use it...

Geordi now supports our solution for running Selenium tests without having Firefox or Chrome windows popping up all over your workspace. This will stop Selenium windows from appearing on your...

...Understand the gem Make your changes Bump the version number Update the changelog Run tests and commit Make a pull request, or release the gem Let's look at these...

...version switch, an "if Rails version < 4 do this, else do that". Gemika (see Tests below) can help you with that, but still keep these parts as short as possible...

makandra dev

...you want to spy on a function that is imported by the code under test. This card explores various methods to achieve this. Example We are going to use the...

// client.js import { hello } from 'lib' function helloTwice() { hello() hello() } export helloTwice In our test we would like to show that helloTwice() calls hello() twice. We find out that it...

Validations should be covered by a model's spec. This card shows how to test an individual validation. This is preferrable to save an entire record and see whether it...

Recipe for testing any validation In general any validation test for an attribute :attribute_being_tested looks like this: Make a model instance (named record below) Run validations...

...of how RSpec works (short story: instance_eval). Negative example: describe Notifier do class TestRecord < ApplicationRecord # DO NOT do this! # ... end let(:record) { TestRecord.new }

end # TestRecord will exist here...

...class with the same name in another spec. Generally speaking, you don't want tests to pollute the global namespace in the first place. Below are three examples how you...

...ETags can again match. Before I make this change I like to add a test that ensures I did it correctly. For this add the following code to spec/requests/default_etag_spec.rb. You...

...ActionView::Base).to receive(:image_path).and_return('image') # CSRF protection is disabled in tests by default. Activate it for this spec as # randomly masked CSRF tokens are a major...