The most abstract and simple way to create a program would be if we specified the required outputs or rules about the required outputs for given inputs and have the language/environment do the rest.
Prolog would come to mind.
Wouldn't it be grand? I mean we do have to specify most of it when creating the specifications and acceptance testing anyways, right?
Check this fiddle out for a second. You see a simple expectation, but if you switch to the trace tab or click on the REST link, you see you in fact get the value you just said you expect.
$send say.hi (name = "Jane") $expect (greeting contains name)
dsl here...Change the name of the message
say.hior change the default value there, from
"me", or something. Then hit "Save" and play with it (hint: checkout the REST tab).
To edit this topic and fully explore this, just create an account!
Do we really have to write the implementation for
say.hi ? Nope! Does it do what we expect? Well, sort of...
There is a special engine mode
sketchMode which will basically instruct the engine to sketch the expected values (i.e. fake them), if no other rules or mocks are found.
The tests should always pass in this case, since they were the ones providing the values.
Does the service do what is expected? Well... to the extent to which there are no conflicting expectations.