When you use isolated scope, you are defining a link between the parent scope and the directive scope through attributes when the directive is declared.
So, this code:
scope: {
value: '@', // some value
test: '&' // the function
},
Is saying, "look for an attribute named value
and test
on the element on which the directive is declared."
So, it is expecting this:
<body ng-controller="MainCtrl">
<p my-directive value="{{value}}" test="test()">Hello {{name}}!</p>
</body>
For documentation see the "Isolating the Scope of a Directive" section of the directive documentation.