https://github.com/unb-libraries/drupal-trupal
Trupal test generation for Drupal.
https://github.com/unb-libraries/drupal-trupal
Last synced: about 1 year ago
JSON representation
Trupal test generation for Drupal.
- Host: GitHub
- URL: https://github.com/unb-libraries/drupal-trupal
- Owner: unb-libraries
- License: mit
- Created: 2021-01-22T15:44:56.000Z (over 5 years ago)
- Default Branch: dev
- Last Pushed: 2021-05-21T19:48:32.000Z (about 5 years ago)
- Last Synced: 2025-02-15T18:53:29.660Z (over 1 year ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Trupal for Drupal
Drupal module to support automatic test generation using Trupal.
# Installation
`composer require --dev unb-libraries/dupal-trupal`
# Usage
## Generate a test case for a Drupal module
Place a subject definition in `/path/to/your/module/tests/trupal` and assign a unique name, e.g. `test_page.yml`:
```yaml
id: 'test_page'
type: 'page'
url: '/test/page/1'
public: FALSE
grant_access:
- member
```
Next, run
`drush tgm test_module`
Which will generate tests for all `test_module` subjects. Rendered test cases will by default be placed under
`/modules/test_module/tests/behat/features/test_page.feature`
If you assign a different ID than the one in the example, that ID will be used to name the rendered test case.
Now execute tests as you would otherwise.