This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/test-driven-drupal.md

57 lines
2.6 KiB
Markdown
Raw Normal View History

2018-05-14 15:02:33 +00:00
---
layout: page
title: 'Test Driven Drupal: The Book'
mailchimp_url: 'https://oliverdavi.us18.list-manage.com/subscribe/post?u=b4ac8dd177796d37b93f9c285&id=033c84e0d5'
contact_email: 'oliver@testdrivendrupal.com'
---
2018-09-05 22:13:50 +00:00
{% block content %}
2018-05-28 23:33:00 +00:00
<div class="markdown" markdown="1">
2018-05-14 15:02:33 +00:00
Having [given talks][1] and [written blog posts][0] about automated testing in Drupal, Im currently in the planning phase of a book and potentially some accompanying screencasts about it, focussing on Drupal 8.
Im still thinking about what use-cases to cover and examples to include, but here are some of the things Im considering:
- What things to test, and what not to test
- The different types of available tests, and when to use each
- How to write testable code
2018-05-15 12:18:24 +00:00
- What happens when I run a test?
2018-05-14 15:02:33 +00:00
- How to run tests in the Drupal UI
- How to run tests with the `run-tests.sh` script
- How to install, configure and run tests with PHPUnit in Drupal 8
2018-05-15 12:18:24 +00:00
- Viewing HTML from run tests
2018-05-14 15:02:33 +00:00
- How to write your first test
2018-05-15 12:18:24 +00:00
- Debugging tests
2018-05-14 15:02:33 +00:00
- How to organise your test files
- Selecting the right base class and using test traits
- Writing your own base test classes, traits and assertions
- Managing dependencies for your tests (fields, configuration)
- Creating users, checking access with roles and permissions
- Creating pages and blocks with Views and testing the output
- Creating pages with routes and controllers and testing the output
- Testing custom plugins
- Testing queuing items and processing queues
- Testing sending emails
- Testing custom Twig filters and functions
<!-- - Testing data migrations -->
<!-- - Building and testing APIs using RESTful web services module -->
- Running tests as part of your continuous integration pipeline
Ill most likely be publishing it via Leanpub, and will be sending free chapters, early-bird discounts and links to screencasts and blog posts as I write the book to subscribers of the mailing list.
If you have questions or would like to suggest something for me to include in the book, please <a href="mailto:{{ page.contact_email }}">contact me</a>.
## Mailing List
2018-05-15 23:06:46 +00:00
Enter your email address to subscribe to the Test Driven Drupal mailing list.
2018-05-28 23:33:00 +00:00
</div>
2018-05-15 23:06:46 +00:00
2018-09-05 22:13:50 +00:00
{% include 'pages/book/signup-form' %}
{% endblock %}
2018-05-14 15:02:33 +00:00
2018-09-05 22:13:50 +00:00
{% block scripts %}
<script type='text/javascript' src='//s3.amazonaws.com/downloads.mailchimp.com/js/mc-validate.js'></script>
<script type='text/javascript'>(function($) {window.fnames = new Array(); window.ftypes = new Array();fnames[0]='EMAIL';ftypes[0]='email';fnames[1]='FNAME';ftypes[1]='text';}(jQuery));var $mcj = jQuery.noConflict(true);</script>
{% endblock %}
[0]: /blog/tags/testing
[1]: /talks/tdd-test-driven-drupal
[2]: /contact