testing – DDD Shared kernel between BDD and Implementation Project

A little background:

  • I am currently researching DDD software design.
  • The project I am working on is a a CMS driven website.
  • The website includes a BDD solution of automated tests.

More specifically, I am currently looking into our Data Driven tests. We get our data from a table written into the feature file, but I am looking to implement an external source (like a database, excel file, api, etc). It occurred to me, most of the terms we in the data driven tests, seem similar to words that might be in our DDD kernel (if we had one). Examples terms are like “Trip”, “Product”, “Country”, etc.

This made me think if it would be possible to write infrastructure repository code for the BDD solution that would to return that data for the tests, as domain models from the shared kernel.

I’m wondering, is it a good idea, or if others have, Shared a Kernel between their Implementation projects, and their BDD projects?