Giter Site home page Giter Site logo

jazzdrive3 / drupal_tests_node_example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deviantintegral/drupal_tests_node_example

0.0 1.0 0.0 462 KB

An example implementation of drupal_tests using Drupal's node module

License: GNU General Public License v2.0

JavaScript 2.08% CSS 0.42% PHP 95.99% HTML 1.40% Gherkin 0.11%

drupal_tests_node_example's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.