Drupal.org Testing Policy for DrupalCI

In order to satisfy the variety of use-cases for testing while keeping the cost of the testing infrastructure manageable, we have established this testing policy which says what we are willing to support, and additionally what the the user experience should be for working within this framework. From a high level, this policy outlines: what code is tested, in which environments, what tests are run, when we run them, and how the end users configure their projects for these options.

Generating database fixtures for D8 Migrate tests

When writing tests for your D6 / D7 to D8 core migrations, use the database fixtures that are included in Drupal 8 core:
* core/modules/migrate_drupal/tests/fixtures/drupal6.php
* core/modules/migrate_drupal/tests/fixtures/drupal7.php

This is your D6 / D7 source data to write your tests against. If you need extra test data in these database sources, you can modify the fixture using the following method.

Comparison with PHPUnit mocks

Now that we saw how you can use prophecy as a start, let's compare it with the often other used mocking framework which comes with phpunit since basically ever

Using Prophecy

Mocking with Prophecy in PHPUnit

A good practice in test driven development is unit testing. A unit test tests a small particular part of the code (think of a particular class), and JUST that. For other interacting code you inject the dependencies not as real objects, but rather mocks, which are kinda like simulated objects.

Running DrupalCI Locally

This page helps you set up your own instance of the Drupal Testbot for your own local testing purposes. Please be advised that these instructions are written for Unix-like environments in mind.

Using simplytest.me as a project demo

Evaluate Drupal projects online

Target audience: Drupal project maintainers.

On Drupal project pages you might find a 'Try a demonstration' link to evaluate it. A good project demo is one where you can fiddle with the settings and for this you need to provide admin access in a temporary sandbox. This is where simplytest.me comes in handy by allowing anyone to create a temporary Drupal website with any module, theme or distribution.

Pages

Subscribe with RSS Subscribe to RSS - testing