Information

Project name : Merlin
Drupal : 7.x
Sandbox : https://drupal.org/sandbox/churel/2160815

Why Merlin?

During the initial alpha phase my brother had his first son: Merlin.

Git instructions

git clone http://git.drupal.org/sandbox/churel/2160815 merlin

Requirements

-A behat environment (http://docs.behat.org/en/v2.5/quick_intro.html#installation)
-Selenium standalone version: http://docs.seleniumhq.org/download/ .
-A Spreadsheet editor who is able to read .ods (like https://www.libreoffice.org/)

Description

From a template spreadsheet, the wizard can automatically build an entire Drupal website.
Components supported by his wand :
-Features
-Content type
-Fields
-Field group
-Taxonomy
-View modes
In addition, Merlin provides automated tests (Gherkins) for all components he build.

Instructions

  1. First of all if you are not familiar with Behat and selenium you should start reading this awesome article by Lin Clark : http://lin-clark.com/blog/2013/11/26/quickstart-testing-with-behat-mink-.... Here a tutorial on windows (http://comm-press.de/en/blog/installing-behat-windows)
  2. When you have a behat environement with selenium, just be sure this environment will do his actions on your drupal site (configuration under the behat.yml).
  3. Then download and install Merlin.
  4. Clone and fill the template spreadsheet (in the ods-template folder) with all the components your website need (be sure the required modules are installed on your drupal site).
  5. Give it to merlin (admin/config/system/merlin) and fill out the username and password field with a credential that are able to create those components on your site (admin for exemple)
  6. Merlin will give you a zip. When you unzip it you will have two folders:
    • One for the build
    • One for the test

    Into those folder there are two kind of file :
    .feature : Behat feature file
    FeatureContext.php : Some new step definition.

  7. Add the new steps and run feature on your behat environment to create/test every component.

Presentation

I presented this module on the DrupalCamp Toronto 2014
https://www.youtube.com/watch?v=EyINJdXY35Y
And I wrote a blog article about it : http://therefore.ca/blog/birth-merlin

PAReview

Some code came from Behat projet so the Drupal code convention cannot be apply to them. So it's why on PAReview there is still some errors

Reviews of other projects

https://drupal.org/node/1970152#comment-8865161
https://drupal.org/node/2221631#comment-8873749
https://drupal.org/node/2284633#comment-8873833

CommentFileSizeAuthor
#13 dot_info_specify_php_version.patch564 bytesskaught

Comments

PA robot’s picture

Status: Needs review » Needs work

There are some errors reported by automated review tools, did you already check them? See http://pareview.sh/pareview/httpgitdrupalorgsandboxchurel2160815git

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

churel’s picture

Issue summary: View changes
churel’s picture

Issue summary: View changes
churel’s picture

Issue summary: View changes
churel’s picture

Issue summary: View changes
Issue tags: +PAreview: review bonus
churel’s picture

Status: Needs work » Needs review

Fixed all errors reported by automated review tools except the one are impossible (Behat file).

churel’s picture

Title: Merlin » [D7] Merlin
gisle’s picture

Status: Needs review » Needs work

Your project page says:

Requirements
A behat environment with a javascript browser (http://behat.org/).

However, when I open the README.txt, it tells me:

4. Get Selenium (http://docs.seleniumhq.org/download/).
On a stand alone version
(selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar)

And when I try to run composer, it tells me my PHP version is too old!

And to top it all, the repo comes with some binary files in the directory "ods-templates" and I can't find it documented anywhere what they are and how they're supposed to be used, or what I need to install to make use of them. (OK, I know they're spreadsheets and that having OpenOffice.org is probably a requirement as well, but these things should be documented on the project page).

There is nothing to brighten the day of a reviewer to get these little surprises after having set up the environment, rather than up front.

I think, as a minimum, the project page need to list all the necessary bits and pieces that need to be in place before one is able to make use of the module. I feel I just wasted my time on this one.

Also, avoid unexplained jargon such as "Gherkin suite" and "Gherkins scenarios". Yes, I know how to google, but I don't think I should have to do such things in order to learn how to use a contributed Drupal module.

Please take a moment to make your project page follow tips for a great project page.

Additional points:

Automatic review
PAReview had some minor complaints: link to review.
Please review the output of PAreview. Make a note in the issue summary if you think they're false positives.
Master Branch
It appears your sandbox is set up with the depreciated "master" branch in as default (even if the 7.x-1.x branch exists). You should really be have a version specific branch as the default. (PAReview thinks you also should remove the "Master" branch. I don't think that is necessary, but the default branch should never be "Master"). Please see the documentation about release naming conventions.
churel’s picture

Issue summary: View changes
Status: Needs work » Needs review

Thank you very much gisle for your comments. They are really useful to me. I add a lot of documentation to the module page, the readme and this post. I add "ods reader" and "selenium" on the requirement and two tutorials about how to install behat (windows and others). I also add why this module cannot validate PAReview (Behat and Drupal have different code convention) and I remove the master branch from the repository. And for the jargon I tried to remove what is possible but those terms are official and removing them will be confusing for people who knows behat.
Again thanks you very much for your help.

skaught’s picture

Issue summary: View changes
skaught’s picture

Issue summary: View changes
skaught’s picture

Issue summary: View changes
skaught’s picture

StatusFileSize
new564 bytes

@gisle
you may have to update your PHP, i believe behat needs 5.4
I'm adding a patch to specify that in merlin.

of course, the documentation (or faults/lack of) of behat or seleniumhq is an issue to those tools.

I think an important thing to keep in mind is the project your testing may only need to be running in 5.2 or 5.3 and then might want a different host env to run your project.

what Merlin does

  • it builds Content-types with fields into Features and then separately, tests ready for Behat.

----

The part of merlin that builds the initial tests and features it-self would only need to run in 5.3. Some more development and/or documenation will evolve from this.

which that my patch should only specify 5.3, not 5.4

klausi’s picture

Status: Needs review » Needs work
Issue tags: -PAreview: review bonus

manual review:

  1. merlin_menu(): why the permission 'access content overview'? For importing stuff that does not make sense? Also this looks like an unexpected feature for users that have the permission, one could even argue a security problem?
  2. merlin_import_form_submit(): doc block is wrong, this is not a hook. See https://www.drupal.org/coding-standards/docs#forms
  3. merlin_import_form_submit(): $something and if there is something to do should be determined in the validation callback of the form?
  4. merlin_handle_ods(): consider using drupal_mkdir() instead instead of mkdir() to respect Drupal's file creation chmod.
  5. merlin_build_site_creation(): file_put_contents() is nice and does not require you to use all the file handling functions.
  6. merlin_help(): doc block is wrong, see https://www.drupal.org/coding-standards/docs#hookimpl . Also elsewhere, please check all your hooks.
  7. I think the README.txt should mention that this should never be enabled on a production site, right? This is for development sites and building sites, right?
  8. merlin.ods.inc: did you modify the code of this library? I think LGPLv3 is not compatible with GPLv2+ used on drupal.org, so I think this file must be removed. If you did not have to modify it then you can just tell users where to download it. 3rd party code is not generally allowed on Drupal.org and should be deleted. This policy is described in the getting involved handbook. It also appears in the terms and conditions you agreed to when you signed up for Git access, which you may want to re-read, to be sure you're not violating other terms. The Libraries API module is a recommended method for adding 3rd party dependencies without directly including the code on Drupal.org.
  9. merlin_parseOds(): shell_exec()? Really? This will fail on some PHP installations that don't allow shell execution. Why can't you use ZipArchive or something similar again?

So the library thing is a blocker right now, please clarify.

Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.

PA robot’s picture

Status: Needs work » Closed (won't fix)

Closing due to lack of activity. If you are still working on this application, you should fix all known problems and then set the status to "Needs review". (See also the project application workflow).

I'm a robot and this is an automated message from Project Applications Scraper.