Question Authors' Forum

Random tests

Picture of Stephen Parry
Re: Random tests
by Stephen Parry - Friday, 23 February 2018, 7:40 AM

Am I going mad? I accidentally stumbled on some strange behaviour from {{ include template }} - it seems to do what I wanted from template_from_string. Instead of load the template from the filesystem as described in the Twig docs, it seems to render the string itself. Weird and undocumented, but very useful! I am making progress with some reusable templates....

Picture of Richard Lobb
Re: Random tests
by Richard Lobb - Saturday, 28 April 2018, 9:28 PM

Hi Stephen

If you're still after a lightweight question randomisation capability via Twig, you might want to check out the latest release of CodeRunner (v3.4). The randomisation capabilities are explained here.