Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WordHat has been archived, should we remove it? #414

Open
stevector opened this issue Nov 25, 2020 · 3 comments
Open

WordHat has been archived, should we remove it? #414

stevector opened this issue Nov 25, 2020 · 3 comments

Comments

@stevector
Copy link
Collaborator

stevector commented Nov 25, 2020

WordHat has been archived/abandoned. Should that prompt us to remove it from this repo?

First, what is it, and how are we using it? WordHat is meant as a tool for Behavior-Driven Development. It can be used to fulfill the collaboration-centric philosophy of BDD (which requires a dev team writing complex PHP for Behat) and/or it can be used for regression/smoke testing (which is often done in a way that undermines or at least falls short of the BDD ideal). I talk about this tension in my Drupal-focused presentation, Bending Behat’s Benefits.

The small set of tests included with this repo fall pretty clearly on the regression test side of the BDD/regression test divide. That makes me question whether it is appropriate to use a complex BDD tool if all we really need is simple regression testing.

Of course, this repo is meant as a starting point and teaching tool. We have documentation https://pantheon.io/docs/guides/build-tools/tests/ and have led numerous trainings that have emphasized the BDD philosophy.

But before we invest further in BDD tooling I’d like to see more evidence of BDD adoption from those we’ve trained.


And even if we do find that a significant portion of our community has run with the BDD philosophy, I still question if Behat specifically is an appropriate foundation to build upon.

I was first attracted to Behat partially because it was written in the same language as the system I was testing (PHP and Drupal). But I now question whether or not it is a net positive for a BDD tool to intertwine itself deeply with the system it tests in the way the Drupal extension (and I think Wordhat) has. If the BDD philosophy emphasizes focusing on what can be clearly observed by the end user of the piece of software (rather than what can be detected by machines) I fear it is counter-productive for a BDD tool to share a runtime (and variables and direct language API calls) with the System Under Test.

Of course this concern is mitigated partially in our examples because we have a split between Behat running in CI and WordPress/Drupal running on Pantheon but I suspect the shared PHP language still creates confusion.

I think we may be better off investing in a JavaScript-based testing tool because

  • Having a CMS written in one language and a testing tool written in another helps clarify the line between the two
  • JavaScript is eating the world and I would recommend that nearly any team choose a JavaScript option in a greenfield space (though we’re talking here about a years-old sample repo)

Though I’ve done little with it so far, I’ve been very impressed with Cypress. And apparently it can be integrated with Cucumber for BDD.

In my "Hello World" level exploration with Cypress, I have used it to create nodes in Drupal. I've run those tests via their CircleCI Orb. And I like that the Orb can save a video file of the tests being run (which I'll upload because I think the CircleCI link might be protected)

@stevector
Copy link
Collaborator Author

NM, I can't upload an mp4 to GitHub.

@stevector
Copy link
Collaborator Author

@sugaroverflow and @greg-1-anderson, let's discuss at our meeting today. cc @danielbachhuber

@jrastaban
Copy link

There is mounting pressure to make a decision here as new WP functionality is breaking our current tests: pantheon-systems/terminus-build-tools-plugin#373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants