With advances like TDD, BDD, IBM's Watson, and Microsoft Cortana what will the future hold for software development?
Today, we can write automated tests to validate design and implementation. If we're doing this in an optimal way, then we are writing the automated tests to specify the system. What if the next level is to write only the tests and not the code? What would that look like?
I would imaging that the tests would have to be written very specifically to define every aspect of the system including environmental considerations. It would certainly take the saying "the tests are the requirements, the requirements are the tests" into another form. Something like "the requirements are the system, the system is the requirements."
This would require some clever sort of meta-programming model that could take a ubiquitous definition of the the system defined by example and translate it into whatever language. Some sort of translator/code generator/compiler would take the BDD style requirements and, ultimately, turn them into runnable applications.
First, the spec reader would need to parse the requirements into a standard baseline. With that, any BDD style format could be used as input, given the proper translations.
Next, something would need to analyze the baseline and decide how to efficiently process each set of rules. Perhaps some decisions would be made with respect to which language to use to maximize system efficiency and conform to the defined standards.
In order to meet those goals, certain meta-information would be needed about the system itself and about each requirement/feature. For example, one may define the security requirements of the system as a whole, or one particular feature or function. The data retention policy would be another aspect of the system. How about accessibility or internationalization? How about defining the environment constraints? Will there be a multiple environments? Or only one? Will it need to scale out?
Obvious complexities aside, I believe we have the technology and the know-how necessary to build such a system today. However, I also believe such a system designed this way would be fraught with the same problem that today's systems have and that's about the requirements themselves.
Let's assume, for sake of retaining optimism, that we provide accurate statements about every aspect of the system - what it runs on, how it will be available, what data it will use and persist, what transactions, how many users, which locations are the users, what roles, features, integrations. We define every aspect in our acceptance tests. Then those are translated, processed, and some machine or IL code is produced as a result - it's installed or deployed and we're up an running without writing a single line of code. We've only written pre-conditions, actions, and expected results. For a Given Condition, When some Action, Then some Result.
What would the first requirement look like? Would we define system constraints first? Would we define outputs first? Inputs? When would those be compiled? We wouldn't exactly have code to verify with the tests, so perhaps it would be real time, but the analysis process would take so much time especially at first.
Let's assume we would define the environment first. Given a growing population of users, And the users are geographically distributed, When users need to use the system, Then they would use a web browser. But should we even need to define that? Perhaps the compiler would know which platform would be best based on how we define the users, so we'd start there.
Given a globally distributed population of users, When the users access the application, Then they should be able to access the application from any location. With this spec in mind, the system may decide that a distributed system with multiple types of clients would be the best design. There may be decisions to make about caching on clients due to lack of specification about internet connectivity, so the only design must support with and without internet. Perhaps the compiler would need to make certain assumptions or respond with prompts. Perhaps certain parts of the design are better served as wizard-like or key-value pair configurations.
How about data, how would data be defined? In Cucumber BDD, input data is defined in either a Given statement or a Setup for a feature. But multiple features may share the same entities, so we wouldn't want to have too many definitions of them. Perhaps some tag could be used and all those related bits of data can be correlated by that.
In any case we can see that this is possible, but the details are fairly complex. It will be slow and cumbersome at first, but in time will be the usual way of building systems.