Skip to content

An example implementation of drupal_tests using Drupal's node module

License

Notifications You must be signed in to change notification settings

deviantintegral/drupal_tests_node_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example implementation of Drupal Tests on CircleCI

drupal_tests enables quick, easy, and repeatable tests for individual Drupal modules. While it can replace the Drupal testbot for projects outside of Drupal.org, it's most appropriate for private modules shared among multiple sites or an internal distribution.

This repository shows how to run module tests, using the existing tests for the Drupal 8 node module. As well, a sample Behat test has been added to the node module demonstrate Behat tests and screenshot capture.

This repository also overrides the default variable for the module name, as I didn't want to simply call this GitHub repository 'node'.

Walk through the notes below to see how this works!

Commits of note

  1. f95125 shows the files that were added after running setup.sh. At the time, 0.2.0 was the newest tag of drupal_tests.
  2. 3d83dc shows overriding test commands.
  3. 75374c shows a basic Behat test viewing a node.

CircleCI jobs of note

  1. #36 shows running Unit and Kernel tests, with all passing. Every job saves the composer.lock file so exact versions in tests can be reproduced later if needed.
  2. #37 shows code quality checks, including Drupal coding standards which the Node module currently fails.
  3. #38 shows the results of our Behat tests.
    • The artifacts of the job contain screenshots of each step. Each feature is combined into one long image to easily scroll through.
  4. #39 shows code coverage results from Unit and Kernel tests. Code coverage is only generated if the prior Unit and Kernel test job passes.
    • The artifacts of the job contain both the XML and HTML output from PHP unit. The coverage dashboard shows good classes to target for testing.

About

An example implementation of drupal_tests using Drupal's node module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published