Red Crackle Blog

Testing blocks using Red Test

Have you ever worked on a large project where out of the blue, one day, the client says that editors are not seeing a block of new blog posts in right sidebar on so and so page? It's generally pretty easy to fix this problem. Just go to the configuration form of that block and see what the conditions are for displaying the block. Or it could be a block written by you in a custom module and then you'll need to check hook_block_view() in your module to see where the problem lies. But you are still unhappy because the bug was caught on production.

15 minutes to your first Drupal integration test

This post will help you write and run your first Drupal integration test using Red Test framework in less than 15 minutes. By end of this post, you will be able to write an automated test to make sure that superuser is able to create two pieces of content, one published and the other unpublished. We'll test that anonymous user is able to view the published content and is not able to view the unpublished content. You can follow along these steps on any Unix or Mac machine and have automated tests running in a matter of minutes.

How to Install Red Test

In previous article, we explained why integration tests will greatly benefit your Drupal automated testing efforts and also announced that we are making Red Test, an integration testing framework for Drupal, open-source. In this article, you'll learn how to install Red Test to get started with your integration tests for Drupal. Here are the steps:

1) Go to your Drupal root and clone the github repository.

Why you should be writing integration tests for Drupal

In our previous blog post, we made a pretty big claim that Drupal 7 unit testing is broken. You probably knew that already but you know the importance of testing a big Drupal project as well. So like us, you started using Behat and Selenium for functional and user acceptance testing. It worked well for a while but now there are so many test scenarios that you are finding it difficult to maintain all of them. To make it worse, your test suite takes hours and hours to complete.

Working with the Drupal Calendar Module

In this article, we will create a basic view to display a Drupal calendar with events.

By the end of this article, you will be able to configure a basic Drupal event calendar for your website that looks like this:

Drupal Event Calendar

In order to get started, I want you to download and unzip the following modules to your Modules folder:

1.Drupal Calendar Module (drupal.org/project/calendar)

How to add an Ubuntu apt-get key from behind a firewall

Have you ever tried to install an apt package from a third-party repository from behind a firewall? If you run apt-key command with a key server, firewall will block it. Read this post to find out how to get past the firewall to import key for a third-party apt package.

Code quality guidelines for large Drupal projects

Are you wondering what code quality guidenlines your Drupal developers should follow in addition to Drupal's coding standards to make the code readable, secure and performant? What are the best practices so that developers can follow each other's code easily and make code review faster?

Working With The Drupal Google Analytics Module

Google Analytics is the world's most popular tool to gain quality online insights. Drupal offers a module to leverage its potential to the fullest. In this article, we will help you configure the Drupal Google Analytics module.

The biggest advantage this module offers is that you don’t have to copy the tracking code to each page you wish to track. Pasting the Tracking ID in the module’s configuration page will be enough.

 
Ready to get started?REQUEST A QUOTE