can i run behat tests that are in my modules directory

You can manually set the path to the feature file if you want them in a different place, and presumably you could programmatically run a bunch of different feature files in progression, but we don’t want that.

So there is/was something called “Contributed Module Subcontexts” but they seem to be being taken away:

https://behat-drupal-extension.readthedocs.io/en/stable/subcontexts.html

gahhh i’m so tired of being the apparently only person trying to do something.

… give up on Behat for tests embedded in the module, and just use PHP Unit for that?

https://www.drupal.org/docs/testing/phpunit-in-drupal/running-phpunit-tests

But there is still a place for Behat, but maybe we have to restrict that to our distribution(s).

https://gorannikolovski.com/blog/drupal-8-and-behat-tests

https://behat-drupal-extension.readthedocs.io/en/v4.0.1/

https://medium.com/@djphenaproxima/ive-been-using-behat-wrong-this-whole-time-ced6efd04e72

https://gitlab.com/weitzman/drupal-test-traits

https://www.previousnext.com.au/blog/introducing-drupal-testing-traits-drupal-extension-testing-existing-sites

General testing info

https://www.lullabot.com/articles/an-overview-of-testing-in-drupal-8

https://www.drupal.org/docs/testing/types-of-tests

https://www.drupal.org/docs/creating-custom-modules/testing-a-drupal-module