QA Account Setup

There is no Drupal 7 version of the QA Accounts module so the accounts must be set up by hand. Create the two QA accounts:

  1. Open the qaUsers.json file located in test/data.
  2. Create the accounts listed there in the Drupal UI at /admin/people/create and provide custom permissions, if desired.

Playwright Framework Setup

  1. Install Playwright first; see Installation
  2. Configure the playwright.config.js file.

    1. Set the baseUrl:
    module.exports = defineConfig({
              use: {
                /* Base URL to use in actions like `await page.goto('/')`. */
                baseURL: 'https://performantlabs.com',
                ...
    } }

Entity Tests Setup

For these tests:

(ATK-XX-1110) Create, update, delete a node via the UI.

(ATK-XX-1120) Create, update, delete a taxonomy term via the UI.

(ATK-XX-1130) Create, update, delete an image via the UI.

Enable Automated Testing Kit D7 so that the included hook can insert the nid, tid and mid into the page HTML.

Contact Us Test Setup

(ATK-XX-1050) Contact Us form accepts input, sends email uses the contact form built into D7. Enable the Contact module that is part of core.

  • Form configuration, including email handling, is located at /admin/structure/contact.
  • By default, the Contact Form is located at <your site>/contact
  • To use this test, configure email sending with SMTP emailer and obtain an Ethereal.email account; place the email address and password from Ethereal into etherealUser.json.
  • The email to the administrator will be received at Ethereal.email and verified (using a unique token).

Error Page Tests Setup

(ATK-XX-1060) Validate 403 page appears expects:

  • create a Basic Page node with the alias /403-error-page with the Body containing the text "ATK 403 Error Page"
  • In admin/config/system/site-information, set Default Default 403 (access denied) page to"/403-error-page"

(ATK-XX-1061) Validate 404 page appears expects:

  • create a Basic Page node with the alias /404-error-page with the Body containing the text "ATK 404 Error Page"
  • In admin/config/system/site-information, set Default Default 404 (not found) page to"/404-error-page"

Media Entity Tests

(ATK-XX-1130) Create, update, delete an image via the UI expects:

  • Enable the Media module.

XML Sitemap

(ATK-XX-1070) Return # of sitemap files; fail if zero and (ATK-XX-1071) Regenerate sitemap files expect:

  • Create at least one piece of publicly available content (an Article or Basic page are both fine).
  • Enable the XML Sitemap module.

Setting Up SMTP Email

If you will be testing round-trip emails (such as the registration or forgot password emails), set up an Ethereal account and configure the Drupal SMTP module:

  1. Get an account here: https://ethereal.email/create
  2. Additional help with configuration is here: https://ethereal.email/help
  3. Install SMTP module.
    1. Configure at admin/config/system/smtp.
    2. Enable the module by setting "Turn this module on or off" to On.
      Set "Turn on delivery of emails" to On.

      Use the following configuration then click Save.

      SMTP server: smtp.ethereal.email
      SMTP backup server: <leave blank>
      SMTP port: 587
      Use encrypted protocol: Use TLS

      SSL CONTEXT OPTIONS: <leave defaults>

      SMTP AUTHENTICATION: Username: <email_from_ethereal>
      Password: <password_from_ethereal>

      E-MAIL OPTIONS
      E-mail from address: <any email or leave blank for default>
      E-mail from name: <any email or leave blank for default>

      SMTP CLIENT SETTINGS
      Hostname: <leave blank>
      HELO: <leave blank>

      SEND TEST E-MAIL
      <leave blank>


Once all the configuration above has been submitted successful, send a test email:

  1. Provide an email address for "E-mail address to send a test e-mail to."
  2. Click save.
  3. Check for the email at https://ethereal.email/messages.

Once confirmed, change the values in etherealUser.json. See the Run Setup section of Installation/Uninstallation for the location of that file after running atk_setup.

Communicating with Pantheon

Communicating with Pantheon happens using Terminus. Install Terminus using this documentation at Pantheon. If you are using containers (such as Lando, DDev, Docksal or plain Docker) and are running tests inside the container, you will need to install and configure Terminus in the container.

When targeting Pantheon, do not change the drushCmd value in atk.config.js. The Kit will alter the Drush commands to work with Terminus.

Communicating to Remote Servers with Drush

Set up aliases using this Drush documentation. In the atk.config.js file (located in the project root after running atk_setup), change the line below from:

drushCmd: "drush"

to

drushCmd: "drush @alias"

This will pipe the drush commands to the remote server. If the destination is Pantheon, use the instructions above instead.

Configuration Form

The configuration page is located at /admin/automated_testing_kit_d7/configuration.