Skip to content

Add Drupal test traits library to GovCMS #1481

@acbramley

Description

@acbramley

What value does this module/package add to GovCMS?

Allows writing phpunit tests that run against a preinstalled site (i.e against a database image) to test site functionality in PHPUnit easily without having to setup site configuration or install an existing site in a test.

Writing automated tests is crucial for the stability of a website. Without this library, writing phpunit tests for a preinstalled site is cumbersome. Behat tests are an alternative but are much more restrictive and not ideal for testing complex business logic or functionality.

https://git.drupalcode.org/project/dtt

Is the module Drupal 10 compatible?
Yes, it's a library

Please provide a brief outline of what this module does.
Provides traits that can be included in PHPUnit tests in order to run a test against an already installed site.

Who does this module benefit:
[ ] end users
[ ] content editors
[x] site builders
[ ] themers
[x] developers

How could you provide/replicate the functionality of this module using alternative methods, eg in your theme?
Copy all the code from the library into tests/phpunit

If this module styles or alters HTML or JavaScript output, can the functionality be provided via the theme? What alternatives have you considered.
N/A

What is the maintenance and support status of the module. Describe the issue queue activity.
Actively maintained

What permissions are needed to utilise the module (and are any new permissions provided by the module)?
N/A

Does the module modify the database structure and/or store additional metadata on nodes or other entities? If so, why? What are the risks for future updates?
No

Is the module designed to capture anonymous user data?
No

Is the output of the module typically fully cacheable? Would the inclusion of this module potentially render pages uncacheable.
N/A

What is your assessment of the quality of this module, the contribution history of the module's maintainers, and the uptake of the module within the Drupal community?
Very high.

Additional information
This is a dev requirement only, it would not be installed on govcms environments, only in CI.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions